Skip to content

feat(types): migrate test suite and config files to TypeScript (Phase 6)#588

Open
carlos-alm wants to merge 8 commits intomainfrom
feat/ts-migrate-tests
Open

feat(types): migrate test suite and config files to TypeScript (Phase 6)#588
carlos-alm wants to merge 8 commits intomainfrom
feat/ts-migrate-tests

Conversation

@carlos-alm
Copy link
Contributor

@carlos-alm carlos-alm commented Mar 24, 2026

Summary

  • Rename all 114 test files + 2 helpers from .js to .ts
  • Rename vitest.config.js and commitlint.config.js to .ts
  • Rename 16 scripts + 1 docs example from .js to .ts
  • Update all node scripts/X.js invocations in package.json, CI workflows, and shell scripts to node --experimental-strip-types scripts/X.ts
  • Add type annotations to all bare let declarations to fix noImplicitAnyLet lint errors (0 lint errors)
  • Remove jsToTsResolver vite plugin from vitest config (no longer needed)
  • Drop allowJs/checkJs migration flags from tsconfig.json

Remaining JS files (must stay JS for Node 20 / bootstrap reasons):

  • scripts/test.js + scripts/build-wasm.js — Node 20 bootstrap (no strip-types)
  • 4 ESM loader hooks (ts-resolve-*.js, ts-resolver-*.js) — bootstrap .ts support
  • scripts/gen-deps.cjs + src/index.cjs — CommonJS by design

Test plan

  • Full test suite passes: 114 files, 2098 tests, 0 failures
  • tsc --noEmit clean
  • biome check — 0 errors
  • node --experimental-strip-types scripts/verify-imports.ts passes
  • CI passes on all Node versions (20, 22)

Rename all 114 test files and 2 helpers from .js to .ts, plus
vitest.config and commitlint.config. Add type annotations to fix
noImplicitAnyLet lint errors. Remove jsToTsResolver vite plugin
(no longer needed). Drop allowJs/checkJs from tsconfig.
@claude
Copy link

claude bot commented Mar 24, 2026

Claude finished @carlos-alm's task —— View job


PR Review: TypeScript Migration Phase 6 ✅

Review Todo List:

  • Phase 1: Root cause analysis
  • Phase 2: Configuration change detection
  • Phase 3: Test integrity verification
  • Phase 4: Code quality assessment
  • Phase 5: Backlog compliance evaluation
  • Final recommendation

Phase 1: Root Cause Analysis ✅

Problem Being Solved: Final phase of TypeScript migration - converting test suite (.js → .ts) to complete the codebase migration and enable full TypeScript strict mode checking.

Why This Approach: Logical completion of the migration phases. The approach is sound:

  • Renames test files to .ts (no functionality changes)
  • Removes temporary migration scaffolding (jsToTsResolver plugin, allowJs/checkJs flags)
  • Fixes remaining noImplicitAnyLet violations with explicit type annotations

Risk Assessment: Low risk - this is cleanup/completion work, not new functionality.

Phase 2: Configuration Change Detection ✅

Changes Reviewed:

  • tsconfig.json: Appropriately removes migration flags (allowJs: true, checkJs: false) - these were temporary scaffolding
  • vitest.config.ts: Removes jsToTsResolver plugin - no longer needed since all importers are now .ts
  • commitlint.config.js → .ts: Simple rename, identical content
  • .npmignore: Updates reference to renamed config file
  • biome.json: No changes - already supports both .js and .ts

Assessment: All configuration changes are justified cleanup after migration completion. No rules were relaxed or weakened.

Phase 3: Test Integrity Verification ✅

File Renames: All 114 test files + 2 helpers renamed from .js to .ts with no logic changes.

Type Annotations Added: Systematic addition of explicit types to let declarations to fix noImplicitAnyLet violations:

  • let tmpDir, dbPath;let tmpDir: string, dbPath: string;
  • let parsers;let parsers: any;
  • let cache;let cache: any;

Assessment: Test logic is preserved. Type annotations are conservative (using any where precise typing is unnecessary for tests). No assertions were weakened or removed.

Phase 4: Code Quality Assessment ✅

