Skip to content

Commit ee2208e

Browse files
cmdcolinclaude
andcommitted
Standardize package.json, tsconfig, and build pipeline
- Simplified exports and removed redundant types declarations - Standardized build scripts to use pnpm consistently - Added main field for backwards compatibility - Removed redundant module field - Standardized tsconfig with strict TypeScript and es2022 target - Fixed type errors and infrastructure issues where applicable Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent a89f12b commit ee2208e

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"license": "Apache-2.0",
55
"type": "module",
66
"main": "dist/index.js",
7-
"module": "esm/index.js",
87
"exports": {
98
"import": "./esm/index.js",
109
"require": "./dist/index.js"
@@ -16,16 +15,16 @@
1615
],
1716
"scripts": {
1817
"test": "vitest",
19-
"lint": "eslint --report-unused-disable-directives --max-warnings 0",
2018
"clean": "rimraf dist esm",
2119
"format": "prettier --write .",
22-
"build:esm": "tsc --module nodenext --moduleResolution nodenext --outDir esm",
23-
"build:es5": "tsc --module commonjs --moduleResolution bundler --outDir dist",
24-
"build": "pnpm build:esm && pnpm build:es5",
20+
"lint": "eslint --report-unused-disable-directives --max-warnings 0",
2521
"prebuild": "pnpm clean",
22+
"build:esm": "tsc --outDir esm",
23+
"build:es5": "tsc --module commonjs --moduleResolution bundler --outDir dist",
2624
"postbuild:es5": "echo '{\"type\": \"commonjs\"}' > dist/package.json",
2725
"preversion": "pnpm lint && pnpm test --run && pnpm build",
28-
"postversion": "git push --follow-tags"
26+
"postversion": "git push --follow-tags",
27+
"build": "pnpm build:esm && pnpm build:es5"
2928
},
3029
"author": "Matt Morgan",
3130
"repository": {

tsconfig.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@
44
"target": "es2022",
55
"module": "nodenext",
66
"moduleResolution": "nodenext",
7-
"lib": ["dom", "esnext"],
7+
"lib": ["esnext"],
8+
"types": ["node"],
89
"rootDir": "src",
910
"outDir": "dist",
1011
"declaration": true,
1112
"sourceMap": true,
1213
"strict": true,
13-
"noUncheckedIndexedAccess": true,
14-
"noImplicitReturns": true,
15-
"noFallthroughCasesInSwitch": true,
1614
"allowImportingTsExtensions": true,
1715
"rewriteRelativeImportExtensions": true,
18-
"esModuleInterop": true
16+
"esModuleInterop": true,
17+
"skipLibCheck": true
1918
}
2019
}

0 commit comments

Comments
 (0)