Skip to content
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

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

Merged
merged 5 commits into from
Sep 6, 2017

Conversation

WillMartin
Copy link
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
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
Member

Thanks!

@WillMartin
Copy link
Contributor Author

Thanks for being so responsive! Looking forward to the release

@johnnyreilly
Copy link
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