Repository navigation
Fix npm ci in compiler/: write platform optionalDependencies at publish time only - #44
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
npm ciincompiler/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 committedoptionalDependenciesname 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:
compiler/package.jsonno longer hasoptionalDependencies, and the lock never lists the platform packages.scripts/sync-optional-deps.mjsstill syncs thenpm/*versions duringnpm version. With the new--publishflag it also writes theoptionalDependencies, which the publish job incompiler.ymlpasses just beforenpm publish. What gets published is the same as before.I checked that
npm cipasses incompiler/with the regenerated lock, and thatnapi versiondoesn't add the dependencies back.Generated by Claude Code