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

fix: disable esModuleInterop #183

Merged
merged 2 commits into from Jul 3, 2018
Merged

Conversation

ofrobots
Copy link
Contributor

@ofrobots ofrobots commented Jul 3, 2018

BREAKING CHANGE: esModuleInterop causes synthetic imports to leak from
libraries to their users. Users must compile with allowSyntheticImports
as well if they use a library that uses this flag.

This has been causing a lot of churn in libraries that use gts.

BREAKING CHANGE: esModuleInterop causes synthetic imports to leak from
libraries to their users. Users must compile with allowSyntheticImports
as well if they use a library that uses this flag.

This has been causing a lot of churn in libraries that use gts.
@ofrobots ofrobots requested a review from a team July 3, 2018 15:44
@codecov-io
Copy link

Codecov Report

Merging #183 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #183   +/-   ##
=======================================
  Coverage   98.15%   98.15%           
=======================================
  Files          12       12           
  Lines         652      652           
  Branches       55       55           
=======================================
  Hits          640      640           
  Misses         12       12
Impacted Files Coverage Δ
test/fixtures.ts 100% <100%> (ø) ⬆️
src/util.ts 100% <100%> (ø) ⬆️
test/test-kitchen.ts 100% <100%> (ø) ⬆️
test/test-lint.ts 100% <100%> (ø) ⬆️
test/test-init.ts 100% <100%> (ø) ⬆️
test/test-format.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2b5bbd...07ea10c. Read the comment docs.

@@ -4,7 +4,6 @@
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"declaration": true,
"esModuleInterop": true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to disable synthetic default imports as well? Or am I getting my compiler flag wires crossed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.. esModuleInterop implicitly enables synthetic imports. See here: https://www.typescriptlang.org/docs/handbook/compiler-options.html

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D'oh.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ofrobots ofrobots merged commit 94360af into google:master Jul 3, 2018
@ofrobots ofrobots deleted the no-esmoduleinterop branch July 3, 2018 16:50
ofrobots added a commit to ofrobots/ts-style that referenced this pull request Jul 3, 2018
BREAKING CHANGE: Similar to google#183, also disable synthetic imports.
ofrobots added a commit that referenced this pull request Jul 3, 2018
BREAKING CHANGE: Similar to #183, also disable synthetic imports.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants