|
2 | 2 | "name": "typescript-library-starter",
|
3 | 3 | "version": "0.0.0",
|
4 | 4 | "description": "A starter template for TypeScript libraries ready to be published to npm.",
|
5 |
| - "main": "dist/index.cjs", |
6 |
| - "module": "dist/index.mjs", |
| 5 | + "main": "dist/index.js", |
| 6 | + "module": "dist/index.js", |
| 7 | + "exports": { |
| 8 | + ".": { |
| 9 | + "import": "./dist/index.js", |
| 10 | + "types": "./dist/index.d.ts" |
| 11 | + } |
| 12 | + }, |
7 | 13 | "types": "dist/index.d.ts",
|
8 | 14 | "type": "module",
|
| 15 | + "files": ["dist"], |
9 | 16 | "scripts": {
|
10 |
| - "build": "pnpm clean && rollup -c --bundleConfigAsCjs", |
| 17 | + "build": "pnpm clean && tsc", |
11 | 18 | "clean": "rimraf dist",
|
12 |
| - "test": "jest --maxWorkers=50%", |
13 |
| - "test:watch": "jest --watch", |
14 |
| - "test:ci": "jest --runInBand", |
15 |
| - "test:coverage": "jest --coverage", |
16 |
| - "test:changed": "jest --onlyChanged", |
17 | 19 | "format": "biome format --write",
|
18 | 20 | "lint": "biome check --fix",
|
19 | 21 | "lint:staged": "lint-staged",
|
20 | 22 | "changeset": "changeset",
|
21 | 23 | "changeset:version": "changeset version",
|
22 | 24 | "changeset:publish": "pnpm build && changeset publish",
|
23 | 25 | "prepare": "npx simple-git-hooks",
|
24 |
| - "typecheck": "tsc --noEmit" |
| 26 | + "typecheck": "tsc --noEmit", |
| 27 | + "test": "vitest", |
| 28 | + "test:watch": "vitest --watch", |
| 29 | + "test:coverage": "vitest run --coverage" |
25 | 30 | },
|
26 | 31 | "devDependencies": {
|
27 | 32 | "@biomejs/biome": "1.9.4",
|
28 | 33 | "@changesets/changelog-github": "^0.5.0",
|
29 |
| - "@changesets/cli": "^2.27.9", |
30 |
| - "@rollup/plugin-commonjs": "^28.0.0", |
31 |
| - "@rollup/plugin-node-resolve": "^15.3.0", |
32 |
| - "@rollup/plugin-terser": "^0.4.4", |
33 |
| - "@rollup/plugin-typescript": "^12.1.0", |
34 |
| - "@types/jest": "^29.5.13", |
35 |
| - "@types/node": "^22.7.5", |
36 |
| - "jest": "^29.7.0", |
| 34 | + "@changesets/cli": "^2.27.10", |
| 35 | + "@types/node": "^22.9.1", |
| 36 | + "@vitest/coverage-v8": "2.1.5", |
37 | 37 | "lint-staged": "^15.2.10",
|
38 | 38 | "rimraf": "^6.0.1",
|
39 |
| - "rollup": "^4.24.0", |
40 | 39 | "simple-git-hooks": "^2.11.1",
|
41 |
| - "ts-jest": "^29.2.5", |
42 | 40 | "ts-node": "^10.9.2",
|
43 |
| - "tslib": "^2.7.0", |
44 |
| - "typescript": "^5.6.2" |
| 41 | + "tslib": "^2.8.1", |
| 42 | + "typescript": "^5.6.3", |
| 43 | + "vitest": "^2.1.5" |
45 | 44 | },
|
46 | 45 | "peerDependencies": {
|
47 | 46 | "typescript": ">=5.0.4"
|
|
51 | 50 | "optional": true
|
52 | 51 | }
|
53 | 52 | },
|
54 |
| - "files": ["dist", "src"], |
55 |
| - "exports": { |
56 |
| - ".": { |
57 |
| - "import": "./dist/index.mjs", |
58 |
| - "require": "./dist/index.cjs", |
59 |
| - "types": "./dist/index.d.ts" |
60 |
| - } |
61 |
| - }, |
62 |
| - "keywords": [ |
63 |
| - "typescript", |
64 |
| - "library", |
65 |
| - "starter", |
66 |
| - "template", |
67 |
| - "npm", |
68 |
| - "publish", |
69 |
| - "rollup", |
70 |
| - "jest", |
71 |
| - "biome", |
72 |
| - "terser" |
73 |
| - ], |
| 53 | + "keywords": ["typescript", "library", "starter", "template", "npm", "biome"], |
74 | 54 | "author": "Sohab Sk",
|
75 | 55 | "license": "MIT",
|
76 | 56 | "repository": {
|
|
83 | 63 | "*": ["pnpm lint", "git add"]
|
84 | 64 | },
|
85 | 65 | "simple-git-hooks": {
|
86 |
| - "pre-commit": "pnpm typecheck && pnpm test:ci && pnpm lint:staged" |
| 66 | + "pre-commit": "pnpm typecheck && pnpm test:coverage && pnpm lint:staged" |
87 | 67 | },
|
88 | 68 | "packageManager": "pnpm@9.12.0",
|
89 | 69 | "engines": {
|
90 | 70 | "node": ">=20.0.0"
|
91 |
| - } |
| 71 | + }, |
| 72 | + "sideEffects": false |
92 | 73 | }
|
0 commit comments