Add an additional check for js files before reusing isExternalLibaryImport (#620)#622
Merged
johnnyreilly merged 5 commits intoTypeStrong:masterfrom Sep 6, 2017
Merged
Conversation
This should not be merged in but with new typescript updates there are type issues for a clean initial build.
Force typescript version to be 2.4.2
…lLibraryImport Passes all current tests. Still need to add a new one for this (works locally).
Member
|
Thanks - this looks great! Don't worry, I'll sort out the test stuff. Hopefully I'll get time to merge this and a couple of other things this week and then put out a release. |
Member
|
Thanks! |
Contributor
Author
|
Thanks for being so responsive! Looking forward to the release |
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.
Fixes #620 by only reusing Typscript's isExternalLibraryImport designation if the loader-resolved module is a JS file and not a TS file.
Added a comparison-test rather than an execution-test as this really is just a question of "does it compile" rather than changing any behavior related to the generated JS.
Note that this also locks typescript down to 2.4.2 because right now building from a clean clone fails. Since typescript is currently ^2.4.0 it upgraded locally to the latest - 2.5.2 - and since 2.5.x updates some general typings (in this case System.readFile) that causes a build failure in config.ts. Not sure how you guys want to deal with that - it seemed outside the scope of my change to fix that but it did look fairly simple.
Please let me know what you're thinking!
-Will