Update dependency jose to v6 - #426
Conversation
|
7718be4 to
5df213d
Compare
67e5632 to
2c50058
Compare
1816661 to
fd8587d
Compare
827e138 to
4c738b2
Compare
4c738b2 to
05e49d0
Compare
70f3963 to
9d344d5
Compare
9d344d5 to
3eec058
Compare
3eec058 to
cb5237e
Compare
dd25909 to
e0074ea
Compare
e0074ea to
b5b5c5e
Compare
7d7fb64 to
0e69006
Compare
0e69006 to
51f63fd
Compare
51f63fd to
7904266
Compare
| "@livekit/protocol": "^1.43.1", | ||
| "camelcase-keys": "^9.0.0", | ||
| "jose": "^5.1.2" | ||
| "jose": "^6.0.0" |
There was a problem hiding this comment.
🔴 CommonJS users of the server SDK can no longer load it on most Node versions
The token-signing library was upgraded to a version published only as modern ES modules ("jose": "^6.0.0" at packages/livekit-server-sdk/package.json:49) while this package still ships a CommonJS build that loads it with require, so applications that use require fail to start.
Impact: Anyone consuming the SDK from a CommonJS app on a Node.js release without require-of-ESM support gets a hard load error instead of a working SDK.
Mechanism: externalized ESM-only dependency inside the emitted .cjs bundle
The build is configured with bundle: false (tsup.config.ts:9) and emits both cjs and esm formats, so dist/index.cjs contains a literal require('jose'). jose v6 removed its CommonJS build (release notes: "CJS-style require is now only possible when require(esm) support is present in the Node.js runtime"), so require('jose') throws ERR_REQUIRE_ESM on Node.js versions lacking require(esm) (i.e. < 20.19 / < 22.12). The package's exports map still advertises a require condition (packages/livekit-server-sdk/package.json:22-25), so this path is officially supported and now broken.
Was this helpful? React with 👍 or 👎 to provide feedback.
3923612 to
ddaff0a
Compare
a43bfcf to
ee9d6f5
Compare
ee9d6f5 to
5bdcc7e
Compare
c49cfbe to
d957f75
Compare
d957f75 to
5a88642
Compare
5a88642 to
24f43a5
Compare
There was a problem hiding this comment.
Devin Review found 1 new potential issue.
🐛 1 issue in files not directly in the diff
🐛 setNotBefore(new Date()) is incompatible with jose v6 which removed Date parameter support (packages/livekit-server-sdk/src/AccessToken.ts:206)
jose v6 removed support for Date instances in setNotBefore(), setExpirationTime(), and setIssuedAt() — these methods now only accept number | string. The call at AccessToken.ts:206 passes new Date(), which is no longer a valid argument after this version bump. This will cause a type error at build time and incorrect behavior at runtime if type checks are bypassed (a Date object would be coerced to its string representation rather than being treated as an epoch timestamp).
View 8 additional findings in Devin Review.
24f43a5 to
265b2a5
Compare
265b2a5 to
7832d90
Compare
dab711d to
50afa76
Compare
50afa76 to
1b3c03a
Compare
There was a problem hiding this comment.
🔍 No changeset accompanies this runtime dependency bump
This PR bumps a published runtime dependency of livekit-server-sdk (and effectively raises the minimum Node/module-system requirements for consumers) but adds no entry under .changeset/, so the change won't be released or documented in the package CHANGELOG. Repo release flow is changesets-based (ci:publish → changeset publish); consider adding a changeset (likely minor/major given the ESM-only implications).
Was this helpful? React with 👍 or 👎 to provide feedback.
1b3c03a to
8e0ede5
Compare
8e0ede5 to
8ae1cb6
Compare
8ae1cb6 to
ecd8f30
Compare
ecd8f30 to
c177ff0
Compare
There was a problem hiding this comment.
🟡 Package still claims support for Node 18 although the new dependency requires a newer Node
The declared minimum supported runtime was left at Node 18 ("node": ">=18" at packages/livekit-server-sdk/package.json:65) even though the newly required token-signing library dropped support for Node 18, so installs on Node 18 look supported but can fail at runtime.
Impact: Users on Node 18 get no install-time warning and instead hit runtime failures when creating or verifying tokens.
Mechanism: engines range vs. jose v6 support matrix
jose v6's breaking changes include "drop support for Node.js 18.x and earlier"; its own engines requires Node 20+. Since jose is a runtime dependency of livekit-server-sdk (packages/livekit-server-sdk/package.json:49) and is used directly in packages/livekit-server-sdk/src/AccessToken.ts:202-234, the SDK's engines.node should be raised to match (>=20).
(Refers to line 65)
Was this helpful? React with 👍 or 👎 to provide feedback.
This PR contains the following updates:
^5.1.2→^6.0.0Release Notes
panva/jose (jose)
v6.2.3Compare Source
Refactor
v6.2.2Compare Source
Fixes
v6.2.1Compare Source
Refactor
v6.2.0Compare Source
Features
Documentation
v6.1.3Compare Source
Refactor
v6.1.2Compare Source
Refactor
v6.1.1Compare Source
Documentation
Refactor
v6.1.0Compare Source
Features
v6.0.13Compare Source
Refactor
v6.0.12Compare Source
Documentation
Refactor
v6.0.11Compare Source
Fixes
v6.0.10Compare Source
Refactor
v6.0.9Compare Source
Documentation
Refactor
v6.0.8Compare Source
Fixes
v6.0.7Compare Source
Documentation
Fixes
v6.0.6Compare Source
Refactor
Documentation
v6.0.5Compare Source
Refactor
Documentation
v6.0.4Compare Source
Refactor
v6.0.3Compare Source
Documentation
v6.0.2Compare Source
Documentation
v6.0.1Compare Source
Refactor
v6.0.0Compare Source
⚠ BREAKING CHANGES
Features
Refactor
Ed25519JWS Algorithm Identifier support (7a94cb9)v5.10.0Compare Source
Features
Ed25519algorithm identifier (c39f57d)Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.