Skip to content

Make published plugin bundles reproducible - #54

Merged
nicosuave merged 1 commit into
mainfrom
reproducible-plugin-bundles
Oct 13, 2026
Merged

nicosuave merged 1 commit into
mainfrom
reproducible-plugin-bundles

Conversation

@nicosuave

Copy link
Copy Markdown
Member

Follow-up to #53. Two problems with scripts/bundle-plugin.ts:

  • Its output included esbuild's module path comments, which contain the builder's random temporary directory, so no two builds were the same bytes. The bundle is now minified, so the same source and checkout give identical output anywhere. That lets a deployment repo commit a bundle and check it against its source in CI.
  • It loaded the plugin definition with a plain Bun import. A plugin kept in another repository couldn't resolve @sidequery/artifacts/plugins, and in a directory without node_modules Bun auto-installed the old npm release instead. The definition is now read from an esbuild bundle of the module, using the same alias as the shipped bundle.

A new test builds the fixture from another directory and expects identical bytes and no machine paths. The Miniflare runtime-plugin tests (6/0), the celld runtime-plugin test, and typecheck pass.

Bundles carried esbuild path comments with the builder's temporary directory, so no two builds matched. Minify the output, and read the plugin definition from a bundle of its module so a plugin kept in another repository needs no install of this package.
@nicosuave
nicosuave merged commit 65dbdf2 into main Oct 13, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant