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

Raise the minimum required version of node #244

Closed
4 tasks done
Tracked by #2054
gr2m opened this issue Jul 30, 2021 · 9 comments · Fixed by #248
Closed
4 tasks done
Tracked by #2054

Raise the minimum required version of node #244

gr2m opened this issue Jul 30, 2021 · 9 comments · Fixed by #248

Comments

@gr2m
Copy link
Member

gr2m commented Jul 30, 2021

Pull request is ready for review: #248


See for reference: semantic-release/semantic-release#2055

  • require a minimum node version of the latest LTS, currently 14.17
  • ensure engines-strict is enforced in the CI of each project to reduce the cases where incompatible dependencies are installed outside of our supported range (example)
  • Make sure to update the docs if we mention a minimal node version anywhere

Bonus:

Pull request welcome! Just comment below if you'd like to work on it and we will assign the issue to you. Thank you for your help 💐

@gr2m gr2m transferred this issue from semantic-release/semantic-release Jul 30, 2021
@gr2m gr2m changed the title semantic-release/commit-analyzer Raise the minimum required version of node Jul 30, 2021
@jpedroh
Copy link

jpedroh commented Aug 11, 2021

Hello!

I'm interested in helping out on this issue :D

@gr2m
Copy link
Member Author

gr2m commented Aug 11, 2021

Hi @jpedroh, thank you for offering to help! It's all yours! Let us know if you have any questions

@jpedroh
Copy link

jpedroh commented Aug 11, 2021

Thanks! Will this follow the same path that is happening in main package? I mean, creating a merge to beta and all?

@gr2m
Copy link
Member Author

gr2m commented Aug 11, 2021

no need for a beta release, we will only use it in the main semantic-release to test the integration of the new plugin versions. For @semantic-release/commit-analyzer we can directly release a breaking version to latest

@jpedroh
Copy link

jpedroh commented Aug 11, 2021

Great. The node version bump is already completed and is available in #246.

I've also started working on the bonus migration to ES module. The main change is dropping require API (used in import-from) in order to use ESM import API. This introduces a change in loadReleaseRules that now returns a promise due to the async nature of import.

https://github.com/jpedroh/commit-analyzer/blob/31869e1799b23b1f2f41c23a6e8c80e5ed35f06e/lib/load-release-rules.js#L20

There's one change to the module's public API though. Because of how imports works in ESM modules, user must insert .js at the end of file name to a successfull import.

@gr2m
Copy link
Member Author

gr2m commented Aug 11, 2021

I've also started working on the bonus migration to ES module

could you please start a separate pull request for further discussion? I could start the PR on your fork against your jpedroh:node-14 branch

There's one change to the module's public API though. Because of how imports works in ESM modules, user must insert .js at the end of file name to a successfull import.

You mean for the releaseNotes option? I think that's reasonable, we should just mention it in the release notes

image

@jpedroh
Copy link

jpedroh commented Aug 11, 2021

could you please start a separate pull request for further discussion? I could start the PR on your fork against your jpedroh:node-14 branch

Sure. Just like in core package, I'm making the ESM changes in a separate branch node-14-esm. I've opened a PR for it (#247).

You mean for the releaseNotes option? I think that's reasonable, we should just mention it in the release notes

image

Indeed! What's good is that README already points towards this behavior:

{
  "plugins": [
    ["@semantic-release/commit-analyzer", {
      "preset": "angular",
      "releaseRules": "./config/release-rules.js"
    }],
    "@semantic-release/release-notes-generator"
  ]
}

With the ESM refactor, using "releaseRules": "./config/release-rules" would throw an error. Even though the documentation already points it, it might be worth to documentate this behaviour - or perhaps even better, just add the .js at the end of the file.

@gr2m
Copy link
Member Author

gr2m commented Aug 11, 2021

Even though the documentation already points it, it might be worth to documentate this behaviour - or perhaps even better, just add the .js at the end of the file.

I think I would just make it explicit in the docs that full path to a .js file is required. And mention it in the breaking changes that while it worked before to leave out the .js extension or to set the path to a folder with an index.js file it no longer will moving forward. I would not add the .js extension if it's missing, rather throw a helpful error. It will reduce code complexity and maintenance overhead

gr2m pushed a commit that referenced this issue Aug 20, 2021
BREAKING CHANGE: the minimum required version of node is now v14.17 (#244)
@gr2m gr2m linked a pull request Aug 21, 2021 that will close this issue
@travi travi mentioned this issue Aug 21, 2021
@github-actions
Copy link

🎉 This issue has been resolved in version 9.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants