-
Notifications
You must be signed in to change notification settings - Fork 111
Update dependency @types/node to v24 #600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,7 +52,7 @@ | |
| "@changesets/cli": "^2.27.1", | ||
| "@edge-runtime/vm": "^5.0.0", | ||
| "@livekit/changesets-changelog-github": "^0.0.4", | ||
| "@types/node": "^20.10.1", | ||
| "@types/node": "^24.0.0", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚩 Major version jump in @types/node may introduce breaking type changes The Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| "happy-dom": "^20.0.0", | ||
| "prettier": "^3.0.0", | ||
| "tsup": "^8.3.5", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚩 @types/node v24 may expose APIs unavailable in supported Node versions
Both packages declare
"node": ">= 18"in theirenginesfield (packages/livekit-rtc/package.json:74,packages/livekit-server-sdk/package.json:65), meaning they claim to support Node 18, 20, 22, etc. However,@types/node@^24provides type definitions for the Node.js 24 API surface. This means TypeScript will happily allow usage of APIs introduced in Node 20, 22, or 24 (e.g., changes tofs,crypto,stream, or global type changes) without any compiler error — even though those APIs would fail at runtime on Node 18.This isn't a bug in itself (it's a dev dependency, so it doesn't affect consumers' type resolution), but it does reduce the safety net for contributors: new code could accidentally rely on newer Node APIs that don't exist in Node 18, and TypeScript won't catch it. Typically,
@types/nodemajor version should align with the minimum supported Node version to prevent this class of issue.Was this helpful? React with 👍 or 👎 to provide feedback.