Skip to content

Add an additional check for js files before reusing isExternalLibaryImport (#620)#622

Merged
johnnyreilly merged 5 commits intoTypeStrong:masterfrom
WillMartin:wmartin/fix-issue-620
Sep 6, 2017
Merged

Add an additional check for js files before reusing isExternalLibaryImport (#620)#622
johnnyreilly merged 5 commits intoTypeStrong:masterfrom
WillMartin:wmartin/fix-issue-620

Conversation

@WillMartin
Copy link
Copy Markdown
Contributor

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

WillMartin and others added 4 commits September 5, 2017 13:51
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).
@johnnyreilly
Copy link
Copy Markdown
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.

@johnnyreilly johnnyreilly merged commit 114e5b1 into TypeStrong:master Sep 6, 2017
@johnnyreilly
Copy link
Copy Markdown
Member

Thanks!

@WillMartin
Copy link
Copy Markdown
Contributor Author

Thanks for being so responsive! Looking forward to the release

@johnnyreilly
Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typescript files aliased to node_modules's module won't be compiled

2 participants