chore: upgrade to TypeScript 7.0.2 (#10663)
This commit is contained in:
1 parent
6df0add6e6
commit
a37c664068
20 files changed
+484
-349
No files matched your search
@@ -1,24 +0,0 @@
|
||||
// Deletes stale tsgo backup files left behind by `effect-tsgo patch`.
|
||||
//
|
||||
// The patch command backs up the real tsgo binary to `tsgo.original`, and if
|
||||
// that name is taken it writes `tsgo.original.1`, `.2`, ... without ever
|
||||
// cleaning up. On runners that restore node_modules from a build cache
|
||||
// (Vercel), backups accumulate across deploys until patch hard-fails at 101
|
||||
// with "Too many backup files exist". Removing them is safe: from the second
|
||||
// patch onward the backup is just the previously-patched binary, and pnpm
|
||||
// restores the pristine one whenever the package is re-materialized.
|
||||
//
|
||||
// Runs as part of `prepare`, so it must only use node builtins.
|
||||
import * as NodeFS from "node:fs";
|
||||
|
||||
const backups = NodeFS.globSync(
|
||||
"node_modules/.pnpm/@typescript+native-preview-*/node_modules/@typescript/native-preview-*/lib/tsgo{,.exe}.original*",
|
||||
);
|
||||
|
||||
for (const backup of backups) {
|
||||
NodeFS.rmSync(backup, { force: true });
|
||||
}
|
||||
|
||||
if (backups.length > 0) {
|
||||
console.log(`Removed ${backups.length} stale tsgo backup(s)`);
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
// @effect-diagnostics nodeBuiltinImport:off - Knip and the TypeScript compiler host use synchronous Node paths.
|
||||
import * as NodePath from "node:path";
|
||||
import type { Preprocessor } from "knip";
|
||||
import ts from "typescript";
|
||||
// Knip needs the legacy compiler API, which TypeScript 7 no longer exports.
|
||||
import ts from "typescript-legacy";
|
||||
|
||||
// Effect 4 schemas carry this marker, including aliases and Schema.Class constructors.
|
||||
// Checking the type avoids evaluating application modules or exempting schema factories/decoders.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"typecheck": "tsgo --noEmit",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vp test run"
|
||||
},
|
||||
"dependencies": {
|
||||
@@ -20,6 +20,7 @@
|
||||
"@effect/vitest": "catalog:",
|
||||
"@types/pngjs": "6.0.5",
|
||||
"typescript": "catalog:",
|
||||
"typescript-legacy": "npm:typescript@~6.0.3",
|
||||
"vite-plus": "catalog:"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user