|
19 | 19 | "author": "fengmk2 <[email protected]> (https://github.com/fengmk2)", |
20 | 20 | "homepage": "https://github.com/node-modules/urllib", |
21 | 21 | "type": "module", |
| 22 | + "tshy": { |
| 23 | + "exports": { |
| 24 | + ".": "./src/index.ts", |
| 25 | + "./package.json": "./package.json" |
| 26 | + } |
| 27 | + }, |
22 | 28 | "exports": { |
23 | 29 | ".": { |
24 | 30 | "import": { |
25 | | - "types": "./src/esm/index.d.ts", |
26 | | - "default": "./src/esm/index.js" |
| 31 | + "types": "./dist/esm/index.d.ts", |
| 32 | + "default": "./dist/esm/index.js" |
27 | 33 | }, |
28 | 34 | "require": { |
29 | | - "types": "./src/cjs/index.d.ts", |
30 | | - "default": "./src/cjs/index.js" |
| 35 | + "types": "./dist/commonjs/index.d.ts", |
| 36 | + "default": "./dist/commonjs/index.js" |
31 | 37 | } |
32 | | - } |
| 38 | + }, |
| 39 | + "./package.json": "./package.json" |
33 | 40 | }, |
34 | | - "types": "./src/esm/index.d.ts", |
35 | | - "main": "./src/cjs/index.js", |
| 41 | + "typings": "./dist/commonjs/index.d.ts", |
36 | 42 | "files": [ |
| 43 | + "dist", |
37 | 44 | "src" |
38 | 45 | ], |
39 | 46 | "repository": { |
|
43 | 50 | "scripts": { |
44 | 51 | "lint": "eslint src test --ext .ts --cache", |
45 | 52 | "prebuild": "npm run clean", |
46 | | - "build": "tsc --version && npm run build:cjs && npm run build:esm && npm run build:version", |
47 | | - "postbuild": "rm -rf src/*.tsbuildinfo", |
48 | | - "build:cjs": "tsc -p ./tsconfig.build.cjs.json", |
49 | | - "build:esm": "tsc -p ./tsconfig.build.esm.json && node ./scripts/esm_import_fix.js", |
| 53 | + "build": "tsc --version && tshy && npm run build:version", |
| 54 | + "postbuild": "rm -rf *.tsbuildinfo", |
50 | 55 | "build:version": "node ./scripts/replace_urllib_version.js", |
51 | 56 | "build:cjs:test": "cd test/cjs && rm -rf node_modules && npm link ../.. && node index.js", |
52 | 57 | "build:esm:test": "cd test/esm && rm -rf node_modules && npm link ../.. && node index.js", |
53 | 58 | "build:mts:test": "cd test/mts && rm -rf node_modules && npm link ../.. && tsc", |
54 | 59 | "build:test": "npm run build && npm run build:cjs:test && npm run build:esm:test && npm run build:mts:test && npm run test-tsc", |
55 | | - "test-tsc": "npm run test-tsc:cjs", |
56 | | - "test-tsc:cjs": "tsc -p ./test/fixtures/ts/tsconfig.json", |
57 | | - "test-tsc:esm": "tsc -p ./test/fixtures/ts-esm/tsconfig.json", |
| 60 | + "test-tsc": "npm run test-tsc:cjs && npm run test-tsc:esm", |
| 61 | + "test-tsc:cjs": "cd test/fixtures/ts && rm -rf node_modules && npm link ../../.. && npm run build", |
| 62 | + "test-tsc:esm": "cd test/fixtures/ts-esm && rm -rf node_modules && npm link ../../.. && npm run build", |
58 | 63 | "test": "npm run lint && vitest run", |
59 | 64 | "test-keepalive": "cross-env TEST_KEEPALIVE_COUNT=50 vitest run --test-timeout 180000 keep-alive-header.test.ts", |
60 | 65 | "cov": "vitest run --coverage", |
61 | | - "ci": "npm run lint && npm run cov && npm run build:test", |
| 66 | + "ci": "npm run lint && npm run cov && node scripts/build_test.js", |
62 | 67 | "contributor": "git-contributor", |
63 | | - "clean": "rm -rf src/*.tsbuildinfo src/cjs/*.ts src/cjs/*.js src/esm/*.ts src/esm/*.js", |
| 68 | + "clean": "rm -rf dist", |
64 | 69 | "prepublishOnly": "npm run build" |
65 | 70 | }, |
66 | 71 | "dependencies": { |
|
76 | 81 | "ylru": "^1.3.2" |
77 | 82 | }, |
78 | 83 | "devDependencies": { |
| 84 | + "@tsconfig/node18": "^18.2.1", |
| 85 | + "@tsconfig/strictest": "^2.0.2", |
79 | 86 | "@types/busboy": "^1.5.0", |
80 | 87 | "@types/default-user-agent": "^1.0.0", |
81 | 88 | "@types/mime-types": "^2.1.1", |
|
85 | 92 | "@types/selfsigned": "^2.0.1", |
86 | 93 | "@types/tar-stream": "^2.2.2", |
87 | 94 | "@vitest/coverage-v8": "^0.32.0", |
88 | | - "@tsconfig/node18": "^18.2.1", |
89 | | - "@tsconfig/strictest": "^2.0.2", |
90 | 95 | "busboy": "^1.6.0", |
91 | 96 | "cross-env": "^7.0.3", |
92 | 97 | "eslint": "^8.25.0", |
|
96 | 101 | "proxy": "^1.0.2", |
97 | 102 | "selfsigned": "^2.0.1", |
98 | 103 | "tar-stream": "^2.2.0", |
| 104 | + "tshy": "^1.0.0-3", |
99 | 105 | "typescript": "^5.0.4", |
100 | 106 | "vitest": "^0.32.0" |
101 | 107 | }, |
|
0 commit comments