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(Window): Avoid re‑assigning module.exports #2771

Closed

Conversation

ExE-Boss
Copy link
Contributor

@ExE-Boss ExE-Boss commented Jan 2, 2020

This also allows us to move the require("../living/interfaces") call to the top.

Note that this will once again cause issues once Window is converted to WebIDL unless jsdom/webidl2js#154 is merged first.


Extracted from #2548.


review?(@pmdartus, @TimothyGu)

Co-Authored-By: Pierre-Marie Dartus <p.dartus@salesforce.com>
@domenic
Copy link
Member

domenic commented Jan 2, 2020

I'd rather figure out a way to break the cycle. In my opinion this just replaces one hack around circular requires with another hack around circular requires.

@ExE-Boss
Copy link
Contributor Author

ExE-Boss commented Jan 2, 2020

Adding properties to exports isn’t a hack around  circular requires, as that's also what’s closer to how ECMAScript modules behave.

@domenic
Copy link
Member

domenic commented Jan 2, 2020

I disagree.

@domenic domenic closed this Jan 3, 2020
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.

None yet

3 participants