-
-
Notifications
You must be signed in to change notification settings - Fork 34
fix: tsconfig paths should not be applied to paths inside node_modules #760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: tsconfig paths should not be applied to paths inside node_modules #760
Conversation
How to use the Graphite Merge QueueAdd the label merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #760 +/- ##
=======================================
Coverage 94.18% 94.19%
=======================================
Files 16 16
Lines 3028 3031 +3
=======================================
+ Hits 2852 2855 +3
Misses 176 176 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging #760 will not alter performanceComparing Summary
Footnotes
|
sapphi-red
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes sense.
esbuild 0.18.0+ also ignores tsconfig paths in node_modules.
https://github.com/evanw/esbuild/blob/main/CHANGELOG-2023.md#0180:~:text=Ignore%20all%20tsconfig,ignoring%20certain%20settings.
Merge activity
|
#760) Found this case while working on tsconfig discovered. Still uncertain about this change but the original test returns not found. https://github.com/parcel-bundler/parcel/blob/b6224fd519f95e68d8b93ba90376fd94c8b76e69/packages/utils/node-resolver-rs/src/lib.rs#L2372-L2384 It should not pick up any tsconfig while resolving specifier inside `node_modules`. https://github.com/oxc-project/oxc-resolver/blob/19902fbd7a8f926c4a99b59552f5e7dffbafb230/fixtures/tsconfig/node_modules/tsconfig-not-used/tsconfig.json#L4 Reference: * https://github.com/aleclarson/vite-tsconfig-paths/blob/master/src/index.ts * https://github.com/jonaskello/tsconfig-paths-webpack-plugin/blob/master/src/plugin.ts The webpack plugin has no mention of `node_modules` but the vite plugin does. @sapphi-red I'm not confident with this logic overall so assigning you to review.
c025403 to
5654bce
Compare
Found this case while working on tsconfig discovered.
Still uncertain about this change but the original test returns not found.
https://github.com/parcel-bundler/parcel/blob/b6224fd519f95e68d8b93ba90376fd94c8b76e69/packages/utils/node-resolver-rs/src/lib.rs#L2372-L2384
It should not pick up any tsconfig while resolving specifier inside
node_modules.oxc-resolver/fixtures/tsconfig/node_modules/tsconfig-not-used/tsconfig.json
Line 4 in 19902fb
Reference:
The webpack plugin has no mention of
node_modulesbut the vite plugin does.@sapphi-red I'm not confident with this logic overall so assigning you to review.