Skip to content

Releases: auth0/jwt-decode

v4.0.0

27 Oct 09:40
3b2d105
Compare
Choose a tag to compare

A new version of the library, including a couple of improvements:

  • No longer include a polyfill for atob, as this is supported in all major browsers (and node environments > 14).
  • Compile to ES2017, dropping support for anything that does not support ES2017 (which should be very limited according to caniuse)
  • Use Node's atob when running on node.
  • Drop support for Node 14 and 16, add support for Node 20.
  • Add support for package.json's exports field, for better CJS/ESM support
  • Reorganize build artifacts for better CJS/ESM support (cjs and esm needs to be their own directory with a cjs specific package.json file)
  • Drop manual UMD bundle creation in index.standalone.ts, but rely on rollup instead.
  • Infer JwtPayload and JwtHeader default types from the header argument by using overloads.

Even though some users might experience breaking changes, mostly because of the exports field, the majority should be able to update without making any changes, assuming the SDK is used in environments with support for atob.

Migration to v4.0.0

The jwtDecode function is now no longer the default export, and is instead provided as a named export. Make sure to update your code in places where you are importing this function:

-import jwtDecodefrom "jwt-decode";
+import { jwtDecode } from "jwt-decode";

v4.0.0-beta.4

05 Sep 10:07
335ba5c
Compare
Choose a tag to compare
v4.0.0-beta.4 Pre-release
Pre-release

Breaking changes

Fixed

v4.0.0-beta.3

16 Aug 11:45
5ac1d00
Compare
Choose a tag to compare
v4.0.0-beta.3 Pre-release
Pre-release

Breaking changes

Changed

v4.0.0-beta.2

14 Aug 06:19
fe9e3c5
Compare
Choose a tag to compare
v4.0.0-beta.2 Pre-release
Pre-release

Changed

Fixed

  • Ensure types are bundled and correctly linked #174 (jonkoops)

v4.0.0-beta.1

29 Jul 10:56
fa904b3
Compare
Choose a tag to compare
v4.0.0-beta.1 Pre-release
Pre-release

Fixed

v4.0.0-beta.0

28 Jul 10:24
fa904b3
Compare
Choose a tag to compare
v4.0.0-beta.0 Pre-release
Pre-release

A new version of the library, including a couple of improvements:

  • No longer include a polyfill for atob, as this is supported in all major browsers (and node environments > 14).
  • Compile to ES2017, dropping support for anything that does not support ES2017 (which should be very limited according to caniuse)
  • Use Node's atob when running on node.
  • Drop support for Node 14, add support for Node 20.
  • Add support for package.json's exports field, for better CJS/ESM support
  • Reorganize build artifacts for better CJS/ESM support (cjs and esm needs to be their own directory with a cjs specific package.json file)
  • Drop manual UMD bundle creation in index.standalone.ts, but rely on rollup instead.
  • Infer JwtPayload and JwtHeader default types from the header argument by using overloads.

Additionally, this PR ensures the file size is decreased:

  • ESM and CJS decreased by 22%
  • UMD decreased by 37%

Even though some users might experience breaking changes, mostly because of the exports field, the majority should be able to update without making any changes, assuming the SDK is used in environments with support for atob.