@atproto/jwk 0.6.0 → 0.7.0-next.0

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/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@atproto/jwk",
3
- "version": "0.6.0",
3
+ "version": "0.7.0-next.0",
4
+ "engines": {
5
+ "node": ">=22"
6
+ },
4
7
  "license": "MIT",
5
8
  "description": "A library for working with JSON Web Keys (JWKs) in TypeScript. This is meant to be extended by environment-specific libraries like @atproto/jwk-jose.",
6
9
  "keywords": [
@@ -16,9 +19,7 @@
16
19
  "url": "https://github.com/bluesky-social/atproto",
17
20
  "directory": "packages/oauth/jwk"
18
21
  },
19
- "type": "commonjs",
20
- "main": "dist/index.js",
21
- "types": "dist/index.d.ts",
22
+ "type": "module",
22
23
  "exports": {
23
24
  ".": {
24
25
  "types": "./dist/index.d.ts",
@@ -26,11 +27,11 @@
26
27
  }
27
28
  },
28
29
  "dependencies": {
29
- "multiformats": "^9.9.0",
30
+ "multiformats": "^13.0.0",
30
31
  "zod": "^3.23.8"
31
32
  },
32
33
  "devDependencies": {
33
- "typescript": "^5.6.3"
34
+ "typescript": "^6.0.3"
34
35
  },
35
36
  "scripts": {
36
37
  "build": "tsc --build tsconfig.build.json"
package/src/jwk.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod'
2
- import { isLastOccurrence } from './util'
2
+ import { isLastOccurrence } from './util.js'
3
3
 
4
4
  export const PUBLIC_KEY_USAGE = ['verify', 'encrypt', 'wrapKey'] as const
5
5
  export const publicKeyUsageSchema = z.enum(PUBLIC_KEY_USAGE)
package/src/util.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { base64url } from 'multiformats/bases/base64'
2
2
  import { RefinementCtx, ZodIssueCode } from 'zod'
3
3
 
4
- // eslint-disable-next-line @typescript-eslint/ban-types
5
4
  export type Simplify<T> = { [K in keyof T]: T[K] } & {}
6
5
  export type Override<T, V> = Simplify<V & Omit<T, keyof V>>
7
6
 
@@ -26,6 +25,7 @@ export const preferredOrderCmp =
26
25
  return aIdx - bIdx
27
26
  }
28
27
 
28
+ /* eslint-disable @typescript-eslint/no-unused-vars -- `v` is used at runtime in the returned type guards; v8 false-positive */
29
29
  export function matchesAny<T extends string | number | symbol | boolean>(
30
30
  value: null | undefined | T | readonly T[],
31
31
  ): (v: unknown) => v is T {
@@ -35,6 +35,7 @@ export function matchesAny<T extends string | number | symbol | boolean>(
35
35
  ? (v): v is T => value.includes(v)
36
36
  : (v): v is T => v === value
37
37
  }
38
+ /* eslint-enable @typescript-eslint/no-unused-vars */
38
39
 
39
40
  /**
40
41
  * Decorator to cache the result of a getter on a class instance.
@@ -1 +1 @@
1
- {"root":["./src/alg.ts","./src/errors.ts","./src/index.ts","./src/jwk.ts","./src/jwks.ts","./src/jwt-decode.ts","./src/jwt-verify.ts","./src/jwt.ts","./src/key.ts","./src/keyset.ts","./src/util.ts"],"version":"5.8.2"}
1
+ {"root":["./src/alg.ts","./src/errors.ts","./src/index.ts","./src/jwk.ts","./src/jwks.ts","./src/jwt-decode.ts","./src/jwt-verify.ts","./src/jwt.ts","./src/key.ts","./src/keyset.ts","./src/util.ts"],"version":"6.0.3"}