Approach Quality: Conservative and methodical - only adds types where required by the linter, uses any for complex types that don't need precision in tests.

Consistency: All changes follow the same pattern - minimal annotations to satisfy TypeScript without over-engineering test types.

Maintainability: Removes temporary scaffolding that was supporting the migration, leaving cleaner configuration.

Phase 5: Backlog Compliance Evaluation ✅

Root Cause Analysis

Problem Being Solved: Completing TypeScript migration by converting the test suite to enable full strict mode checking and removing temporary migration scaffolding.
Why This Approach: Systematic, minimal changes that preserve functionality while enabling better tooling.
Risk Assessment: Very low risk - this is pure infrastructure cleanup with no behavior changes.

Backlog Compliance

  • Zero-dep: ✅ — No new runtime dependencies
  • Foundation-aligned: ✅ — Maintains all core principles, improves type safety
  • Problem-fit: 3 — Useful foundation work that improves tooling for agents
  • Breaking: No — All interfaces remain unchanged
  • Tier: 1

Critical Concerns

None identified. This is excellent, methodical completion work.

Final Recommendation

  • Rating: ⭐⭐⭐⭐☆ (4/5)
  • Action: APPROVE
  • Reasoning: High-quality completion of TypeScript migration. Conservative approach with no functionality changes, proper cleanup of temporary scaffolding, and systematic type annotations. This completes a multi-phase migration effort and enables better tooling support. Only minor point: could have been more ambitious with precise typing in some test scenarios, but the conservative approach is appropriate and maintainable.

Rename 16 scripts and 1 docs example from .js to .ts. Update all
invocations in package.json, CI workflows, and shell scripts to use
node --experimental-strip-types.

Remaining .js files (must stay JS):
- scripts/test.js, scripts/build-wasm.js (Node 20 bootstrap)
- 4 ESM loader hooks (bootstrap .ts support)
- scripts/gen-deps.cjs, src/index.cjs (CJS by design)
- Bump engines.node from >=20 to >=22
- Remove Node 20 from CI test matrix
- Bump native build Node from 20 to 22
- Replace old JS ESM loader hooks with 2 TypeScript hooks
  (ts-resolve-loader.ts + ts-resolve-hooks.ts) that resolve .js→.ts
  import specifiers at runtime
- Remove canStripTypes helper and version guards from tests
- Update src/index.cjs to import('./index.ts') for dev; build step
  produces dist/index.cjs with ./index.js for published package
- Simplify vitest.config.ts to use --experimental-strip-types only
- Update child-process test invocations to use --import loader flag
- Rewrite scripts/gen-deps.cjs as ESM TypeScript
- Rename scripts/build-wasm.js → .ts

