Skip to content

fix: pin native runtime dependencies for consumer installs - #71

Merged
abruption merged 1 commit into
mainfrom
fix/pin-native-dependency
Sep 29, 2026
Merged

abruption merged 1 commit into
mainfrom
fix/pin-native-dependency

Conversation

@abruption

Copy link
Copy Markdown
Owner

Summary

  • Rename package-lock.json to npm-shrinkwrap.json (identical dependency tree) and publish it, so npm installs of codex-unlock receive the CI-validated fs-ext-extra-prebuilt and nan versions instead of the newest compatible release. npm ignores package-lock.json when a shrinkwrap exists, so the shrinkwrap is the single lockfile.
  • Pin fs-ext-extra-prebuilt to exactly 2.2.14 so package managers that ignore shrinkwraps (pnpm, yarn, bun) still get the pinned direct dependency.
  • Add npm-shrinkwrap.json to the files allowlist explicitly: with a files allowlist, npm 10.9.2 and 11.11.0 omit it from the tarball.
  • Package smoke now requires the shrinkwrap in the artifact, checks that the exact pin in package.json matches it, and asserts that the installed fs-ext-extra-prebuilt and nan versions resolved from the installed package equal the shrinkwrap pins.
  • Dependabot: versioning-strategy: increase-if-necessary so the exact pin is bumped rather than widened, a separate runtime group for production dependencies, and fix (runtime) / chore (development) commit prefixes so runtime bumps produce a release.
  • Release Please's node strategy already updates npm-shrinkwrap.json.
  • Document the pinning policy in AGENTS.md, docs/maintainer-release.md, and docs/platform-support.md.

Closes #69

Type

  • fix

Safety impact

No change to lock probing, owner validation, signaling, or JSON output. Consumers now get the exact native lock-probe implementation that CI validated.

Checklist

  • npm run check passes
  • npm run lint passes
  • npm test passes (84 pass, 0 fail)
  • npm run smoke:package passes
  • Commits follow Conventional Commits
  • Documentation is updated when behavior or output changed
  • No tokens, private paths, or unredacted process data are in the diff

Notes

  • Negative check: reverting the dependency to ^2.2.14 makes package smoke fail on the exact-pin assertion.
  • A default consumer install contains only codex-unlock, [email protected], and [email protected]; development entries in the shrinkwrap are not installed.
  • nan is transitive, so Dependabot will not propose standalone version updates for it; it changes with fs-ext-extra-prebuilt bumps or security updates.
  • Runtime Dependabot merges now produce patch releases via fix(deps). Revert the commit-message change if that is not desired.
  • Shrinkwrap applies to npm only; pnpm/yarn/bun consumers get the pinned direct dependency but not a pinned nan (documented).

Publish npm-shrinkwrap.json as the single lockfile (renamed from
package-lock.json) and pin fs-ext-extra-prebuilt to exactly 2.2.14, so
npm installs of codex-unlock receive the CI-validated fs-ext-extra-prebuilt
and nan versions instead of the newest compatible release.

Package smoke now requires the shrinkwrap in the artifact, the exact pin to
match it, and the installed fs-ext-extra-prebuilt and nan versions to equal
the shrinkwrap pins. Dependabot bumps the exact pin in its own runtime group
with a fix(deps) commit so each update passes the full matrix and ships in a
release. Release Please already updates npm-shrinkwrap.json.

Closes #69
@abruption abruption added this to the v0.4.1 milestone Sep 28, 2026
@abruption
abruption merged commit 2c7e045 into main Sep 29, 2026
23 checks passed
@abruption
abruption deleted the fix/pin-native-dependency branch September 29, 2026 00:04
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.

security: pin the native fs-ext-extra-prebuilt dependency for consumer installs

1 participant