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(commonjs): idempotence issue #871

Merged
merged 2 commits into from May 4, 2021
Merged

Conversation

thorn0
Copy link
Contributor

@thorn0 thorn0 commented May 3, 2021

Rollup Plugin Name: commonjs

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

If yes, then include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers: fixes #869

Description

State was erroneously shared between instances.

@thorn0 thorn0 changed the title Fix idempotence issue fix(commonjs): idempotence issue May 3, 2021
@thorn0
Copy link
Contributor Author

thorn0 commented May 3, 2021

I tried to keep the diff small, but IMHO it'd make sense to refactor this promise map into a class: see thorn0@9a2a84b
Should I include that commit in this PR?

@guybedford
Copy link
Contributor

Thank you for taking the time to put the minimal PR together here. If you are open to more of a refactoring that could be worthwhile as well here while you are on it - if creating a class for this it might also be worth having that class designed to hold all other cached state to make for an easier clearing / management process as well. Does that seem like it would neaten things up or add more complexity?

@thorn0
Copy link
Contributor Author

thorn0 commented May 4, 2021

I'd rather have this merged as is now as it blocks the release of Prettier.

@guybedford guybedford merged commit a843654 into rollup:master May 4, 2021
@thorn0 thorn0 deleted the issue-869 branch May 4, 2021 13:43
@thorn0
Copy link
Contributor Author

thorn0 commented May 4, 2021

@guybedford Thanks for the prompt release!

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.

commonjs: requireReturnsDefault: "preferred" yields unstable results
2 participants