|
15 | 15 | "url": "https://github.com/sponsors/tannerlinsley" |
16 | 16 | }, |
17 | 17 | "type": "module", |
18 | | - "main": "dist-cjs/index.js", |
19 | | - "module": "dist/index.js", |
20 | | - "types": "dist/index.d.ts", |
| 18 | + "types": "build/legacy/index.d.ts", |
| 19 | + "main": "build/legacy/index.cjs", |
| 20 | + "module": "build/legacy/index.js", |
21 | 21 | "sideEffects": false, |
22 | 22 | "files": [ |
23 | | - "dist", |
24 | | - "dist-cjs", |
25 | | - "src/**/*.ts", |
26 | | - "!src/tests/**/*" |
| 23 | + "build", |
| 24 | + "src", |
| 25 | + "!src/tests" |
27 | 26 | ], |
28 | 27 | "exports": { |
29 | 28 | ".": { |
30 | 29 | "@tanstack/custom-condition": "./src/index.ts", |
31 | 30 | "import": { |
32 | | - "types": "./dist/index.d.ts", |
33 | | - "default": "./dist/index.js" |
| 31 | + "types": "./build/modern/index.d.ts", |
| 32 | + "default": "./build/modern/index.js" |
34 | 33 | }, |
35 | 34 | "require": { |
36 | | - "types": "./dist-cjs/index.d.cts", |
37 | | - "default": "./dist-cjs/index.js" |
38 | | - }, |
39 | | - "default": "./dist/index.js" |
| 35 | + "types": "./build/modern/index.d.cts", |
| 36 | + "default": "./build/modern/index.cjs" |
| 37 | + } |
40 | 38 | }, |
41 | 39 | "./package.json": "./package.json" |
42 | 40 | }, |
43 | 41 | "scripts": { |
| 42 | + "clean": "premove ./build ./coverage", |
44 | 43 | "compile": "node ../../node_modules/typescript/lib/tsc.js --build", |
45 | | - "build:deps": "pnpm --dir ../query-core run build", |
46 | | - "build": "pnpm run build:deps && pnpm run build:esm && pnpm run build:cjs", |
47 | | - "build:esm": "node ../../node_modules/typescript/lib/tsc.js -p tsconfig.build.json", |
48 | | - "build:cjs": "node -e \"require('node:fs').rmSync('dist-cjs', { recursive: true, force: true })\" && node ../../node_modules/typescript/lib/tsc.js -p tsconfig.build.cjs.json && node scripts/write-cjs-package.mjs", |
| 44 | + "build": "tsup --tsconfig tsconfig.prod.json", |
49 | 45 | "test:types": "node ../../node_modules/typescript/lib/tsc.js --noEmit", |
50 | 46 | "test:eslint": "eslint .", |
51 | 47 | "lint:fix": "eslint . --fix", |
52 | 48 | "test:lib": "vitest run", |
53 | 49 | "test:lib:dev": "vitest", |
54 | 50 | "test:watch": "pnpm run test:lib:dev", |
55 | | - "test:build": "publint --strict && attw --pack && node scripts/check-cjs-types-smoke.mjs", |
| 51 | + "test:build": "publint --strict && attw --pack", |
56 | 52 | "measure:bundle": "pnpm run build && node scripts/measure-bundle.mjs", |
57 | 53 | "measure:bundle:raw": "node scripts/measure-bundle.mjs", |
58 | 54 | "perf:l3": "pnpm run build && node scripts/l3-stress.mjs", |
|
0 commit comments