jose 6.0.10 → 6.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -118,10 +118,10 @@ Please note that certain algorithms may not be available depending on the runtim
118
118
 
119
119
  | Version | Security Fixes 🔑 | Other Bug Fixes 🐞 | New Features ⭐ | Runtime and Module type |
120
120
  | ----------------------------------------------- | ----------------- | ------------------ | --------------- | ------------------------------- |
121
- | [v6.x](https://github.com/panva/jose/tree/v6.x) | ✅ | ✅ | ✅ | Universal[^universal] ESM[^cjs] |
122
- | [v5.x](https://github.com/panva/jose/tree/v5.x) | ✅ | ❌ | ❌ | Universal[^universal] CJS + ESM |
123
- | [v4.x](https://github.com/panva/jose/tree/v4.x) | ✅ | ❌ | ❌ | Universal[^universal] CJS + ESM |
124
- | [v2.x](https://github.com/panva/jose/tree/v2.x) | ✅ | ❌ | ❌ | Node.js CJS |
121
+ | [v6.x](https://github.com/panva/jose/tree/v6.x) | [Security Policy] | ✅ | ✅ | Universal[^universal] ESM[^cjs] |
122
+ | [v5.x](https://github.com/panva/jose/tree/v5.x) | [Security Policy] | ❌ | ❌ | Universal[^universal] CJS + ESM |
123
+ | [v4.x](https://github.com/panva/jose/tree/v4.x) | [Security Policy] | ❌ | ❌ | Universal[^universal] CJS + ESM |
124
+ | [v2.x](https://github.com/panva/jose/tree/v2.x) | [Security Policy] | ❌ | ❌ | Node.js CJS |
125
125
 
126
126
  ## Specifications
127
127
 
@@ -145,7 +145,8 @@ The algorithm implementations in `jose` have been tested using test vectors from
145
145
  [sponsor-auth0]: https://a0.to/signup/panva
146
146
  [WebCryptoAPI]: https://w3c.github.io/webcrypto/
147
147
  [Fetch API]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
148
+ [Security Policy]: https://github.com/panva/jose/security/policy
148
149
 
149
- [^cjs]: CJS style `let jose = require('jose')` is possible in Node.js versions where `process.features.require_module` is `true` by default (^20.19.0 || ^22.12.0 || >= 23.0.0) or with the `--experimental-require-module` Node.js CLI flag.
150
+ [^cjs]: CJS style `let jose = require('jose')` is possible in Node.js versions where the `require(esm)` feature is enabled by default (^20.19.0 || ^22.12.0 || >= 23.0.0).
150
151
 
151
152
  [^universal]: Assumes runtime support of [WebCryptoAPI][] and [Fetch API][]
@@ -9,7 +9,7 @@ function isCloudflareWorkers() {
9
9
  let USER_AGENT;
10
10
  if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) {
11
11
  const NAME = 'jose';
12
- const VERSION = 'v6.0.10';
12
+ const VERSION = 'v6.0.11';
13
13
  USER_AGENT = `${NAME}/${VERSION}`;
14
14
  }
15
15
  export const customFetch = Symbol();
@@ -10,7 +10,12 @@ function validateInput(label, input) {
10
10
  }
11
11
  return input;
12
12
  }
13
- const normalizeTyp = (value) => value.toLowerCase().replace(/^application\//, '');
13
+ const normalizeTyp = (value) => {
14
+ if (value.includes('/')) {
15
+ return value.toLowerCase();
16
+ }
17
+ return `application/${value.toLowerCase()}`;
18
+ };
14
19
  const checkAudiencePresence = (audPayload, audOption) => {
15
20
  if (typeof audPayload === 'string') {
16
21
  return audOption.includes(audPayload);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jose",
3
- "version": "6.0.10",
3
+ "version": "6.0.11",
4
4
  "description": "JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, Bun, and other Web-interoperable runtimes",
5
5
  "keywords": [
6
6
  "browser",