Skip to content

fix: use version-aware strip-types flag in package.json scripts #590

@carlos-alm

Description

@carlos-alm

Context

PR #588 migrated scripts to TypeScript with node --experimental-strip-types. The benchmark.yml, vitest.config.ts, and pre-commit.sh were updated to dynamically select between --strip-types (Node 23+) and --experimental-strip-types (Node 22.x), but the package.json scripts still hardcode --experimental-strip-types.

Affected scripts

  • build:wasm (runs on every npm install via prepare)
  • verify-imports
  • deps:tree
  • version

Impact

Users on Node 23+ will see deprecation warnings, most noticeably during npm install since build:wasm runs in the prepare lifecycle.

Suggested approach

Create a scripts/node-ts.js launcher that accepts a script path and applies the correct flag based on Node version, then update all package.json scripts to use it:

"build:wasm": "node scripts/node-ts.js scripts/build-wasm.ts"

Source

Greptile review comment on PR #588.

Metadata

Metadata

Assignees

No one assigned

    Labels

    follow-upDeferred work from PR reviews that needs tracking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions