mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 08:06:00 +00:00
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:
@@ -59,7 +59,8 @@ if (!registries.media.has(local)) {
|
|||||||
function needsTypeStripping(configFilePath: string): boolean {
|
function needsTypeStripping(configFilePath: string): boolean {
|
||||||
if (!/\.[mc]?ts$/.test(configFilePath)) return false;
|
if (!/\.[mc]?ts$/.test(configFilePath)) return false;
|
||||||
const [major, minor] = process.versions.node.split(".").map(Number);
|
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 {
|
function reexecWithTypeStripping(): never {
|
||||||
|
|||||||
+5
-1
@@ -8,6 +8,7 @@
|
|||||||
"node": ">=22.13"
|
"node": ">=22.13"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build:all": "bun run --filter bknd build:all",
|
||||||
"updater": "bun x npm-check-updates -ui",
|
"updater": "bun x npm-check-updates -ui",
|
||||||
"ci": "find . -name 'node_modules' -type d -exec rm -rf {} + && bun install",
|
"ci": "find . -name 'node_modules' -type d -exec rm -rf {} + && bun install",
|
||||||
"npm:local": "verdaccio --config verdaccio.yml",
|
"npm:local": "verdaccio --config verdaccio.yml",
|
||||||
@@ -24,5 +25,8 @@
|
|||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
"verdaccio": "^6.2.1"
|
"verdaccio": "^6.2.1"
|
||||||
},
|
},
|
||||||
"workspaces": ["app", "packages/*"]
|
"workspaces": [
|
||||||
|
"app",
|
||||||
|
"packages/*"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user