Skip to content

v0.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 20 Nov 14:01
· 13 commits to main since this release
v0.3.0
fbca23d

Bun and Deno: Ward now installs and runs hooks on Node, Bun and Deno, with the same config.

Warning

Ward is in early development (0.x). Until 1.0, any minor release may change the config and behavior.

Install

# npm
npm install -D @hexlabelposition/ward
npm pkg set scripts.prepare=ward
npm run prepare

# Bun: the same "prepare": "ward" script, run by bun install
bun add -d @hexlabelposition/ward

# Deno: add "prepare": "deno run -A npm:@hexlabelposition/ward" to deno.json tasks
deno add npm:@hexlabelposition/ward
deno task prepare

Published with npm provenance. Requires Git 2.20 or later and Node.js 24 or later, Bun or Deno 2. Two runtime dependencies (yaml, picomatch), ESM-only.

What's in v0.3

Bun

  • bun install runs prepare and installs the hooks, also from a workspace package.
  • Stubs start Ward on the runtime that ran the install: Node when it is installed, Bun when it is not.
  • ward.config.ts accepts full TypeScript syntax (enum, namespace, parameter properties), and syntax errors point at the line.

Deno

  • Install from a deno.json task: deno task prepare. Deno has no prepare lifecycle, so run it after cloning and after updating Ward.
  • Hooks run deno run -A npm:@hexlabelposition/ward, at the version from deno.json or package.json and the lockfile. No node_modules is needed.
  • ward.config.ts accepts full TypeScript syntax, and syntax errors point at the line.

All runtimes

  • WARD_RUNTIME=node, bun or deno overrides the runtime of the stubs for one command: WARD_RUNTIME=node git commit. An unknown value or a runtime that is not installed fails the hook with a hint.
  • Install hints show the command for the runtime in use (npx ward, bunx ward, deno run -A npm:@hexlabelposition/ward).
  • On Windows, the binary Bun writes for a workspace package (ward.exe) is found.

Tested on

Ubuntu, macOS and Windows, on Node.js 24 and the current release, the latest Bun and Deno 2.x. The full test suite runs on every runtime.

What's next

  • v0.4: the same config in CI (--from-ref, --all-files, --ci) and shared configs with extends.
  • v0.5: ward init, and hooks without tasks that exit without starting a runtime.

See BACKLOG.md.

Full Changelog: v0.2.0...v0.3.0