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

Convert to ESM module (BREAKING). Target: end of beta cycle. #126

Closed
gadicc opened this issue Apr 11, 2021 · 4 comments · Fixed by #144
Closed

Convert to ESM module (BREAKING). Target: end of beta cycle. #126

gadicc opened this issue Apr 11, 2021 · 4 comments · Fixed by #144
Labels
meta Project direction, planning, RFCs, etc. released

Comments

@gadicc
Copy link
Owner

gadicc commented Apr 11, 2021

Rationale
Sindre Sorhus: Get Ready For ESM

Implementation
Sindre Sorhus: Pure ESM package

Sugested timeline

  • Target: before first non-beta release (planned around July)
  • When things get quiet on other stuff, perhaps we can release with an rc tag.
@gadicc gadicc added the meta Project direction, planning, RFCs, etc. label Apr 11, 2021
@gadicc
Copy link
Owner Author

gadicc commented Apr 11, 2021

Actually we can do the "Dual" approach from the Rationale link above, then it's not a breaking change. We'll make the library ESM but also have a build step that transpiles a CommonJS fallback.

@advaiyalad
Copy link
Contributor

😆 I was about to open an issue for this! You beat me to it! Yes, I agree. ESModules will a lot better for the rest of the ecosystem.

Suggested Timeline

  • Start planning important/helpful/required breaking changes
  • Incorporate this into that list
  • Release new major version with the changes when the list's length is long enough

Dual

I would say that we should not stick to the dual approach. We can start with it, but we should remove the CJS fallback at the end of April.

@gadicc
Copy link
Owner Author

gadicc commented Apr 12, 2021

Thanks, @PythonCreator27, glad to hear others are on board for this 🙏

Yes, I don't want to support dual moving forward. But I think we can give people a bit more time to get ready if it doesn't cost us anything. Maybe 6 months with a big fat warning with anyone loading the CJS fallback.

From what I understood, as long as we provide the fallback, it won't be a breaking change and should be transparent to the user. It will only be a breaking change / new major version when we drop the fallback.

@gadicc
Copy link
Owner Author

gadicc commented Jun 1, 2021

🎉 This issue has been resolved in version 1.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gadicc gadicc added the released label Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Project direction, planning, RFCs, etc. released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants