fix: use version-aware strip-types flag in package.json scripts#599
fix: use version-aware strip-types flag in package.json scripts#599carlos-alm merged 2 commits intomainfrom
Conversation
Creates scripts/node-ts.js launcher that selects --strip-types (Node 23+) or --experimental-strip-types (Node 22.x) automatically. Fixes #590
|
Claude finished @carlos-alm's task —— View job PR Review: Version-Aware Strip-Types FlagTask List:
Root Cause AnalysisProblem Being Solved: Node.js deprecated Why This Approach: Creates a version-aware launcher that detects Node major version and uses the appropriate flag. This is a clean solution that maintains backward compatibility with Node 22.x while eliminating warnings on Node 23+. Risk Assessment: ✅ Low Risk — The solution properly addresses the root cause rather than suppressing symptoms. Similar version-aware logic already exists in Backlog Compliance
Code Quality Assessment✅ Strengths
✅ Configuration Changes (Low Risk)The package.json changes are justified and safe:
These changes eliminate deprecation warnings without changing functionality. ✅ Test Integrity
🔍 Minor Technical Notes
Final Assessment |
Greptile SummaryThis PR introduces a thin version-aware launcher (
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["npm run build:wasm / verify-imports / deps:tree / version"] --> B["node scripts/node-ts.js script.ts"]
B --> C{"Detect Node major version\nprocess.versions.node"}
C -->|"major >= 23"| D["flag = --strip-types"]
C -->|"major 22.x"| E["flag = --experimental-strip-types"]
D --> F["execFileSync(process.execPath, flag, script, args)"]
E --> F
F -->|"exit 0"| G["Success"]
F -->|"throws"| H["catch err\nprocess.exit(err.status ?? 1)"]
Reviews (1): Last reviewed commit: "fix: use version-aware strip-types flag ..." | Re-trigger Greptile |
Summary
scripts/node-ts.jslauncher that auto-detects Node version and uses the correct strip-types flagbuild:wasm,verify-imports,deps:tree, andversionscripts in package.json to use the launchernpm installviapreparehook)Fixes #590