-
Notifications
You must be signed in to change notification settings - Fork 145
Upgrade to TypeScript 7 (native compiler) #1149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,6 @@ | |
| }, | ||
| "devDependencies": { | ||
| "@types/node": "catalog:", | ||
| "typescript": "latest" | ||
| "typescript": "7.0.1-rc" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,6 @@ | |
| }, | ||
| "devDependencies": { | ||
| "@types/node": "catalog:", | ||
| "typescript": "latest" | ||
| "typescript": "7.0.1-rc" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -37,7 +37,7 @@ | |||||
| } | ||||||
| }, | ||||||
| "scripts": { | ||||||
| "build": "tsup", | ||||||
| "build": "tsup && (tsc --declaration --emitDeclarationOnly --outDir dist --rootDir src || true)", | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The
Suggested change
|
||||||
| "test": "vitest run", | ||||||
| "typecheck": "tsgo --noEmit", | ||||||
| "typecheck:slow": "tsc --noEmit" | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| diff --git a/dist/index.js b/dist/index.js | ||
| index eff27819d14d659a39c50e6cf51516e11648d20b..e95a8a1c2f3a6385690435bb64ade92add7a7526 100644 | ||
| --- a/dist/index.js | ||
| +++ b/dist/index.js | ||
| @@ -1024,7 +1024,7 @@ var terserPlugin = ({ | ||
| // src/tsc.ts | ||
|
|
||
|
|
||
| -var _typescript = require('typescript'); var _typescript2 = _interopRequireDefault(_typescript); | ||
| +var _typescript; try { _typescript = require('typescript'); } catch (e) { _typescript = {}; } var _typescript2 = _interopRequireDefault(_typescript); | ||
| var logger = _chunkVGC3FXLUjs.createLogger.call(void 0, ); | ||
| var AliasPool = (_class = class {constructor() { _class.prototype.__init.call(this); } | ||
| __init() {this.seen = /* @__PURE__ */ new Set()} | ||
| diff --git a/dist/rollup.js b/dist/rollup.js | ||
| index e128b61b9558318b9f86dc11d72c31f09a8eb7db..84033d81096d1d9242c63c5de05c4b4af2a5c842 100644 | ||
| --- a/dist/rollup.js | ||
| +++ b/dist/rollup.js | ||
| @@ -6465,7 +6465,7 @@ export { ${[...exportedNames].join(", ")} }; | ||
| // src/rollup.ts | ||
| var _worker_threads = require('worker_threads'); | ||
| var _path = require('path'); var _path2 = _interopRequireDefault(_path); | ||
| -var _typescript = require('typescript'); var _typescript2 = _interopRequireDefault(_typescript); | ||
| +var _typescript; try { _typescript = require('typescript'); } catch (e) { _typescript = {}; } var _typescript2 = _interopRequireDefault(_typescript); | ||
|
|
||
| // node_modules/.pnpm/@rollup+pluginutils@5.3.0_rollup@4.53.2/node_modules/@rollup/pluginutils/dist/es/index.js | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spawnSyncsetsresult.errorwhen the process cannot be started (e.g.,ENOENTfrom a missing tsgo binary, an OOM kill, or a signal termination) and leavesresult.stdout/result.stderrasnull. The?? ""guards produce empty strings, theERROR_LINEfilter matches nothing, and the function returns[]— indistinguishable from a clean type-check. Any test relying on this helper will silently pass without the compiler ever running. Aresult.error(or anullresult.status) check is needed to surface the failure.