Skip to content

Commit 0c3f412

Browse files
chrisdengsoclaude
andcommitted
build: bundle declarations on typescript@6, type-check on native typescript@7
Dependabot #7 bumped typescript to 7.0.2 (the native Go compiler), which has no programmatic Compiler API yet, so tsup's bundled-dts step (rollup-plugin-dts) crashed and `pnpm build` broke. Adopt the supported side-by-side setup: - typescript@6.0.3 (JS-based, same language level) keeps the Compiler API that tsup --dts needs. ignoreDeprecations '6.0' is set on the dts step alone, so the baseUrl-removal bridge error is silenced without touching the shared tsconfig read by the native type-checker. - @typescript/native-preview provides `tsgo`; check-types runs on the native compiler. Restores the bundled, self-contained index.d.ts / index.d.cts (no unbundled files, no post-build hacks). publint clean; attw green for node10, node16 (CJS+ESM) and bundler. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f2b0531 commit 0c3f412

3 files changed

Lines changed: 90 additions & 205 deletions

File tree

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"scripts": {
4545
"build": "tsup",
4646
"prepack": "pnpm build",
47-
"check-types": "tsc --noEmit",
47+
"check-types": "tsgo --noEmit",
4848
"lint": "eslint .",
4949
"format": "prettier --write .",
5050
"format:check": "prettier --check .",
@@ -65,13 +65,14 @@
6565
"@changesets/cli": "^2.29.7",
6666
"@eslint/js": "^10.0.1",
6767
"@types/node": "^26.1.1",
68+
"@typescript/native-preview": "7.0.0-dev.20260707.2",
6869
"@vitest/coverage-v8": "^4.1.10",
6970
"eslint": "^10.7.0",
7071
"globals": "^17.7.0",
7172
"prettier": "^3.6.2",
7273
"publint": "^0.3.14",
7374
"tsup": "^8.5.0",
74-
"typescript": "^7.0.2",
75+
"typescript": "^6.0.3",
7576
"typescript-eslint": "^8.64.0",
7677
"vitest": "^4.1.10"
7778
},

0 commit comments

Comments
 (0)