|
11 | 11 | "engines": { |
12 | 12 | "node": ">=18" |
13 | 13 | }, |
14 | | - "typings": "lib/index.d.ts", |
| 14 | + "type": "module", |
| 15 | + "main": "./lib/index.cjs", |
| 16 | + "module": "./lib/index.js", |
| 17 | + "types": "./lib/index.d.ts", |
15 | 18 | "files": [ |
16 | | - "lib/" |
| 19 | + "lib/", |
| 20 | + "package.json" |
17 | 21 | ], |
18 | 22 | "repository": { |
19 | 23 | "type": "git", |
|
24 | 28 | }, |
25 | 29 | "scripts": { |
26 | 30 | "clean": "rm -rf lib", |
27 | | - "build": "tsc -p .", |
| 31 | + "build": "tsup", |
| 32 | + "build:watch": "tsup --watch", |
28 | 33 | "lint": "eslint", |
29 | 34 | "test": "jest", |
30 | 35 | "test:watch": "jest --watch", |
|
45 | 50 | "@babel/preset-env": "^7.26.9", |
46 | 51 | "@babel/preset-typescript": "^7.27.0", |
47 | 52 | "@eslint/js": "^9.21.0", |
48 | | - "@peculiar/webcrypto": "^1.4.5", |
49 | 53 | "@types/cookie": "^0.6.0", |
50 | 54 | "@types/jest": "^29.5.14", |
51 | 55 | "@types/node": "~18", |
|
62 | 66 | "prettier": "^3.5.3", |
63 | 67 | "supertest": "7.1.0", |
64 | 68 | "ts-jest": "29.3.1", |
| 69 | + "tsup": "^8.5.0", |
65 | 70 | "typescript": "5.8.2", |
66 | 71 | "typescript-eslint": "^8.25.0" |
67 | 72 | }, |
68 | 73 | "exports": { |
69 | | - "types": "./lib/index.d.ts", |
70 | | - "workerd": { |
71 | | - "import": "./lib/index.worker.js", |
72 | | - "default": "./lib/index.worker.js" |
| 74 | + ".": { |
| 75 | + "types": "./lib/index.d.ts", |
| 76 | + "workerd": { |
| 77 | + "import": "./lib/index.worker.js", |
| 78 | + "require": "./lib/index.worker.cjs" |
| 79 | + }, |
| 80 | + "edge-light": { |
| 81 | + "import": "./lib/index.worker.js", |
| 82 | + "require": "./lib/index.worker.cjs" |
| 83 | + }, |
| 84 | + "import": "./lib/index.js", |
| 85 | + "require": "./lib/index.cjs", |
| 86 | + "default": "./lib/index.js" |
73 | 87 | }, |
74 | | - "edge-light": { |
| 88 | + "./worker": { |
| 89 | + "types": "./lib/index.worker.d.ts", |
75 | 90 | "import": "./lib/index.worker.js", |
| 91 | + "require": "./lib/index.worker.cjs", |
76 | 92 | "default": "./lib/index.worker.js" |
77 | 93 | }, |
78 | | - "default": { |
79 | | - "import": "./lib/index.js", |
80 | | - "default": "./lib/index.js" |
81 | | - } |
| 94 | + "./package.json": "./package.json" |
82 | 95 | } |
83 | 96 | } |
0 commit comments