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

feat: esm #247

Merged
merged 4 commits into from Aug 21, 2021
Merged

feat: esm #247

merged 4 commits into from Aug 21, 2021

Conversation

jpedroh
Copy link

@jpedroh jpedroh commented Aug 11, 2021

BREAKING CHANGE: @semantic-release/commit-analyzer is now a native ES Module

BREAKING CHANGE: When setting the releaseRules option to a path, the path must include the .js extension, and the file must be an ES Module itself, exporting an array as default

Before:

{
  "plugins": [
    ["@semantic-release/commit-analyzer", {
      "preset": "angular",
      "releaseRules": "./config/release-rules"
    }],
    "@semantic-release/release-notes-generator"
  ]
}
// File: config/release-rules.js
module.exports = [
  {type: 'docs', scope: 'README', release: 'patch'},
  {type: 'refactor', scope: 'core-*', release: 'minor'},
  {type: 'refactor', release: 'patch'},
];

After:

{
  "plugins": [
    ["@semantic-release/commit-analyzer", {
      "preset": "angular",
      "releaseRules": "./config/release-rules.js"
    }],
    "@semantic-release/release-notes-generator"
  ]
}
// File: config/release-rules.js
export default [
  {type: 'docs', scope: 'README', release: 'patch'},
  {type: 'refactor', scope: 'core-*', release: 'minor'},
  {type: 'refactor', release: 'patch'},
];

@gr2m gr2m changed the base branch from master to beta August 20, 2021 21:19
@gr2m
Copy link
Member

gr2m commented Aug 20, 2021

fyi I rebased on latest beta

@gr2m gr2m changed the title Conversion to native ES Module feat: esm Aug 20, 2021
Copy link
Member

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me now.

Anything you'd like to add @jpedroh @travi?

@jpedroh
Copy link
Author

jpedroh commented Aug 21, 2021

Looks good to me.

Let beta begin!

@gr2m
Copy link
Member

gr2m commented Aug 21, 2021

@travi I'm going to merge, it's only going into the beta anyway, so if we missed something we can still address it in #248

@gr2m gr2m merged commit a773c8b into semantic-release:beta Aug 21, 2021
@github-actions
Copy link

🎉 This PR is included in version 9.0.0-beta.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@travi
Copy link
Member

travi commented Aug 21, 2021

makes sense to me. the only situation i can think of that might cause us to back-track is if we determine that we aren't able to move forward with moving the core package to ESM-only.

just to confirm, does the mention of the async change impact the consumption of this package? i'm mainly trying to consider the consumption in the core package and ensuring that peer dependencies communicate what they should.

@jpedroh
Copy link
Author

jpedroh commented Aug 21, 2021

makes sense to me. the only situation i can think of that might cause us to back-track is if we determine that we aren't able to move forward with moving the core package to ESM-only.

just to confirm, does the mention of the async change impact the consumption of this package? i'm mainly trying to consider the consumption in the core package and ensuring that peer dependencies communicate what they should.

I believe the change won't affect it, since the main package - the one that calls it - is async as well, even before this BC. To my mind, it's just an implementation detail of the module.

@travi
Copy link
Member

travi commented Aug 21, 2021

I believe the change won't affect it, since the main package - the one that calls it - is async as well, even before this BC. To my mind, it's just an implementation detail of the module.

great! thank you for confirming :)

@jpedroh jpedroh deleted the node-14-esm branch August 22, 2021 14:50
travi added a commit that referenced this pull request Sep 3, 2021
This reverts commit a773c8b.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants