Skip to content

chore(deps): Bump @types/node to 20 - #25501

Merged
JPeer264 merged 1 commit into
developfrom
jp/types-node-20
Oct 19, 2026
Merged

JPeer264 merged 1 commit into
developfrom
jp/types-node-20

Conversation

@JPeer264

Copy link
Copy Markdown
Member

This changes @types/node from ^18.19.1 to ^20.19.0 in the root and in the 11 packages that used version 18. The SDK supports only Node 20.19 and newer, so the type checks now know the Node 20 APIs. The lockfile gets no new versions, and the built type declarations stay the same.

  • @sentry/node no longer declares process.availableMemory() itself, because the Node 20 types have it.
  • @sentry/nextjs drops a type assertion that is now unnecessary.

Lint decisions

The Node 20 types mark channel.subscribe() and channel.unsubscribe() as deprecated, but Node revoked this deprecation (DEP0163) in v22.20.0 and v24.8.0. .oxlintrc.base.json allows these two methods in no-deprecated. The alternative is a move to diagnostics_channel.subscribe(name, onMessage) in 34 places.

@JPeer264 JPeer264 self-assigned this Oct 19, 2026
@JPeer264
JPeer264 marked this pull request as ready for review October 19, 2026 09:01
@JPeer264
JPeer264 requested review from a team as code owners October 19, 2026 09:01
@JPeer264
JPeer264 requested review from andreiborza, chargome, isaacs, logaretm, mydea and s1gr1d and removed request for a team, chargome, isaacs and logaretm October 19, 2026 09:01
The SDK supports Node 20.19 and newer, but most packages still used the
types of Node 18. Use `^20.19.0` in the root and in every package that
declared `^18.19.1`, so that the type checks know the Node 20 APIs. The
lockfile gets no new versions, and `@types/node` 18 and its
`undici-types` 5 leave it. The built type declarations do not change.

- `@sentry/node` no longer declares `process.availableMemory()` itself,
  because the Node 20 types have it. The runtime check stays, because
  Bun and Deno also run this code.
- `@sentry/nextjs` drops a type assertion that the Node 20 types of
  `process.getBuiltinModule()` make unnecessary.
- The `no-deprecated` lint rule allows `channel.subscribe()` and
  `channel.unsubscribe()` of `diagnostics_channel`. The Node 20 types
  mark them as deprecated, but Node revoked this deprecation (DEP0163)
  in v22.20.0 and v24.8.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JPeer264
JPeer264 enabled auto-merge (squash) October 19, 2026 09:35
@JPeer264
JPeer264 merged commit 312818c into develop Oct 19, 2026
731 of 737 checks passed
@JPeer264
JPeer264 deleted the jp/types-node-20 branch October 19, 2026 09:59
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