refactor(resolve)!: replaces tsconfig-paths-webpack-plugin with enhanced-resolve's own tsconfig-paths feature SLIGHTLY BREAKING#1061
Conversation
…ed-resolve's own tsconfig-paths feature
|
@copilot the check-windows job fails on the test step (npx mocha --invert --fgrep "#do-not-run-on-windows"), whereas the same step on linux (and locally macos) succeeds. As an expert in differences between linux and windows - can you analyze the root-cause of this issue (and propose a fix)? |
… enhanced-resolve
Root cause: Inside enhanced-resolve's The On Linux/macOS the paths never have a drive letter prefix, so they always use Fix (commit |
|
@copilot while that seems to have lessened the issue, a new issue has popped up in the test step on windows. Can you check why this is is going wrong and propose a fix? |
…to enhanced-resolve
Root cause: When Fix (commit |
There was a problem hiding this comment.
Pull request overview
Refactor swaps tsconfig path resolution from tsconfig-paths-webpack-plugin to enhanced-resolve native tsconfig support, reducing dependency footprint and making resolve option normalization synchronous.
Changes:
- Removes
tsconfig-paths-webpack-plugindependency and lockfile entries. - Adds enhanced-resolve
tsconfigoption in resolve option normalization. - Updates tests/callers to stop awaiting
normalizeResolveOptions.
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.c8rc.json |
Raises coverage thresholds. |
package.json |
Removes plugin dependency. |
package-lock.json |
Removes plugin tree and updates dependency metadata. |
src/main/resolve-options/normalize.mjs |
Replaces plugin setup with enhanced-resolve tsconfig option; makes function sync. |
src/main/cruise.mjs |
Uses sync normalize call. |
src/config-utl/extract-depcruise-config/index.mjs |
Uses sync normalize call. |
src/extract/resolve/resolve.mjs |
Uses absolute lookup start path for enhanced-resolve. |
test/cli/__fixtures__/workspaces-mono-repo-aliases/tsconfig.json |
Adjusts alias fixture for native tsconfig behavior. |
test/main/resolve-options/normalize.spec.mjs |
Updates normalize tests for sync behavior. |
test/extract/run-get-dependencies-fixture.utl.mjs |
Updates fixture helper for sync normalize. |
test/extract/resolve/index.typescript.spec.mjs |
Updates resolve tests for sync normalize. |
test/extract/resolve/index.tsconfig.spec.mjs |
Updates tsconfig resolve tests for sync normalize. |
test/extract/resolve/index.general.spec.mjs |
Updates general resolve tests for sync normalize. |
test/extract/resolve/external-module-helpers.spec.mjs |
Updates shared resolve options for sync normalize. |
test/extract/index.with-stats.spec.mjs |
Updates extract stats test for sync normalize. |
test/extract/index.maxdepth.spec.mjs |
Updates max-depth tests for sync normalize. |
test/extract/index.exclude.spec.mjs |
Updates exclude tests for sync normalize. |
test/extract/index.donotfollow.spec.mjs |
Updates do-not-follow tests for sync normalize. |
test/extract/index.cachebusting.spec.mjs |
Updates cache-busting test for sync normalize. |
test/extract/get-dependencies.odds-and-ends.spec.mjs |
Updates dependency extraction tests for sync normalize. |
test/extract/get-dependencies.cjs.spec.mjs |
Updates CJS dependency tests for sync normalize. |
test/extract/get-dependencies.amd.spec.mjs |
Updates AMD dependency tests for sync normalize. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
…ith enhanced-resolve's own tsconfig-paths feature SLIGHTLY BREAKING (#1061)" and "refactor(main/resolve-options): removes now unused pTSConfig parameter" (#1064) ## Description - **Reverts** replacing the tsconfig-paths-webpack-plugin with enhanced-resolve's own version of it ## Motivation and Context - it turns out the SLIGHTLY BREAKING bit it the commit bumps into a feature that is still used in the wild. It might be a misimplementation in tsconfig-paths a.c.t. the typescript specification, however, it's used and due to its wide spread should probably be construed as a de-facto standard. - enhanced-resolve's own tsconfig-paths resolution is _a lot_ slower on some of the larger typescript repositories. Just the commits we currently revert it added >8000ms of extra processing time to just the _extract_ step. These issues will need to be addressed in the enhanced-resolve codebase - _if time permits_ I might open issues for it there and maybe even cook PR's. Until these land in enhanced-resolve we'll stay on the old tsconfig-paths-webpack-plugin. ## How Has This Been Tested? - [x] green ci ## Types of changes - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] Documentation only change - [x] Refactor (non-breaking change which fixes an issue without changing functionality) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) Not a breaking change as these commits weren't released yet.



Description
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist
📖
⚖️