fix: preserve moduleResolution from parsed tsconfig (#52) + dep upgrades#58
Open
steven-pribilinskiy wants to merge 2 commits intomainfrom
Open
fix: preserve moduleResolution from parsed tsconfig (#52) + dep upgrades#58steven-pribilinskiy wants to merge 2 commits intomainfrom
steven-pribilinskiy wants to merge 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
1 issue found.
About Unblocked
Unblocked has been set up to automatically review your team's pull requests to identify genuine bugs and issues.
📖 Documentation — Learn more in our docs.
💬 Ask questions — Mention @unblocked to request a review or summary, or ask follow-up questions about your code.
👍 Give feedback — React to comments with 👍 or 👎 to help us improve.
⚙️ Customize — Adjust settings in your preferences.
c12b533 to
490d0c8
Compare
The TS >= 5.4 loader returns `moduleResolution` as a `ModuleResolutionKind` enum value; stripping it during the destructure forced the program back to Classic resolution, which couldn't find imported modules and emitted every referenced type as `any`. Only strip the legacy raw-string variant. Also fix the version detection: the previous regex /^[5-9]\.([4-9]|[1-9]\d)/ only matched X.4 and above within each major, so TS 6.0-6.3 fell through to the legacy require()-based loader and would have reproduced the same bug. Switch to a numeric major/minor comparison. Closes #52
- @biomejs/biome 1.9 → 2.4 (config migrated) - @types/node 22 → 24 - @vitest/coverage-istanbul 2 → 4 - typescript 5.6 → 6.0 (added ignoreDeprecations + rootDir) - vitest 2 → 4 - webpack 5.95 → 5.106 - simple-git-hooks, tsx bumped to latest Adapt to webpack's rename of ModuleFederationPlugin#_options to #options (introduced around 5.100), with fallback to the legacy field. Update the plugin test to mock the barrel export, which vitest 4 no longer collapses through deep auto-mocks. Tighten Compiler hook callback typings for TS 6.
490d0c8 to
4ff43fe
Compare
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
anyfor all imported types. The destructure oncompileTypes.ts:27droppedmoduleResolutionfrom the parsed config; withmodule: "ES2022"and nomoduleResolution, TypeScript falls back to Classic resolution and can't resolvereact, third-party packages, or path aliases. Now we only strip the legacy raw-string variant returned by therequire()-based loader._options->options: webpack >= 5.100 renamedModuleFederationPlugin#_optionsto#options. The plugin now readsoptionsfirst and falls back to_optionsfor older webpack versions.ignoreDeprecations: "6.0"and explicitrootDir; tightened Compiler hook callback typings in the plugin test.importActual.Test plan
vertozyp/TS-types-generation) that generated.d.tsno longer containsanyfor imported typesmodule: "ES2022",moduleResolution: "Node"_options) still works against the installed plugin