Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v4.0.0-beta.0 #165

Merged
merged 2 commits into from
Jul 28, 2023
Merged

Release v4.0.0-beta.0 #165

merged 2 commits into from
Jul 28, 2023

Conversation

frederikprijck
Copy link
Member

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.

@frederikprijck frederikprijck requested a review from a team as a code owner July 28, 2023 09:54
@frederikprijck frederikprijck marked this pull request as draft July 28, 2023 10:01
@frederikprijck frederikprijck marked this pull request as ready for review July 28, 2023 10:20
@frederikprijck frederikprijck merged commit d3abc82 into beta Jul 28, 2023
1 check passed
@frederikprijck frederikprijck deleted the prepare/release branch July 28, 2023 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants