Support ESM for custom changelog and commit options#1774
Merged
Conversation
🦋 Changeset detectedLatest commit: 7226ebc The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1774 +/- ##
==========================================
- Coverage 81.05% 81.00% -0.06%
==========================================
Files 54 54
Lines 2265 2269 +4
Branches 684 681 -3
==========================================
+ Hits 1836 1838 +2
- Misses 424 426 +2
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
reabiliti
approved these changes
Feb 18, 2026
|
@Andarist hi, would you take a look? Needs this changes to use custom changeset generator in esm libs |
Andarist
approved these changes
Feb 28, 2026
Merged
This was referenced Apr 3, 2026
nnecec
pushed a commit
to nnecec/changesets-docs
that referenced
this pull request
Apr 16, 2026
* Support ESM for custom changelog and commit options * Handle interop
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.
fix #1406
fix #1510
Use
import()instead ofrequire()so it supports ESM too. Dynamic imports are supported since node 13.2 which I believe is already covered.I also manually tested the return value of
import()compared torequire(), and added a nested.defaultcheck to maintain backwards compatibility. When we support ESM, we can decide whether we want to supportexport const getReleaseLine = ...for example so it doesn't have to be wrapped in a default-exported object. In this PR, I allowed it which required the nested.defaultcheck.While this change is also indirectly fixed in
next#1482, I figured it doesn't hurt to fix in main first.