|
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", |
|
48 | 53 | "@babel/preset-env": "^7.26.9", |
49 | 54 | "@babel/preset-typescript": "^7.27.0", |
50 | 55 | "@eslint/js": "^9.21.0", |
51 | | - "@peculiar/webcrypto": "^1.4.5", |
52 | 56 | "@types/cookie": "^0.6.0", |
53 | 57 | "@types/jest": "^29.5.14", |
54 | 58 | "@types/node": "~18", |
|
65 | 69 | "prettier": "^3.5.3", |
66 | 70 | "supertest": "7.1.0", |
67 | 71 | "ts-jest": "29.3.1", |
| 72 | + "tsup": "^8.5.0", |
68 | 73 | "typescript": "5.8.2", |
69 | 74 | "typescript-eslint": "^8.25.0" |
70 | 75 | }, |
71 | 76 | "exports": { |
72 | | - "types": "./lib/index.d.ts", |
73 | | - "workerd": { |
74 | | - "import": "./lib/index.worker.js", |
75 | | - "default": "./lib/index.worker.js" |
| 77 | + ".": { |
| 78 | + "types": "./lib/index.d.ts", |
| 79 | + "workerd": { |
| 80 | + "import": "./lib/index.worker.js", |
| 81 | + "require": "./lib/index.worker.cjs" |
| 82 | + }, |
| 83 | + "edge-light": { |
| 84 | + "import": "./lib/index.worker.js", |
| 85 | + "require": "./lib/index.worker.cjs" |
| 86 | + }, |
| 87 | + "import": "./lib/index.js", |
| 88 | + "require": "./lib/index.cjs", |
| 89 | + "default": "./lib/index.js" |
76 | 90 | }, |
77 | | - "edge-light": { |
| 91 | + "./worker": { |
| 92 | + "types": "./lib/index.worker.d.ts", |
78 | 93 | "import": "./lib/index.worker.js", |
| 94 | + "require": "./lib/index.worker.cjs", |
79 | 95 | "default": "./lib/index.worker.js" |
80 | 96 | }, |
81 | | - "default": { |
82 | | - "import": "./lib/index.js", |
83 | | - "default": "./lib/index.js" |
84 | | - } |
| 97 | + "./package.json": "./package.json" |
85 | 98 | } |
86 | 99 | } |
0 commit comments