Packages

jose

6.2.18 · 18 Nov 2026MIT244.2M / weekRepositorynpmAtom feed

Your version

4.0.0

major14 Oct 2021Where it was published

4.15.9 is the newest release of 4.x.

In short

10 breaking1 internal

  • Breaking

    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'.

  • Breaking

    All submodule default exports and named have been removed in favour of just "jose" named exports.

  • Breaking

    typescript: remove repeated type re-exports

  • Breaking

    The undocumented jose/util/random was removed.

  • Breaking

    The jose/jwk/thumbprint named export is renamed to calculateJwkThumbprint, now import { calculateJwkThumbprint } from 'jose'

  • Breaking

    The deprecated jose/jwk/parse module was removed, use import { importJWK } from 'jose' instead.

  • Breaking

    The deprecated jose/jwk/from_key_like module was removed, use import { exportJWK } from 'jose' instead.

  • Breaking

    All import statements, require(), or import() invocations should be changed to use just 'jose' as the target.

Security

2 advisories affect 4.0.0; 4.15.5 fixes them

Release note

Breaking changes

  • Breaking

    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'.

  • Breaking

    All submodule default exports and named have been removed in favour of just "jose" named exports.

  • Breaking

    typescript: remove repeated type re-exports

  • Breaking

    The undocumented jose/util/random was removed.

  • Breaking

    The jose/jwk/thumbprint named export is renamed to calculateJwkThumbprint, now import { calculateJwkThumbprint } from 'jose'

  • Breaking

    The deprecated jose/jwk/parse module was removed, use import { importJWK } from 'jose' instead.

  • Breaking

    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.

  1. Breaking

    All import statements, require(), or import() invocations should be changed to use just 'jose' as the target.

  2. Breaking

    There are no more default exports. Everything was converted to a named export.

  3. Breaking

    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'

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.