|
15 | 15 | "engines": { |
16 | 16 | "node": ">=18" |
17 | 17 | }, |
18 | | - "typings": "lib/index.d.ts", |
| 18 | + "type": "module", |
| 19 | + "main": "./lib/index.cjs", |
| 20 | + "module": "./lib/index.js", |
| 21 | + "types": "./lib/index.d.ts", |
19 | 22 | "files": [ |
20 | | - "lib/" |
| 23 | + "lib/", |
| 24 | + "package.json" |
21 | 25 | ], |
22 | 26 | "repository": { |
23 | 27 | "type": "git", |
|
28 | 32 | }, |
29 | 33 | "scripts": { |
30 | 34 | "clean": "rm -rf lib", |
31 | | - "build": "tsc -p .", |
| 35 | + "build": "tsup", |
| 36 | + "build:watch": "tsup --watch", |
32 | 37 | "lint": "eslint", |
33 | 38 | "test": "jest", |
34 | 39 | "test:watch": "jest --watch", |
35 | 40 | "test:worker": "jest src/worker.spec.ts", |
36 | 41 | "prettier": "prettier \"src/**/*.{js,ts,tsx}\" --check", |
37 | 42 | "format": "prettier \"src/**/*.{js,ts,tsx}\" --write", |
38 | | - "prepublishOnly": "yarn run build" |
| 43 | + "prepublishOnly": "npm run build" |
39 | 44 | }, |
40 | 45 | "dependencies": { |
41 | 46 | "iron-session": "^8.0.4", |
|
49 | 54 | "@babel/preset-env": "^7.26.9", |
50 | 55 | "@babel/preset-typescript": "^7.27.0", |
51 | 56 | "@eslint/js": "^9.21.0", |
52 | | - "@peculiar/webcrypto": "^1.4.5", |
53 | 57 | "@types/cookie": "^0.6.0", |
54 | 58 | "@types/jest": "^29.5.14", |
55 | 59 | "@types/node": "~18", |
|
66 | 70 | "prettier": "^3.5.3", |
67 | 71 | "supertest": "7.1.0", |
68 | 72 | "ts-jest": "29.3.1", |
| 73 | + "tsup": "^8.5.0", |
69 | 74 | "typescript": "5.8.2", |
70 | 75 | "typescript-eslint": "^8.25.0" |
71 | 76 | }, |
72 | 77 | "exports": { |
73 | | - "types": "./lib/index.d.ts", |
74 | | - "workerd": { |
75 | | - "import": "./lib/index.worker.js", |
76 | | - "default": "./lib/index.worker.js" |
| 78 | + ".": { |
| 79 | + "types": "./lib/index.d.ts", |
| 80 | + "workerd": { |
| 81 | + "import": "./lib/index.worker.js", |
| 82 | + "require": "./lib/index.worker.cjs" |
| 83 | + }, |
| 84 | + "edge-light": { |
| 85 | + "import": "./lib/index.worker.js", |
| 86 | + "require": "./lib/index.worker.cjs" |
| 87 | + }, |
| 88 | + "import": "./lib/index.js", |
| 89 | + "require": "./lib/index.cjs", |
| 90 | + "default": "./lib/index.js" |
77 | 91 | }, |
78 | | - "edge-light": { |
| 92 | + "./worker": { |
| 93 | + "types": "./lib/index.worker.d.ts", |
79 | 94 | "import": "./lib/index.worker.js", |
| 95 | + "require": "./lib/index.worker.cjs", |
80 | 96 | "default": "./lib/index.worker.js" |
81 | 97 | }, |
82 | | - "default": { |
83 | | - "import": "./lib/index.js", |
84 | | - "default": "./lib/index.js" |
85 | | - } |
| 98 | + "./package.json": "./package.json" |
86 | 99 | } |
87 | 100 | } |
0 commit comments