-
-
Notifications
You must be signed in to change notification settings - Fork 434
Add Support for Resolving .cjs, .mjs, .cts and .mts Files
#1503
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
Merged
Merged
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
75a4dfd
resolve: Pass implied module kind to typescript
neurolag 8762de4
resolve: Fix detection of declaration files
neurolag 5919999
test: Replace inexistent package
neurolag a821e26
test: Fix broken docker image
neurolag 62d8033
devcontainer: Update outdated settings
neurolag be52871
resolve: Allow `.cts`, `.mts`, `.cjs` and `.mjs`
neurolag 402340c
resolve: Fix broken `enhanced-resolve` calls
neurolag f6ea7b7
resolve: Improve type safety
neurolag c218be4
interop: Create a separate regex for declarations
neurolag 076e585
types: Remove unnecessary return type
neurolag 8dc552e
test: Add remark on how to regenerate tests
neurolag 85cfc5a
test: Regenerate comparison-tests
neurolag c415a49
Bump the version number
neurolag acb60ef
Add changelog entry
neurolag c35bf1d
doc: Update CHANGELOG.md
neurolag File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,4 @@ | ||
| .devcontainer | ||
| .git | ||
| .github | ||
| .vscode | ||
| .test | ||
|
|
||
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
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
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
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
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
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
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
10 changes: 2 additions & 8 deletions
10
test/comparison-tests/aliasResolution/expectedOutput-4.8/output.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,11 @@ | ||
| asset bundle.js 2.6 KiB [emitted] (name: main) | ||
| ./app.ts 120 bytes [built] [code generated] [2 errors] | ||
| ./app.ts 120 bytes [built] [code generated] [1 error] | ||
| ./common/components/myComponent.ts 46 bytes [built] [code generated] | ||
|
|
||
| ERROR in app.ts | ||
| ./app.ts 1:29-53 | ||
| [90m[tsl] [39m[1m[31mERROR[39m[22m[1m[31m in [39m[22m[1m[36mapp.ts(1,30)[39m[22m | ||
| [1m[31m TS2307: Cannot find module 'components/myComponent' or its corresponding type declarations.[39m[22m | ||
| ts-loader-default_609318b4f68865d3 | ||
|
|
||
| ERROR in app.ts | ||
| ./app.ts 2:30-55 | ||
| [90m[tsl] [39m[1m[31mERROR[39m[22m[1m[31m in [39m[22m[1m[36mapp.ts(2,31)[39m[22m | ||
| [1m[31m TS2307: Cannot find module 'components/myComponent2' or its corresponding type declarations.[39m[22m | ||
| ts-loader-default_609318b4f68865d3 | ||
|
|
||
| webpack compiled with 2 errors | ||
| webpack compiled with 1 error |
10 changes: 2 additions & 8 deletions
10
test/comparison-tests/aliasResolution/expectedOutput-4.8/patch0/output.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,11 @@ | ||
| asset bundle.js 2.6 KiB [emitted] (name: main) | ||
| cached modules 120 bytes [cached] 1 module | ||
| ./app.ts 120 bytes [built] [code generated] [1 error] | ||
| ./common/components/myComponent.ts 45 bytes [built] [code generated] | ||
|
|
||
| ERROR in app.ts | ||
| ./app.ts 1:29-53 | ||
| [90m[tsl] [39m[1m[31mERROR[39m[22m[1m[31m in [39m[22m[1m[36mapp.ts(1,30)[39m[22m | ||
| [1m[31m TS2307: Cannot find module 'components/myComponent' or its corresponding type declarations.[39m[22m | ||
| ts-loader-default_609318b4f68865d3 | ||
|
|
||
| ERROR in app.ts | ||
| ./app.ts 2:30-55 | ||
| [90m[tsl] [39m[1m[31mERROR[39m[22m[1m[31m in [39m[22m[1m[36mapp.ts(2,31)[39m[22m | ||
| [1m[31m TS2307: Cannot find module 'components/myComponent2' or its corresponding type declarations.[39m[22m | ||
| ts-loader-default_609318b4f68865d3 | ||
|
|
||
| webpack compiled with 2 errors | ||
| webpack compiled with 1 error |
9 changes: 2 additions & 7 deletions
9
test/comparison-tests/errorFormatter/expectedOutput-4.8/output.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,10 @@ | ||
| asset bundle.js 2.6 KiB [emitted] (name: main) | ||
| ./app.ts 120 bytes [built] [code generated] [2 errors] | ||
| ./app.ts 120 bytes [built] [code generated] [1 error] | ||
| ./common/components/myComponent.ts 46 bytes [built] [code generated] | ||
|
|
||
| ERROR in app.ts | ||
| ./app.ts 1:29-53 | ||
| Does not compute.... [1m[31mcode: 2307,severity: error,content: Cannot find module 'components/myComponent' or its corresponding type declarations.,file: app.ts,line: 1,character: 30,context: .test/errorFormatter[39m[22m | ||
| ts-loader-default_85b0565984bbe8dd | ||
|
|
||
| ERROR in app.ts | ||
| ./app.ts 2:30-55 | ||
| Does not compute.... [1m[31mcode: 2307,severity: error,content: Cannot find module 'components/myComponent2' or its corresponding type declarations.,file: app.ts,line: 2,character: 31,context: .test/errorFormatter[39m[22m | ||
| ts-loader-default_85b0565984bbe8dd | ||
|
|
||
| webpack compiled with 2 errors | ||
| webpack compiled with 1 error |
11 changes: 2 additions & 9 deletions
11
test/comparison-tests/localTsImplementationOfTypings/expectedOutput-4.8/output.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,4 @@ | ||
| asset bundle.js 2.59 KiB [emitted] (name: main) | ||
| ./app.ts 101 bytes [built] [code generated] [1 error] | ||
| ./app.ts 101 bytes [built] [code generated] | ||
| ./fake.ts 165 bytes [built] [code generated] | ||
|
|
||
| ERROR in app.ts | ||
| ./app.ts 1:29-34 | ||
| [90m[tsl] [39m[1m[31mERROR[39m[22m[1m[31m in [39m[22m[1m[36mapp.ts(1,30)[39m[22m | ||
| [1m[31m TS2307: Cannot find module 'api' or its corresponding type declarations.[39m[22m | ||
| ts-loader-default_609318b4f68865d3 | ||
|
|
||
| webpack compiled with 1 error | ||
| webpack compiled successfully |
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
2 changes: 1 addition & 1 deletion
2
.../comparison-tests/nodeModulesMeaningfulErrorWhenImportingTs/expectedOutput-4.8/output.txt
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.