You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All module named exports have moved from subpaths to just "jose". For example, import { jwtVerify } from 'jose/jwt/verify' is now just import { jwtVerify } from 'jose'.
All submodule default exports and named have been removed in favour of just "jose" named exports.
typescript: remove repeated type re-exports
The undocumented jose/util/random was removed.
The jose/jwk/thumbprint named export is renamed to calculateJwkThumbprint, now import { calculateJwkThumbprint } from 'jose'
The deprecated jose/jwk/parse module was removed, use import { importJWK } from 'jose' instead.
The deprecated jose/jwk/from_key_like module was removed, use import { exportJWK } from 'jose' instead.
Migration Guide
Migrating from v3.x to v4.x is very straight forward.
All import statements, require(), or import() invocations should be changed to use just 'jose' as the target.
There are no more default exports. Everything was converted to a named export.
Refer to the documentation if you're not sure how a given module should be imported / required.
any custom resolvers targeting jose dist files for jest, typescript, or other tooling should be removed
// before (v3.x)import{jwtVerify}from'jose/jwt/verify'import{SignJWT}from'jose/jwt/sign'// after (v4.x)import{jwtVerify,SignJWT}from'jose'
This discussion was created from the release v4.0.0.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
⚠ BREAKING CHANGES
import { jwtVerify } from 'jose/jwt/verify'
is now justimport { jwtVerify } from 'jose'
.jose/util/random
was removed.jose/jwk/thumbprint
named export is renamed tocalculateJwkThumbprint
, nowimport { calculateJwkThumbprint } from 'jose'
jose/jwk/parse
module was removed, useimport { importJWK } from 'jose'
instead.jose/jwk/from_key_like
module was removed, useimport { exportJWK } from 'jose'
instead.Migration Guide
Migrating from v3.x to v4.x is very straight forward.
import
statements,require()
, orimport()
invocations should be changed to use just'jose'
as the target.jose
dist files for jest, typescript, or other tooling should be removedThis discussion was created from the release v4.0.0.
Beta Was this translation helpful? Give feedback.
All reactions