Skip to content

build(npm): Bump optional dependencies in lockfile to 3.8.2 - #3463

Merged
BYK merged 1 commit into
masterfrom
szokeasaurusrex/bump-optional-deps-3.8.2
Oct 28, 2026
Merged

BYK merged 1 commit into
masterfrom
szokeasaurusrex/bump-optional-deps-3.8.2

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Fixes the Node CI jobs on master, which have failed since the 3.8.2 release because package-lock.json still pins the @sentry/cli-* optional dependencies to 3.8.1.

The 3.8.2 post-release step never committed the lockfile bump. It timed out after 30 minutes waiting for @sentry/cli-linux-arm64@3.8.2 to show up on npm. Craft published that package at 11:01 UTC, but npm only listed it at 11:57 UTC. This PR reruns the same npm install --package-lock-only --ignore-scripts --prefer-online now that all platform packages are available.

via @szokeasaurusrex.

--

View Junior Session [Sentry]

Co-Authored-By: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com>
@szokeasaurusrex
szokeasaurusrex requested review from JPeer264 and removed request for stephanie-anderson October 28, 2026 14:04
@BYK
BYK enabled auto-merge (rebase) October 28, 2026 14:08
@BYK
BYK merged commit b145211 into master Oct 28, 2026
29 checks passed
@BYK
BYK deleted the szokeasaurusrex/bump-optional-deps-3.8.2 branch October 28, 2026 14:10
szokeasaurusrex added a commit that referenced this pull request Nov 3, 2026
Stops `master` from going red after every release because
`package-lock.json` falls behind the `@sentry/cli-*` optional dependency
versions in `package.json`.

Until now, the release commit bumped `package.json` and a Craft
post-release step bumped the lockfile later, once npm listed the new
platform packages. That step depends on how fast npm lists them.
`@sentry/cli-linux-arm64` has been taking anywhere from about 15 minutes
(3.8.1) to 56 minutes (3.8.2) to appear after publish. For 3.8.2 the
30-minute wait from #3451 ran out, so the lockfile never got bumped
(fixed by hand in #3463).

`bump-version.sh` now writes the new version into the lockfile entries
in the same release commit. Each entry gets only `version` and
`optional`. These entries don't need npm to resolve anything, so they
can be written before the packages exist. If a version isn't on npm yet,
`npm ci` warns and skips that optional package instead of failing. The
script exits if the lockfile is ever moved off lockfileVersion 1, so a
format change can't silently skip the bump.

Since the lockfile is in sync from the start:
- `scripts/post-release.sh` and the `postReleaseCommand` in `.craft.yml`
are removed. Craft skips the post-release step when the script is
missing.
- Release-branch CI in `test_node.yml` now uses `npm ci` like everything
else, without the `npm install --omit=optional` and `napi-postinstall`
workaround. It also checks that the lockfile is in sync before
publishing.

<!-- junior-request-attribution:start -->
via @szokeasaurusrex.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC0C01CK9SG2%3A1793196002.139839 -->

--

[View Junior
Session](https://junior-prod.sentry.dev/conversations/slack%3AC0C01CK9SG2%3A1793196002.139839)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0C01CK9SG2%3A1793196002.139839/?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>
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