Skip to content

fix: classify type-only imports in enum sources on Node 26 - #127

Merged
vincentkoc merged 1 commit into
mainfrom
fix/node26-import-types
Nov 3, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/node26-import-types

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes false runtime-dependency findings for type-only imports when a TypeScript source contains enums on Node 26.

User Impact

Type-only imports stay excluded while real runtime imports, source offsets and conservative handling of malformed sources remain intact. No new dependency or report field changes.

Why This Change Was Made

Node's strip-only mode rejects enum syntax. On that specific failure, use the existing TypeScript dependency to mask parsed import-type nodes before classification. Reject parse recovery as evidence that an import is type-only.

The process-profile regression fixture now installs its signal handler with shell builtins before flooding output, so Node startup cannot consume the sampler's deadline. The production deadlines remain unchanged.

Evidence

  • npm run check: 837 tests passed; all 77 package entries passed validation.
  • Focused runtime/import/process checks: 119 passed on Node 26.
  • Bun runtime-import checks: 13 passed, three Node-only tests skipped.
  • Crabpot consumer smoke and packed offline CLI checks passed.
  • Independent local review found no actionable issues.

PR CI will verify the candidate on the repository's Node 22, Bun and Windows lanes. No package release is included.

@clawsweeper

clawsweeper Bot commented Nov 3, 2026

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@vincentkoc
vincentkoc marked this pull request as ready for review November 3, 2026 09:50
@vincentkoc
vincentkoc requested a review from a team as a code owner November 3, 2026 09:50
@vincentkoc
vincentkoc merged commit 3e6f7d7 into main Nov 3, 2026
7 checks passed
@vincentkoc
vincentkoc deleted the fix/node26-import-types branch November 3, 2026 09:53
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