fix(extraction): index .mts and .cts files#394
Open
balloon72 wants to merge 1 commit into
Open
Conversation
50b7609 to
7a4c449
Compare
Author
|
Rebased this on the latest Validation on Windows:
I also reran the broader targeted suite: Also clarified the PR body that |
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.
Summary
Fixes #366 by indexing explicit TypeScript module extensions (
.mtsand.cts) anywhere CodeGraph already treats.tsfiles as TypeScript source.Note:
.mjs/.cjswere already present in the JavaScript extension map before this PR; the missing coverage here was the TypeScript ESM/CJS pair.Changes
.mtsand.ctsto the scanner/language extension map as TypeScript.mts,.cts,index.mts, andindex.ctsin TypeScript import resolution.mts/.ctsare not skipped*.controller.mtsand*.module.ctsValidation
npm cinpm run buildnpm test -- __tests__/frameworks.test.ts __tests__/extraction.test.ts __tests__/resolution.test.ts -t "(explicit TypeScript module extensions|TypeScript ESM files with \.mts|include explicit TypeScript module extensions|routes from \.mts|HTTP routes from \.mts|controller\.mts)"The broader targeted run
npm test -- __tests__/frameworks.test.ts __tests__/extraction.test.ts __tests__/resolution.test.tscurrently passes 425/426 tests on my Windows machine and fails only in the existing C/C++ include end-to-end cleanup path withEBUSY: resource busy or locked, unlink ...\\.codegraph\\codegraph.db; the new.mts/.ctscoverage above passes.