Impact: 1 functions changed, 1 affected
…ile (#588)

The test file was renamed from .js to .ts in the Phase 6 migration
but the CI workflow was not updated, causing test discovery to fail.
@carlos-alm
Copy link
Contributor Author

@greptileai

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 24, 2026

Greptile Summary

Phase 6 of the JS→TS migration renames 114 test files, 16 scripts, and both config files to .ts, drops the jsToTsResolver Vite plugin, removes allowJs/checkJs, bumps the engines constraint to >=22.6, and simplifies the test scripts to direct vitest invocations. The overall migration is well-executed and the core test suite passes, but two runtime bugs were introduced:

  • Pre-commit hook silently broken (docs/examples/claude-code-hooks/pre-commit-checks.ts): The file was renamed to .ts but retains CommonJS require() calls throughout. Because the repo sets "type": "module", Node loads .ts files as ESM under --strip-types, where require is not defined. The resulting ReferenceError is swallowed by 2>/dev/null || true in pre-commit.sh, causing the hook to silently return allow for every commit — cycles, dead exports, and diff-impact checks are all bypassed.
  • Benchmark workflows will fail on Node 22 (.github/workflows/benchmark.yml): benchmark.ts, embedding-benchmark.ts, query-benchmark.ts, and incremental-benchmark.ts all import library modules via .js specifiers (e.g. ./lib/bench-config.js, ./lib/fork-engine.js) that no longer exist as .js files. Node 22's --experimental-strip-types does not auto-resolve .js.ts (that behavior was added in Node 23+). The missing --import ./scripts/ts-resolve-loader.js flag — which the old vitest.config.js injected via NODE_OPTIONS — needs to be added to each of the four benchmark invocations in the workflow.

Confidence Score: 2/5

  • Not safe to merge — the pre-commit hook is silently non-functional and all four benchmark workflows will fail on Node 22
  • Two runtime bugs block correctness: (1) pre-commit-checks.ts uses CommonJS require() in an ESM-only package, completely disabling safety hooks without any error signal; (2) the four benchmark scripts import .js specifiers that only exist as .ts files, and the benchmark.yml workflows omit the --import loader required for .js→.ts resolution on Node 22. The core test suite and CI are unaffected, but CI coverage for the benchmark workflows is broken.
  • docs/examples/claude-code-hooks/pre-commit-checks.ts (P0 — require() in ESM) and .github/workflows/benchmark.yml (P1 — missing --import loader on all four benchmark invocations)

Important Files Changed

Filename Overview
docs/examples/claude-code-hooks/pre-commit-checks.ts Renamed from .js to .ts but still uses CommonJS require() throughout; will throw ReferenceError: require is not defined in ESM context (type: module), silently disabling all pre-commit checks
.github/workflows/benchmark.yml All four benchmark script invocations are missing --import ./scripts/ts-resolve-loader.js; benchmark scripts import .js specifiers that only exist as .ts files, causing ERR_MODULE_NOT_FOUND on Node 22
vitest.config.ts Correctly simplified from vitest.config.js; retains the minor-version guard for supportsStripTypes and properly gates --experimental-strip-types vs --strip-types injection; jsToTsResolver plugin correctly removed since all files are now .ts
package.json engines bumped to >=22.6, test scripts simplified to direct vitest invocations, all node script invocations updated to --experimental-strip-types; uses replaceAll for the CJS dist rewrite
scripts/ts-resolve-hooks.ts Correctly typed with explicit callback signature replacing the previously flagged bare Function type; logic unchanged
tsconfig.json Migration flags allowJs/checkJs cleanly removed now that all source is TypeScript; no regressions
docs/examples/claude-code-hooks/pre-commit.sh Correctly updated to dynamically select --strip-types vs --experimental-strip-types at runtime; only concern is that the .ts target it invokes (pre-commit-checks.ts) is broken due to the require() ESM issue
.github/workflows/ci.yml Node 20 dropped from test matrix (consistent with engines >=22.6), verify-imports step updated to .ts correctly

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["Node invocation\n(node --experimental-strip-types)"] --> B{Node version}
    B -->|">=23"| C["--strip-types\n.js→.ts auto-resolved"]
    B -->|"22.6–22.x"| D["--experimental-strip-types\n.js→.ts NOT auto-resolved"]
    D --> E{Import loader present?}
    E -->|"--import ts-resolve-loader.js"| F["✅ .js specifiers resolved to .ts\nBenchmark scripts work"]
    E -->|"missing (current benchmark.yml)"| G["❌ ERR_MODULE_NOT_FOUND\nbench-config.js / fork-engine.js"]
    C --> F
    H["pre-commit-checks.ts\nrequire() calls"] --> I{Module type}
    I -->|"type: module (this repo)"| J["❌ ReferenceError: require is not defined\nHook silently exits 0"]
    I -->|"type: commonjs"| K["✅ Works as before"]
    F --> L["vitest.config.ts\nChild processes inherit NODE_OPTIONS"]
    L --> M["✅ Test suite passes\n(src/ still .js, no .js→.ts needed)"]
Loading

Comments Outside Diff (1)

  1. docs/examples/claude-code-hooks/pre-commit-checks.ts, line 15-16 (link)

    P0 require() not defined in ESM — hook silently broken

    This file was renamed to .ts, but the repo has "type": "module" in package.json. When pre-commit.sh runs node $STRIP_FLAG "$HOOK_DIR/pre-commit-checks.ts", Node loads the file as an ES module (because type: module applies to .ts files under --strip-types). require is not available in ESM scope, so line 15 throws ReferenceError: require is not defined in ES module scope.

    Because pre-commit.sh redirects stderr to /dev/null and uses || true, the crash is completely silent and $RESULT is empty — the script hits the early exit 0 branch, making all three pre-commit checks (cycles, dead exports, diff-impact) non-functional without any indication to the committer.

    The file needs to either be rewritten to use ESM import syntax, or renamed to .cts (CommonJS TypeScript) so Node treats it as CJS explicitly:

    import fs from 'node:fs';
    import path from 'node:path';
    import { createRequire } from 'node:module';
    // for dynamic require of project files at runtime:
    const require = createRequire(import.meta.url);

    Also, the file header comment on line 5 still reads pre-commit-checks.js and should be updated to .ts.

Reviews (3): Last reviewed commit: "fix(types): add TypeScript parameter typ..." | Re-trigger Greptile

Comment on lines 28 to 30
"engines": {
"node": ">=20"
"node": ">=22"
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 engines constraint too broad for --experimental-strip-types

--experimental-strip-types was only introduced in Node 22.6.0. Declaring >=22 here means users on Node 22.0–22.5 will hit errors when running any script that uses node --experimental-strip-types (build:wasm, deps:tree, verify-imports, version, etc.) — even though the engines field technically allows those versions.

The same issue affects vitest.config.ts, which injects --experimental-strip-types into NODE_OPTIONS unconditionally for any Node 22.x (see below).

Suggested change
"engines": {
"node": ">=20"
"node": ">=22"
},
"engines": {
"node": ">=22.6"
},

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — tightened engines constraint to >=22.6 since --experimental-strip-types requires Node 22.6+.

vitest.config.ts Outdated
Comment on lines +3 to +5
const [major] = process.versions.node.split('.').map(Number);
const existing = process.env.NODE_OPTIONS || '';
const stripFlag = major >= 23 ? '--strip-types' : '--experimental-strip-types';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Missing minor-version guard for --experimental-strip-types

The old vitest.config.js explicitly gated on major > 22 || (major === 22 && minor >= 6) before injecting the flag into NODE_OPTIONS. The new config only destructures major and unconditionally assigns --experimental-strip-types for any Node 22.x. Child processes spawned by tests (e.g. watcher tests, CLI integration tests) inherit NODE_OPTIONS; on Node 22.0–22.5 that invalid flag will crash them immediately.

Suggested change
const [major] = process.versions.node.split('.').map(Number);
const existing = process.env.NODE_OPTIONS || '';
const stripFlag = major >= 23 ? '--strip-types' : '--experimental-strip-types';
const [major, minor] = process.versions.node.split('.').map(Number);
const existing = process.env.NODE_OPTIONS || '';
const supportsStripTypes = major > 22 || (major === 22 && minor >= 6);
const stripFlag = major >= 23 ? '--strip-types' : '--experimental-strip-types';

And in the env block, guard the injection:

!supportsStripTypes || (existing.includes('--experimental-strip-types') || existing.includes('--strip-types'))
  ? ''
  : stripFlag,

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — restored the minor-version guard (supportsStripTypes = major > 22 || (major === 22 && minor >= 6)) and gated the strip-types injection on it, matching the old config's behavior.

package.json Outdated
"scripts": {
"build": "tsc",
"build:wasm": "node scripts/build-wasm.js",
"build": "tsc && node -e \"require('fs').writeFileSync('dist/index.cjs',require('fs').readFileSync('src/index.cjs','utf8').replace('./index.ts','./index.js'))\"",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 String.replace() only replaces first occurrence

String.prototype.replace() with a string pattern replaces only the first match. If src/index.cjs ever gains a second ./index.ts reference, later occurrences will be silently left behind in dist/index.cjs, causing a runtime failure for CJS consumers. Prefer replaceAll:

Suggested change
"build": "tsc && node -e \"require('fs').writeFileSync('dist/index.cjs',require('fs').readFileSync('src/index.cjs','utf8').replace('./index.ts','./index.js'))\"",
"build": "tsc && node -e \"require('fs').writeFileSync('dist/index.cjs',require('fs').readFileSync('src/index.cjs','utf8').replaceAll('./index.ts','./index.js'))\"",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — switched to replaceAll for the ./index.ts to ./index.js replacement in the build script.

Comment on lines +14 to +17
specifier: string,
context: { parentURL?: string; conditions: string[] },
nextResolve: Function,
): Promise<{ url: string; shortCircuit?: boolean }> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Avoid the Function type — use a specific callback signature

Function is explicitly banned by most TypeScript style guides (equivalent to any for callables). The Node ESM nextResolve hook has a known shape:

Suggested change
specifier: string,
context: { parentURL?: string; conditions: string[] },
nextResolve: Function,
): Promise<{ url: string; shortCircuit?: boolean }> {
export async function resolve(
specifier: string,
context: { parentURL?: string; conditions: string[] },
nextResolve: (specifier: string, context?: { parentURL?: string; conditions: string[] }) => Promise<{ url: string; shortCircuit?: boolean }>,
): Promise<{ url: string; shortCircuit?: boolean }> {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — replaced bare Function type with a specific callback signature: (specifier: string, context?: { parentURL?: string; conditions: string[] }) => Promise<{ url: string; shortCircuit?: boolean }>.

…eplaceAll (#588)

Impact: 1 functions changed, 0 affected
@carlos-alm
Copy link
Contributor Author

@greptileai

# Run all checks in a single Node.js process
HOOK_DIR="$(cd "$(dirname "$0")" && pwd)"
RESULT=$(node "$HOOK_DIR/pre-commit-checks.js" "$WORK_ROOT" "$EDITED_FILES" "$STAGED" 2>/dev/null) || true
RESULT=$(node --experimental-strip-types "$HOOK_DIR/pre-commit-checks.ts" "$WORK_ROOT" "$EDITED_FILES" "$STAGED" 2>/dev/null) || true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Hardcoded --experimental-strip-types is deprecated on Node 23+

This shell script hardcodes --experimental-strip-types, but vitest.config.ts correctly selects between --experimental-strip-types (Node 22.x) and --strip-types (Node >=23) at runtime. Users running Node 23+ who follow this documentation example will get deprecation warnings, even though they're suppressed here via 2>/dev/null.

Since the package now requires Node >=22.6, consider a version-aware invocation:

Suggested change
RESULT=$(node --experimental-strip-types "$HOOK_DIR/pre-commit-checks.ts" "$WORK_ROOT" "$EDITED_FILES" "$STAGED" 2>/dev/null) || true
STRIP_FLAG=$(node -e "const [M,m]=process.versions.node.split('.').map(Number); console.log(M>=23?'--strip-types':'--experimental-strip-types')")
RESULT=$(node $STRIP_FLAG "$HOOK_DIR/pre-commit-checks.ts" "$WORK_ROOT" "$EDITED_FILES" "$STAGED" 2>/dev/null) || true

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — the pre-commit.sh example now dynamically selects between --strip-types (Node >=23) and --experimental-strip-types (Node 22.x) at runtime, matching the approach already used in vitest.config.ts.

…588)

Detect Node version at runtime and select --strip-types (>=23) vs
--experimental-strip-types (22.x), matching the approach in vitest.config.ts.
Replace JSDoc-only annotations in fixtures.ts with proper TypeScript
interfaces and typed parameters. Add interfaces and typed parameters
to resolution-benchmark.test.ts helper functions. Eliminates all
noExplicitAny warnings in both files.

Impact: 22 functions changed, 0 affected
@carlos-alm
Copy link
Contributor Author

Addressed the remaining review feedback from Greptile's second review:

  1. docs/examples/claude-code-hooks/pre-commit.sh — Now dynamically selects between --strip-types (Node >=23) and --experimental-strip-types (Node 22.x) at runtime, consistent with vitest.config.ts.

  2. tests/helpers/fixtures.ts — Replaced JSDoc-only annotations with proper TypeScript interfaces (PendingNode, PendingEdge, PendingComplexity) and typed all method parameters and return types. Eliminated all noExplicitAny warnings.

  3. tests/benchmarks/resolution/resolution-benchmark.test.ts — Added ResolvedEdge, ExpectedEdge, ModeMetrics, and BenchmarkMetrics interfaces. Typed all helper function parameters and return types. Eliminated all noExplicitAny warnings.

All tests pass (546/546), TypeScript type check passes, and lint is clean.

@carlos-alm
Copy link
Contributor Author

@greptileai

ARGS="$ARGS --npm"
fi
node scripts/benchmark.js $ARGS 2>/dev/null > benchmark-result.json
node --experimental-strip-types scripts/benchmark.ts $ARGS 2>/dev/null > benchmark-result.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Missing --import loader — benchmark scripts will fail on Node 22

scripts/benchmark.ts (and embedding-benchmark.ts, query-benchmark.ts, incremental-benchmark.ts) contain cross-script imports using .js specifiers:

import { resolveBenchmarkSource, srcImport } from './lib/bench-config.js';
import { isWorker, workerEngine, workerTargets, forkEngines } from './lib/fork-engine.js';

Both scripts/lib/bench-config.js and scripts/lib/fork-engine.js do not exist on disk — only their .ts counterparts do. Node 22's --experimental-strip-types strips type annotations but does not rewrite .js specifiers to .ts (that resolution was only added in Node 23+). Without the --import ESM loader hook, these scripts will fail immediately with ERR_MODULE_NOT_FOUND.

The fix is to add --import ./scripts/ts-resolve-loader.js (the .js version is still present and fully functional) before the script path. The same fix applies at lines 247, 384, and 521:

Suggested change
node --experimental-strip-types scripts/benchmark.ts $ARGS 2>/dev/null > benchmark-result.json
node --experimental-strip-types --import ./scripts/ts-resolve-loader.js scripts/benchmark.ts $ARGS 2>/dev/null > benchmark-result.json

ARGS="$ARGS --npm"
fi
node scripts/embedding-benchmark.js $ARGS 2>/dev/null > embedding-benchmark-result.json
node --experimental-strip-types scripts/embedding-benchmark.ts $ARGS 2>/dev/null > embedding-benchmark-result.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Missing --import loader — same resolution failure as line 96

scripts/embedding-benchmark.ts also imports ./lib/bench-config.js and ./lib/fork-engine.js (which exist only as .ts files). Same fix applies:

Suggested change
node --experimental-strip-types scripts/embedding-benchmark.ts $ARGS 2>/dev/null > embedding-benchmark-result.json
node --experimental-strip-types --import ./scripts/ts-resolve-loader.js scripts/embedding-benchmark.ts $ARGS 2>/dev/null > embedding-benchmark-result.json

ARGS="$ARGS --npm"
fi
node scripts/query-benchmark.js $ARGS 2>/dev/null > query-benchmark-result.json
node --experimental-strip-types scripts/query-benchmark.ts $ARGS 2>/dev/null > query-benchmark-result.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Missing --import loader — same resolution failure as line 96

scripts/query-benchmark.ts also imports ./lib/bench-config.js and ./lib/fork-engine.js (which exist only as .ts files).

Suggested change
node --experimental-strip-types scripts/query-benchmark.ts $ARGS 2>/dev/null > query-benchmark-result.json
node --experimental-strip-types --import ./scripts/ts-resolve-loader.js scripts/query-benchmark.ts $ARGS 2>/dev/null > query-benchmark-result.json

ARGS="$ARGS --npm"
fi
node scripts/incremental-benchmark.js $ARGS 2>/dev/null > incremental-benchmark-result.json
node --experimental-strip-types scripts/incremental-benchmark.ts $ARGS 2>/dev/null > incremental-benchmark-result.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Missing --import loader — same resolution failure as line 96

scripts/incremental-benchmark.ts also imports ./lib/bench-config.js and ./lib/fork-engine.js (which exist only as .ts files).

Suggested change
node --experimental-strip-types scripts/incremental-benchmark.ts $ARGS 2>/dev/null > incremental-benchmark-result.json
node --experimental-strip-types --import ./scripts/ts-resolve-loader.js scripts/incremental-benchmark.ts $ARGS 2>/dev/null > incremental-benchmark-result.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant