-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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: mis-detecting imports on JavaScript when there is no checkJs #4040
Merged
ry
merged 3 commits into
denoland:master
from
kitsonk:dont-analayse-js-imports-no-checkjs
Feb 20, 2020
Merged
fix: mis-detecting imports on JavaScript when there is no checkJs #4040
ry
merged 3 commits into
denoland:master
from
kitsonk:dont-analayse-js-imports-no-checkjs
Feb 20, 2020
Conversation
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
kitsonk
changed the title
Fix mis-detecting imports on JavaScript when there is no checkJs
fix: mis-detecting imports on JavaScript when there is no checkJs
Feb 20, 2020
This was referenced Feb 20, 2020
ry
approved these changes
Feb 20, 2020
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.
LGTM
This was referenced Feb 25, 2020
kitsonk
added a commit
to kitsonk/deno
that referenced
this pull request
Mar 16, 2020
Refs denoland#4184 Refs denoland#4040 In denoland#4040 we changed the way JavaScript dependencies are analysed in the TypeScript compiler. When we encounter a JavaScript file that doesn't have any types, and `checkJs` is disabled, we stop the analysis. This caused situations where when there was a typed file, loading an untyped file, loading a typed file, we stop the analysis. We didn't specifically check this "chaining" behaviour in our tests, and there were situations in the while where this behaviour was a regression, so this introduces test to ensure the behaviour as designed is preserved.
This was referenced Mar 16, 2020
kitsonk
added a commit
to kitsonk/deno
that referenced
this pull request
Mar 17, 2020
Refs denoland#4184 Refs denoland#4040 In denoland#4040 we changed the way JavaScript dependencies are analysed in the TypeScript compiler. When we encounter a JavaScript file that doesn't have any types, and `checkJs` is disabled, we stop the analysis. This caused situations where when there was a typed file, loading an untyped file, loading a typed file, we stop the analysis. We didn't specifically check this "chaining" behaviour in our tests, and there were situations in the while where this behaviour was a regression, so this introduces test to ensure the behaviour as designed is preserved.
kitsonk
added a commit
to kitsonk/deno
that referenced
this pull request
Mar 25, 2020
Refs denoland#4184 Refs denoland#4040 In denoland#4040 we changed the way JavaScript dependencies are analysed in the TypeScript compiler. When we encounter a JavaScript file that doesn't have any types, and `checkJs` is disabled, we stop the analysis. This caused situations where when there was a typed file, loading an untyped file, loading a typed file, we stop the analysis. We didn't specifically check this "chaining" behaviour in our tests, and there were situations in the while where this behaviour was a regression, so this introduces test to ensure the behaviour as designed is preserved.
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.
This PR fixes an issue where we recursively analysed imports on plain JS files in the compiler irrespective of "checkJs" being true. This caused problems where when analysing the imports of those files, we would mistake some import like structures (AMD/CommonJS) as dependencies and try to resolve the "modules" even though the compiler would not actually look at those files.