Skip to content

chore(deps): upgrade dependencies and migrate biome config - #17

Merged
andybevan-scope3 merged 4 commits into
mainfrom
upgrade-dependencies
Jul 30, 2026
Merged

chore(deps): upgrade dependencies and migrate biome config#17
andybevan-scope3 merged 4 commits into
mainfrom
upgrade-dependencies

Conversation

@andybevan-scope3

Copy link
Copy Markdown
Contributor

Upgrades every direct dependency to its latest release within the version policy the repo already uses, and supersedes all six open Dependabot PRs.

Version policy applied

@sentry/* are exact-pinned in this repo, so they move in lockstep. Everything else keeps its caret range, which meant most of the work was a lockfile refresh (npm update) rather than a manifest edit.

Only two floors needed to move, because a caret on a 0.x range can't reach the target:

package from to why the floor moved
@opentelemetry/exporter-trace-otlp-http ^0.214.0 ^0.221.0 0.221.0 is the experimental release paired with stable 2.10.0; verified it resolves @opentelemetry/sdk-trace@2.10.0
@types/node ^22.0.0 ^24.0.0 matches .nvmrc and the 24.x CI runs

@sentry/node, @sentry/opentelemetry, @sentry/profiling-node: 10.34.010.69.0.

Picked up within existing carets: OTel stable 2.6.12.10.0, @opentelemetry/api 1.9.01.9.1, semantic-conventions 1.40.01.43.0, biome 2.4.62.5.6, vitest 4.0.184.1.10, jose 6.2.16.2.5, semver 7.7.47.8.5, pyroscope 0.4.100.4.13.

Majors held back

Deliberately not in this PR, each deserving its own evaluation:

  • typescript 7.0.2 — brand-new native port, far too large to ride along with a dependency refresh.
  • lint-staged 17 — dev-only, no benefit here worth a major.
  • @pyroscope/nodejs 0.6.2 — native profiler; a 0.x major with real runtime risk in a package that loads a native binary.
  • @types/node 26 — would type against Node 26 APIs while CI runs 24.

Security

Vulnerabilities: 10 (1 critical, 3 high, 5 moderate, 1 low) → 1 (low).

Nine resolved because protobufjs and @protobufjs/utf8 left the dependency tree entirely rather than by being patched.

The remaining one is esbuild (GHSA-g7r4-m6w7-qqqr, low): arbitrary file read when running the development server on Windows. Not fixable and not applicable:

  • reachable only via tsup, whose latest release (8.5.1) still pins esbuild ^0.27.0, so npm audit fix cannot resolve it
  • tsup uses esbuild as a bundler and never starts its dev server
  • dev-only; files: ["dist"] means esbuild never reaches consumers

Forcing an override would put tsup on an untested esbuild range to silence an advisory that can't fire here, so I left it.

biome config migration

biome 2.5.6 deprecates linter.rules.recommended in favour of preset and warns on the $schema version mismatch. Migrated with biome migrate --write (a 2-line change). Findings are unchanged before and after: 2 warnings + 1 info, the same pre-existing noNonNullAssertion warnings in config.ts.

Verification

Run on Node 24.16.0 after rm -rf node_modules && npm ci, which is how CI installs:

  • npm ci reproduces from the lockfile
  • typecheck clean
  • lint clean (exit 0)
  • build clean
  • 55/55 tests pass

The Sentry jump is the risk in this PR and got extra scrutiny. 10.34.010.69.0 is 35 minor versions, and the scope-isolation fix from #16 deliberately mirrors internals of Sentry's private setupOtel. A green suite alone wouldn't prove the fix is still doing anything, so I re-ran the negative tests on the new version:

fix removed before (10.34.0) after (10.69.0)
contextManager 4 tests fail 4 tests fail
attachTraceProviderForShutdownFlush 2 tests fail 2 tests fail

Identical, so the upstream gap still exists, the fix is still load-bearing, and the tests are still real guards rather than passing vacuously.

Supersedes

All six were lockfile-only and touched no manifest, so the regenerated tree subsumes them at equal-or-higher versions:

One thing worth a decision

engines still says node >= 20 while @types/node is now ^24 (it was already inconsistent at ^22). Typing against 24 while claiming to support 20 means a Node 22/24-only API could slip in without the compiler objecting. Nothing in src/ currently uses anything beyond console/setTimeout/process.env, so this is theoretical today. Either drop @types/node to ^20 to match the floor, or raise engines to >= 24 to match .nvmrc and CI. Happy to do whichever.

Closes: #3, #4, #10, #13, #14, #15

🤖 Generated with Claude Code

Moves every direct dependency to its latest release within the version
policy already in use: @sentry/* stay exact-pinned and move in lockstep,
everything else keeps its caret range.

Two floors had to move because a caret on a 0.x range cannot reach the
target. @opentelemetry/exporter-trace-otlp-http goes to ^0.221.0, which is
the experimental release paired with stable 2.10.0. @types/node goes to
^24.0.0 to match .nvmrc and the version CI runs.

Majors held back for separate evaluation: typescript 7, lint-staged 17,
@pyroscope/nodejs 0.6 (native profiler), @types/node 26.

Drops vulnerabilities from 10 to 1. Nine went away because protobufjs and
@protobufjs/utf8 left the tree entirely. The remaining advisory is esbuild
in the development server on Windows, reachable only through tsup, whose
latest release still pins esbuild ^0.27.0; tsup runs as a bundler and never
starts that server.

biome 2.5.6 deprecates linter.rules.recommended in favour of preset, so the
config is migrated with `biome migrate` and the schema pinned to the
matching version.

Supersedes #3, #4, #10, #13, #14 and #15, all of which changed only the
lockfile and are subsumed by the regenerated tree.

Co-Authored-By: Claude <noreply@anthropic.com>
andybevan-scope3 and others added 2 commits July 30, 2026 06:00
README already documents "Requires Node.js >= 24", and .nvmrc and both
workflows run 24.x, so `engines` was the only place still claiming 20. This
makes the declared range match the documented contract and the version the
package is actually built and tested against, and lines it up with the
@types/node range.

Co-Authored-By: Claude <noreply@anthropic.com>
Minor rather than patch: the runtime dependency surface moves substantially
(@sentry/* across 35 minor versions, OpenTelemetry to 2.10.0) and the
supported Node range narrows, which consumers should see in more than a
patch digit.

Co-Authored-By: Claude <noreply@anthropic.com>
@benminer
benminer self-requested a review July 30, 2026 15:14
`>= 20.20.2` rather than `>= 20` because @pyroscope/nodejs declares
`>=20.20.2`, making it the tightest constraint any direct runtime dependency
imposes; a plainer `>= 20` would admit versions the tree rejects. The OTel
packages want `^18.19.0 || >=20.6.0` and the Sentry packages `>=18`, so
neither binds tighter.

Node 20 is genuinely supported rather than merely declared: the Sentry CPU
profiler ships prebuilt binaries for ABI 108, 115, 127, 137 and 147, and the
suite passes on 20.20.2, 24.16.0 and 26.4.0.

@types/node tracks the floor so the compiler rejects APIs that would be
absent on the oldest supported runtime, and README states the same version
`engines` does.

check.yml gains a matrix over the floor and the .nvmrc version, because a
supported range that CI never exercises is only an assertion. Testing the
floor matters here specifically because the profiler resolves a different
native binary per Node ABI.

Co-Authored-By: Claude <noreply@anthropic.com>
@andybevan-scope3
andybevan-scope3 merged commit e9b99c7 into main Jul 30, 2026
3 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