Skip to content

Fix npm ci in compiler/: write platform optionalDependencies at publish time only - #44

Merged
ryansolid merged 1 commit into
mainfrom
claude/project-thread-k44bg2
Nov 10, 2026
Merged

ryansolid merged 1 commit into
mainfrom
claude/project-thread-k44bg2

Conversation

@ryansolid

Copy link
Copy Markdown
Member

npm ci in compiler/ now fails on main with "Missing: @reactivescript/compiler-darwin-arm64@0.1.0 from lock file" (and the same for the other platform packages). The cause is that the committed optionalDependencies name the 0.1.0 platform packages, which are now on npm, but the lock was written before they existed and doesn't list them. npm 10 also refuses it. This breaks the compiler CI for every PR, including #42.

Regenerating the lock would fix main today, but the next version bump would break it again until the new platform packages are published. So this PR stops committing them:

  • package.json: compiler/package.json no longer has optionalDependencies, and the lock never lists the platform packages.
  • Sync script: scripts/sync-optional-deps.mjs still syncs the npm/* versions during npm version. With the new --publish flag it also writes the optionalDependencies, which the publish job in compiler.yml passes just before npm publish. What gets published is the same as before.
  • Docs: compiler/README Releasing explains why.

I checked that npm ci passes in compiler/ with the regenerated lock, and that napi version doesn't add the dependencies back.


Generated by Claude Code

Once the 0.1.0 platform packages were on npm, npm ci in compiler/ failed
on main: the committed optionalDependencies named them but the lock,
written before they existed, did not. Regenerating the lock only moves
the problem to the next version bump. So package.json no longer carries
them; the publish job writes them (sync-optional-deps.mjs --publish)
just before publishing, and the lock never names the platform packages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117BoWPLMLsJjr7WiwaUgvd
@ryansolid
ryansolid merged commit f030c37 into main Nov 10, 2026
11 of 12 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.

2 participants