Skip to content

Commit bd50db0

Browse files
Release v4.0.0 (#232)
1 parent bcfd7da commit bd50db0

4 files changed

Lines changed: 26 additions & 4 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ jobs:
3333
run: npm run build
3434

3535
- name: Publish release to NPM
36-
run: npm publish --tag beta
36+
run: npm publish
3737
env:
3838
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Change log
22

3+
## Version [4.0.0](https://github.com/auth0/jwt-decode/releases/tag/v4.0.0)
4+
5+
[Full Changelog](https://github.com/auth0/jwt-decode/compare/v3.1.2..v4.0.0)
6+
7+
A new version of the library, including a couple of improvements:
8+
9+
- No longer include a polyfill for [atob](https://developer.mozilla.org/en-US/docs/Web/API/atob), as this is [supported in all major browsers](https://caniuse.com/?search=atob) (and [node environments > 14](https://developer.mozilla.org/en-US/docs/Web/API/atob#browser_compatibility)).
10+
- Compile to ES2017, dropping support for anything that does not support ES2017 (which should be very limited [according to caniuse](https://caniuse.com/?search=es2017))
11+
- Use Node's atob when running on node.
12+
- Drop support for Node 14 and 16, add support for Node 20.
13+
- Add support for package.json's `exports` field, for better CJS/ESM support
14+
- Reorganize build artifacts for better CJS/ESM support (cjs and esm needs to be their own directory with a cjs specific package.json file)
15+
- Drop manual UMD bundle creation in `index.standalone.ts`, but rely on rollup instead.
16+
- Infer JwtPayload and JwtHeader default types from the `header` argument by using overloads.
17+
18+
**Additionally, this PR ensures the file size is decreased:**
19+
20+
- **ESM and CJS decreased by 22%**
21+
- **UMD decreased by 37%**
22+
23+
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`.
24+
325
## Version [4.0.0-beta.4](https://github.com/auth0/jwt-decode/releases/tag/v4.0.0-beta.4)
426

527
[Full Changelog](https://github.com/auth0/jwt-decode/compare/v4.0.0-beta.3..v4.0.0-beta.4)

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jwt-decode",
3-
"version": "4.0.0-beta.4",
3+
"version": "4.0.0",
44
"description": "Decode JWT tokens, mostly useful for browser applications.",
55
"type": "module",
66
"main": "build/cjs/index.js",

0 commit comments

Comments
 (0)