Repository navigation
fix: classify type-only imports in enum sources on Node 26 - #127
Merged
Merged
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.PR CI will verify the candidate on the repository's Node 22, Bun and Windows lanes. No package release is included.