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(node-resolve): Fix bug where JS import was converted to a TS import, resulting in an error when using export maps #921
Merged
guybedford
merged 22 commits into
master
from
resolve-fix-js-import-from-ts-with-export-map
Jul 24, 2021
Merged
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
cf1fd99
add fixture for importing js file from ts with export maps
tjenkinson 5a5188e
always return `null` from `resolveId` if file not found
tjenkinson 7997de0
fix invalid `InvalidModuleSpecifierError` call
tjenkinson 262e5b0
add `resolveSymlink` helper
tjenkinson e773c26
shuffle `importSpecifierList` order so that the original import has t…
tjenkinson 63f06e8
refactor `resolveImportSpecifiers` to separate classic and exports al…
tjenkinson 0b77c51
use correct function
tjenkinson fbe68fe
remove TODO
tjenkinson 5bd737d
update doc for `resolveImportSpecifiers`
tjenkinson ba26dbc
if export map algo fails with an error, do not fallback
tjenkinson 4ca8cd1
if export map algo fails with an error, do not fallback (use exception)
tjenkinson 9ad1e75
test that we do not fallback to standard node algo on exports algo error
tjenkinson c3c84cb
make the test work everywhere
tjenkinson f275610
revert snapshot change
tjenkinson bbc4a44
update test to point directly at entrypoint file
tjenkinson 7730f36
also try all import specifiers with exports algo
tjenkinson 1875282
Revert "also try all import specifiers with exports algo"
tjenkinson 3e834ee
Merge branch 'master' into resolve-fix-js-import-from-ts-with-export-map
tjenkinson 5c67e64
run prettier
tjenkinson 0bbc684
Merge branch 'master' into resolve-fix-js-import-from-ts-with-export-map
tjenkinson 6e6b906
lint
tjenkinson 2e731b3
update test to make sure js import isn't written to .ts if js exists
tjenkinson File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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 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 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 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 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
5 changes: 5 additions & 0 deletions
5
packages/node-resolve/test/fixtures/node_modules/exports-error-no-fallback/main.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
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.
all tests pass without this now, so I think maybe this is no longer needed since the other work I did to add
includeCoreModules: false
toresolve