fix(release): pin optionalDependencies to bootstrap version in committed source

CI was failing because apps/cli/package.json declared optionalDependencies
at 0.16.0 but only 0.0.0-bootstrap exists on npm for those packages. The
lockfile couldn't resolve, and `pnpm install --frozen-lockfile` rejected
the working tree.

Pin optionalDependencies to 0.0.0-bootstrap in the committed source so the
lockfile resolves cleanly. The release workflow now bumps them to the real
version inside publish-npm.sh, just before publishing main kandev — at
which point the matching @kdlbs/runtime-*@VERSION tarballs have already
been published earlier in the same step. This avoids the chicken-and-egg
where the prepare job tried to bump optional deps to a version that didn't
yet exist on npm.

Workflow changes:
- prepare job: only bumps the main package version, not optional deps.
- publish-npm.sh: rewrites optionalDependencies to $VERSION right before
  the main `npm publish`, after the 5 runtime packages have been published.

The published kandev@X.Y.Z still has its optionalDependencies pinned to
matching @kdlbs/runtime-*@X.Y.Z. Only the local source uses the bootstrap
pin for development convenience.
This commit is contained in:
José Almeida
2026-05-03 21:48:13 +01:00
parent 0c5bbb87f4
commit ac3e8eeb7d
4 changed files with 87 additions and 17 deletions
+5 -5
View File
@@ -17,11 +17,11 @@
"npm": ">=7"
},
"optionalDependencies": {
"@kdlbs/runtime-linux-x64": "0.16.0",
"@kdlbs/runtime-linux-arm64": "0.16.0",
"@kdlbs/runtime-darwin-x64": "0.16.0",
"@kdlbs/runtime-darwin-arm64": "0.16.0",
"@kdlbs/runtime-win32-x64": "0.16.0"
"@kdlbs/runtime-linux-x64": "0.0.0-bootstrap",
"@kdlbs/runtime-linux-arm64": "0.0.0-bootstrap",
"@kdlbs/runtime-darwin-x64": "0.0.0-bootstrap",
"@kdlbs/runtime-darwin-arm64": "0.0.0-bootstrap",
"@kdlbs/runtime-win32-x64": "0.0.0-bootstrap"
},
"dependencies": {
"tar": "^7.5.11",