Skip to content

fix(Window): Avoid re‑assigning module.exports#2771

Closed
ExE-Boss wants to merge 1 commit intojsdom:masterfrom
ExE-Boss:fix/window/no-exports-reassign
Closed

fix(Window): Avoid re‑assigning module.exports#2771
ExE-Boss wants to merge 1 commit intojsdom:masterfrom
ExE-Boss:fix/window/no-exports-reassign

Conversation

@ExE-Boss
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants