Repository navigation
build(npm): Wait for platform packages before bumping lockfile - #3451
Open
sentry-junior[bot] wants to merge 2 commits into
Open
sentry-junior[bot] wants to merge 2 commits into
sentry-junior[bot] wants to merge 2 commits into
Conversation
The post-release script could run before every platform package for the new version was visible on npm. npm then dropped their versions from package-lock.json, which broke npm ci on master after 3.8.1. Poll npm until all optional dependencies are published, and refuse to push a lockfile that is missing the new versions. Co-Authored-By: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com>
sentry-junior
Bot
requested review from
a team and
szokeasaurusrex
as code owners
October 21, 2026 12:47
dingsdax
approved these changes
Oct 21, 2026
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 race in
scripts/post-release.shthat brokenpm cionmasterafter 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. Becausenpm install --package-lock-onlyran before those versions existed, npm wrote the optional dependencies to the lockfile without any version.The script now:
optionalDependenciespackage is available at the new version. It checks every 30s and fails after 30 minutes.npm installwith--prefer-online, so it doesn't use cached registry metadata.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.via @szokeasaurusrex.
--
View Junior Session [Sentry]