Repository navigation
Build the npm launcher before adding its platform packages - #22
Conversation
The v1.4.0 launcher job failed at `npm ci`: the lockfile listed the six @getsigit/si-<os>-<arch> packages with no version, and once they existed on npm the lockfile no longer matched package.json. Regenerating it would only move the problem to the next release, because a lockfile can't pin a version that hasn't been published yet. The committed package.json and lockfile now leave the platform packages out. The workflow runs `npm ci` and the build first, and render-main-package.cjs adds them at the release version just before `npm publish`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: siGit Code v1.7.10 <noreply@sigit.si>
dd9933a to
23f5fc7
Compare
There was a problem hiding this comment.
This PR fixes the v1.4.0 Publish @getsigit/si failure where npm ci rejected the lockfile because the six platform packages were listed with no version (they weren't on npm when the lockfile was generated). The fix reorders the launcher job: npm ci and npm run build now run first, then render-main-package.cjs adds the six platform packages at the release version just before publish. optionalDependencies are dropped from the committed package.json and its lockfile is regenerated without them, so the committed state stays consistent and npm ci passes. The render script's comment is updated to document the new ordering. The reasoning is sound: a lockfile can't pin an unpublished version, and the render only touches the CI working copy, so the committed package.json/lockfile remain in sync. I found no defects in the change.
Automated review by siGit Code Review · commit 23f5fc7 · see the review dashboard
The v1.4.0
Publish @getsigit/sijob failed atnpm ci:The lockfile listed the six platform packages with no version, because they weren't on npm yet when it was generated. Now that they exist,
npm cirejects it. Regenerating the lockfile isn't a fix: I tried it, and it pins them at 1.4.0, so the 1.4.1 release would fail the same way. A lockfile can't pin a version that hasn't been published.What changes:
packaging/npm/si/package.jsondropsoptionalDependencies, and its lockfile is regenerated without them.release-npm.ymlrunsnpm ciandnpm run buildfirst, thenrender-main-package.cjs. The render already writes the six platform packages at the release version, so the published package doesn't change.I ran the new step locally with
RELEASE_VERSION=1.4.1.npm cipasses, the renderedpackage.jsonlists all six packages at 1.4.1, andnpm pack --dry-runlists the same three files as 1.4.0. actionlint is clean.1.4.0 itself is fine. All seven packages were published by hand, and
npx @getsigit/si@1.4.0 --versionprintssi 1.4.0. The red v1.4.0 run stays red, because a re-run uses the workflow from the tag.