feat(esm): Adding experimental support for ESM apps (1/n)#349
Merged
Conversation
✅ Deploy Preview for cedarjs canceled.
|
This was referenced Aug 9, 2025
Tobbe
added a commit
that referenced
this pull request
Aug 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With #80 in such a great place ✅ I had to decide on how to actually merge it into the code base
I had two options in my mind
I was going to do option 2 first, but then when I saw how much #80 grew over time (it was at over 400 changed files at one point!) I started leaning more and more towards 1. So I updated all templates, test fixtures, generators etc to only use ESM syntax.
If I did option 1 I'd release ESM-only CedarJS as v1.0.0, and that version could then also include a few other breaking changes I have lined up.
But as I started thinking more about it I'm back at option 2.
If I add ESM support in a backwards compatible way I can release it as minor versions. That way I can potentially get more people to try it out earlier/easier. And I can release smaller major versions with other breaking changes alongside working on full ESM support.
So this PR is the first step of adding ESM-only code in a way that's backwards compatible. I start by adding ESM test fixtures and templates. There's currently no way to set up a new Cedar app using those templates, and the test fixtures aren't used yet. But this lets me merge a big chunk of the ESM changes in #80 without any disruption to existing apps or disruption to my ability to release new patches and minor versions of CedarJS
For posterity, this is where #80 was at when I created this PR:
