Install patrun
Add patrun to a JavaScript, TypeScript, or Go project, and check which version you have.
patrun is a library: install it into the project that uses it.
JavaScript and TypeScript #
patrun needs Node.js 24 or later. Install it from npm:
npm install patrun
Load it with require, or with import in TypeScript or an ES module:
const patrun = require('patrun')
typeof patrun // → 'function'
The package has its own types, so TypeScript needs nothing more. See Use patrun from TypeScript.
Go #
The Go port needs Go 1.24 or later. Add it to your module:
go get github.com/rjrodger/patrun/go
Import it under the name patrun:
import patrun "github.com/rjrodger/patrun/go"
Check the version #
In JavaScript, the version is the package's version in node_modules/patrun/package.json. In Go, it is the constant patrun.Version:
patrun.Version // → 0.4.0
The two ports have version numbers of their own, and are released apart. What each release changed is in the changelogs: ts/CHANGELOG.md for the npm package and go/CHANGELOG.md for the Go module.