jose 4.0.0
⚠ 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/randomwas removed. - The
jose/jwk/thumbprintnamed export is renamed tocalculateJwkThumbprint, nowimport { calculateJwkThumbprint } from 'jose' - The deprecated
jose/jwk/parsemodule was removed, useimport { importJWK } from 'jose'instead. - The deprecated
jose/jwk/from_key_likemodule was removed, useimport { exportJWK } from 'jose'instead.
Migration Guide
Migrating from v3.x to v4.x is very straight forward.
- All
importstatements,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
josedist 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'