fix(cli): refine type-stripping version check and add build:all script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Cameron Pak
2026-03-07 10:02:11 -06:00
parent db961b5447
commit 45cf746855
2 changed files with 7 additions and 2 deletions
+2 -1
View File
@@ -59,7 +59,8 @@ if (!registries.media.has(local)) {
function needsTypeStripping(configFilePath: string): boolean {
if (!/\.[mc]?ts$/.test(configFilePath)) return false;
const [major, minor] = process.versions.node.split(".").map(Number);
return major === 22 && minor! < 18;
// Node v22.06 introduced experimental TypeScript support via strip types.
return major === 22 && minor! < 18 && minor! > 5;
}
function reexecWithTypeStripping(): never {
+5 -1
View File
@@ -8,6 +8,7 @@
"node": ">=22.13"
},
"scripts": {
"build:all": "bun run --filter bknd build:all",
"updater": "bun x npm-check-updates -ui",
"ci": "find . -name 'node_modules' -type d -exec rm -rf {} + && bun install",
"npm:local": "verdaccio --config verdaccio.yml",
@@ -24,5 +25,8 @@
"typescript": "^5.9.3",
"verdaccio": "^6.2.1"
},
"workspaces": ["app", "packages/*"]
"workspaces": [
"app",
"packages/*"
]
}