Repository navigation
build(npm): Restore optional dependency versions in lockfile - #3450
Merged
Merged
Conversation
The post-release lockfile bump for 3.8.1 ran before the platform packages were available on npm, so it dropped their versions and broke npm ci. Co-Authored-By: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com>
szokeasaurusrex
approved these changes
Oct 21, 2026
JPeer264
approved these changes
Oct 21, 2026
szokeasaurusrex
added a commit
that referenced
this pull request
Oct 22, 2026
Fixes the race in `scripts/post-release.sh` that broke `npm ci` on `master` after 3.8.1. #3450 repairs the lockfile itself. For 3.8.1, the post-release commit (11815fd) landed at 11:45:08 UTC. According to the npm registry, most of the platform packages were published after that, and the last one (`@sentry/cli-linux-arm64`, at 11:58) came 13 minutes later. Because `npm install --package-lock-only` ran before those versions existed, npm wrote the optional dependencies to the lockfile without any version. The script now: - Polls npm until every `optionalDependencies` package is available at the new version. It checks every 30s and fails after 30 minutes. - Runs `npm install` with `--prefer-online`, so it doesn't use cached registry metadata. - Checks that the lockfile has the new version for every optional dependency, and exits before committing if any are missing. A bad lockfile then shows up as a failed post-release step instead of a red `master`. The package list comes from `package.json`, so a new platform package doesn't need any change here. The lockfile check works with both lockfile v1 (the current format) and v2/v3. <!-- junior-request-attribution:start --> via @szokeasaurusrex. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AC0C01CK9SG2%3A1792581829.701409 --> -- [View Junior Session](https://junior-prod.sentry.dev/conversations/slack%3AC0C01CK9SG2%3A1792581829.701409) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0C01CK9SG2%3A1792581829.701409/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com>
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.
Fixes the Node CI jobs, which have been failing on
mastersince the 3.8.1 release.The post-release bump in 11815fd removed the
versionfield from every@sentry/cli-*optional dependency inpackage-lock.json. Because of that,npm cirejects the lockfile as out of sync withpackage.json, which pins those dependencies to3.8.1. The most likely cause is thatscripts/post-release.shrannpm install --package-lock-onlybefore the 3.8.1 platform packages were available on npm.This PR reruns the same command now that the packages are published, so each entry is set back to
3.8.1.via @szokeasaurusrex.
--
View Junior Session [Sentry]