Skip to content

Build the npm launcher before adding its platform packages - #22

Merged
setoelkahfi merged 1 commit into
developmentfrom
fix/npm-launcher-lockfile
Nov 27, 2026
Merged

setoelkahfi merged 1 commit into
developmentfrom
fix/npm-launcher-lockfile

Conversation

@setoelkahfi

Copy link
Copy Markdown
Collaborator

The v1.4.0 Publish @getsigit/si job failed at npm ci:

Invalid: lock file's @getsigit/si-darwin-arm64@ does not satisfy @getsigit/si-darwin-arm64@1.4.0

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 ci rejects 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.json drops optionalDependencies, and its lockfile is regenerated without them.
  • release-npm.yml runs npm ci and npm run build first, then render-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 ci passes, the rendered package.json lists all six packages at 1.4.1, and npm pack --dry-run lists 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 --version prints si 1.4.0. The red v1.4.0 run stays red, because a re-run uses the workflow from the tag.

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>
@setoelkahfi
setoelkahfi force-pushed the fix/npm-launcher-lockfile branch from dd9933a to 23f5fc7 Compare November 27, 2026 13:44

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@setoelkahfi setoelkahfi self-assigned this Nov 27, 2026
@setoelkahfi
setoelkahfi merged commit 7dbe319 into development Nov 27, 2026
3 checks passed
@setoelkahfi
setoelkahfi deleted the fix/npm-launcher-lockfile branch November 27, 2026 13:55
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.

2 participants