|
9 | 9 | "repository": "jakobo/docmq.git", |
10 | 10 | "scripts": { |
11 | 11 | "bench": "node --loader=ts-node/esm ./scripts/run-benchmark.ts", |
12 | | - "build": "run-s clean 'build:all' 'pjson:all'", |
13 | | - "build:all": "run-p 'build:x:**'", |
14 | | - "build:x:cjs": "tsc -p tsconfig.cjs.json", |
15 | | - "build:x:esm": "tsc -p tsconfig.esm.json", |
16 | | - "build:x:types": "tsc -p tsconfig.types.json", |
| 12 | + "build": "run-s unbuild 'verify:*'", |
17 | 13 | "clean": "shx rm -rf dist && shx mkdir dist", |
18 | 14 | "dev": "run-s watch", |
19 | 15 | "lint": "eslint .", |
20 | 16 | "lint-staged": "lint-staged", |
21 | | - "pjson:all": "run-p 'pjson:x:**'", |
22 | | - "pjson:x:cjs": "shx echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json", |
23 | | - "pjson:x:esm": "shx echo '{\"type\": \"module\"}' > ./dist/esm/package.json", |
24 | 17 | "postinstall": "husky install", |
25 | 18 | "postpack": "pinst --enable", |
26 | 19 | "prepack": "pinst --disable", |
|
29 | 22 | "rev": "release-it --preRelease", |
30 | 23 | "syncpack": "syncpack", |
31 | 24 | "test": "ava", |
32 | | - "watch": "run-p 'watch:**'", |
33 | | - "watch:cjs": "tsc -p tsconfig.cjs.json -w --preserveWatchOutput", |
34 | | - "watch:esm": "tsc -p tsconfig.esm.json -w --preserveWatchOutput", |
35 | | - "watch:types": "tsc -p tsconfig.types.json -w --preserveWatchOutput" |
| 25 | + "unbuild": "unbuild", |
| 26 | + "verify:cjs": "cd verify/cjs && npm install && node cjs.verify.js", |
| 27 | + "verify:esm": "cd verify/esm && npm install && node esm.verify.js" |
36 | 28 | }, |
37 | 29 | "engines": { |
38 | 30 | "node": ">=14.19.0" |
|
84 | 76 | "testdouble": "^3.16.6", |
85 | 77 | "ts-node": "^10.8.1", |
86 | 78 | "tslib": "^2.4.0", |
87 | | - "typescript": "^4.7.3" |
| 79 | + "typescript": "^4.7.3", |
| 80 | + "unbuild": "latest" |
88 | 81 | }, |
89 | 82 | "peerDependencies": { |
90 | 83 | "mongodb": "^4.7.0", |
|
99 | 92 | } |
100 | 93 | }, |
101 | 94 | "type": "module", |
102 | | - "main": "dist/cjs/src/index.js", |
103 | | - "module": "dist/esm/src/index.js", |
104 | | - "types": "dist/types/src/index.d.ts", |
| 95 | + "main": "dist/index.cjs", |
| 96 | + "module": "dist/index.mjs", |
| 97 | + "types": "dist/index.d.ts", |
105 | 98 | "exports": { |
106 | | - "./package.json": "./package.json", |
107 | 99 | ".": { |
108 | | - "types": "./dist/types/src/index.d.ts", |
109 | | - "import": "./dist/esm/src/index.js", |
110 | | - "require": "./dist/cjs/src/index.js" |
| 100 | + "types": "./dist/index.d.ts", |
| 101 | + "import": "./dist/index.mjs", |
| 102 | + "require": "./dist/index.cjs", |
| 103 | + "file": "./src/index.ts" |
| 104 | + }, |
| 105 | + "./driver/mongo": { |
| 106 | + "types": "./dist/mongo.d.ts", |
| 107 | + "import": "./dist/mongo.mjs", |
| 108 | + "require": "./dist/mongo.cjs", |
| 109 | + "file": "./src/driver/mongo.ts" |
| 110 | + }, |
| 111 | + "./driver/loki": { |
| 112 | + "types": "./dist/loki.d.ts", |
| 113 | + "import": "./dist/loki.mjs", |
| 114 | + "require": "./dist/loki.cjs", |
| 115 | + "file": "./src/driver/loki.ts" |
| 116 | + }, |
| 117 | + "./driver/postgres": { |
| 118 | + "types": "./dist/postgres.d.ts", |
| 119 | + "import": "./dist/postgres.mjs", |
| 120 | + "require": "./dist/postgres.cjs", |
| 121 | + "file": "./src/driver/postgres.ts" |
111 | 122 | } |
112 | 123 | }, |
113 | 124 | "files": [ |
|
0 commit comments