⚠ BREAKING CHANGES
- All module named exports have moved from subpaths to just "jose". For example,
import { jwtVerify } from 'jose/jwt/verify'
is now justimport { 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 tocalculateJwkThumbprint
, nowimport { calculateJwkThumbprint } from 'jose'
- The deprecated
jose/jwk/parse
module was removed, useimport { importJWK } from 'jose'
instead. - The deprecated
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.
- All
import
statements,require()
, orimport()
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'
import * as errors from 'jose/util/errors'
// after (v4.x)
import { jwtVerify, SignJWT, errors } from 'jose'