Patch Changes
-
#483
ba61adb- Add support for single-file ESM and TypeScript plugins, and improve the plugin authoring API.New: ESM and TypeScript single-file plugins
Single-file plugins can now be written as
.mjsor.tsfiles in addition to.js/.cjs. TypeScript plugins require Bun.Improved: explicit
pluginimport instead of injected globalPlugin authors should now import
pluginexplicitly fromvarlock/plugin-librather than relying on the injected global:// CJS plugin (.js / .cjs) const { plugin } = require("varlock/plugin-lib"); // ESM plugin (.mjs / .ts) import { plugin } from "varlock/plugin-lib";
This works in both regular installs and SEA binary builds. Error classes (
ValidationError,CoercionError, etc.) are also now directly importable fromvarlock/plugin-lib.Breaking change: the implicit
pluginglobal is no longer injected into CJS plugin modules. Existing plugins must addconst { plugin } = require('varlock/plugin-lib'). -
#513
3a480b2- - fix:checkOpCliAuth()now always returns a completion callback (a no-op after the mutex is already settled) so follow-upopCLI paths still signal success/failure correctly; previously only the first call returned the deferredresolvefunction. -
Updated dependencies [
ba61adb,6fe325d,76c17f8,7f32751]:- varlock@0.7.0