jose 4.15.5 → 4.15.6

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.
Files changed (1) hide show
  1. package/package.json +74 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jose",
3
- "version": "4.15.5",
3
+ "version": "4.15.6",
4
4
  "description": "'JSON Web Almost Everything' - 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",
@@ -58,6 +58,22 @@
58
58
  "license": "MIT",
59
59
  "author": "Filip Skokan <panva.ip@gmail.com>",
60
60
  "sideEffects": false,
61
+ "imports": {
62
+ "#dist": {
63
+ "import": "./dist/node/esm/index.js",
64
+ "require": "./dist/node/cjs/index.js"
65
+ },
66
+ "#dist/*": {
67
+ "import": "./dist/node/esm/*.js",
68
+ "require": "./dist/node/cjs/*.js"
69
+ },
70
+ "#dist/webapi/*": {
71
+ "import": "./dist/browser/*.js"
72
+ },
73
+ "#dist/webapi": {
74
+ "import": "./dist/browser/index.js"
75
+ }
76
+ },
61
77
  "exports": {
62
78
  ".": {
63
79
  "types": "./dist/types/index.d.ts",
@@ -65,6 +81,7 @@
65
81
  "deno": "./dist/browser/index.js",
66
82
  "browser": "./dist/browser/index.js",
67
83
  "worker": "./dist/browser/index.js",
84
+ "workerd": "./dist/browser/index.js",
68
85
  "import": "./dist/node/esm/index.js",
69
86
  "require": "./dist/node/cjs/index.js"
70
87
  },
@@ -85,5 +102,61 @@
85
102
  "!dist/types/lib/*",
86
103
  "!dist/deno/**/*"
87
104
  ],
105
+ "scripts": {
106
+ "build": "tsc",
107
+ "build-all": "run-s clear build:*",
108
+ "build:browser": "run-s runtime-browser 'build -- -p ./tsconfig/browser.json' && echo '{\"type\": \"module\"}'> dist/browser/package.json",
109
+ "build:browser-bundle": "esbuild --bundle dist/browser/index.js --format=esm --target=es2018 --outfile=dist/browser/index.bundle.js",
110
+ "build:browser-bundle-min": "esbuild --minify --bundle dist/browser/index.js --format=esm --target=es2018 --outfile=dist/browser/index.bundle.min.js",
111
+ "build:browser-umd": "rollup dist/browser/index.bundle.js --format umd --name jose -o dist/browser/index.umd.js && rollup dist/browser/index.bundle.min.js --compact --format umd --name jose -o dist/browser/index.umd.min.js",
112
+ "build:deno": "npm run-script runtime-deno && find dist/deno -name '*.ts' -type f -print0 | xargs -0 sed -i.bak -e \"s/\\.js'/.ts'/g\" -e \"s/\\.d'/.d.ts'/g\" && npm run-script sedcleanup",
113
+ "build:types": "npm run-script build -- -p ./tsconfig/types.json && cd src && find . -name '*.d.ts' -maxdepth 2 -type f -exec rsync -R \"{}\" ../dist/types \\; && cd .. && run-s -s types:find | xargs -0 sed -i.bak -e \"s/\\.js'/'/g\" -e \"s/\\.d'/'/g\" && npm run-script sedcleanup",
114
+ "build:node-cjs": "run-s runtime-node 'build -- -p ./tsconfig/node-cjs.json'",
115
+ "build:node-esm": "run-s runtime-node 'build -- -p ./tsconfig/node-esm.json' && echo '{\"type\": \"module\"}'> dist/node/esm/package.json",
116
+ "clear": "rm -Rf dist",
117
+ "sedcleanup": "find . -name '*.bak' -type f -print0 | xargs -0 rm -f",
118
+ "docs:generate": "typedoc",
119
+ "runtime-browser": "run-s runtime:clear runtime:browser:* runtime:refs",
120
+ "runtime-deno": "npm run-script runtime-browser && mkdir -p dist/deno && cp -R src/. dist/deno && rm -R dist/deno/runtime/browser dist/deno/runtime/node",
121
+ "runtime-node": "run-s runtime:clear runtime:node:* runtime:refs",
122
+ "runtime:browser:copy": "cp ./src/runtime/browser/*.ts ./src/runtime",
123
+ "runtime:clear": "run-s -s runtime:find | xargs -0 rm -f",
124
+ "runtime:find": "find src/runtime -not -name '*.d.ts' -maxdepth 1 -type f -print0",
125
+ "types:find": "find dist/types -name '*.d.ts' -type f -print0",
126
+ "runtime:node:copy": "cp ./src/runtime/node/*.ts ./src/runtime",
127
+ "runtime:refs": "run-s -s runtime:find | xargs -0 sed -i.bak -e \"s/'\\.\\.\\//'\\.\\//g\" -e \"s/'\\.\\/\\.\\./'../g\" && npm run-script sedcleanup",
128
+ "test": "ava",
129
+ "test:types": "tsd -f test/types",
130
+ "format": "prettier --log-level silent --write ./test ./tap ./src ./tools ./cookbook",
131
+ "tap:browsers": "./tap/.browsers.sh",
132
+ "tap:bun": "./tap/.bun.sh",
133
+ "tap:deno": "./tap/.deno.sh",
134
+ "tap:edge-runtime": "./tap/.edge-runtime.sh",
135
+ "tap:electron": "./tap/.electron.sh",
136
+ "tap:node": "bash -c './tap/.node.sh'",
137
+ "tap:workerd": "./tap/.workerd.sh"
138
+ },
139
+ "devDependencies": {
140
+ "@types/node": "^18.18.5",
141
+ "@types/qunit": "^2.19.6",
142
+ "ava": "^5.3.1",
143
+ "edge-runtime": "^2.5.4",
144
+ "esbuild": "^0.19.4",
145
+ "glob": "^10.3.10",
146
+ "nock": "^13.3.4",
147
+ "npm-run-all2": "^6.1.1",
148
+ "patch-package": "^8.0.0",
149
+ "prettier": "^3.0.3",
150
+ "prettier-plugin-jsdoc": "^1.1.1",
151
+ "qunit": "^2.20.0",
152
+ "rollup": "^4.1.0",
153
+ "tar": "^6.2.0",
154
+ "timekeeper": "^2.3.1",
155
+ "tsd": "^0.29.0",
156
+ "typedoc": "^0.25.2",
157
+ "typedoc-plugin-markdown": "^3.16.0",
158
+ "typedoc-plugin-mdn-links": "^3.1.0",
159
+ "typescript": "^5.2.2"
160
+ },
88
161
  "deno": "./dist/browser/index.js"
89
162
  }