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 (and transition to ESM) #259

Closed
3 of 4 tasks
Tracked by #2054
gr2m opened this issue Jul 30, 2021 · 12 comments · Fixed by #267
Closed
3 of 4 tasks
Tracked by #2054

Raise the minimum required version of node (and transition to ESM) #259

gr2m opened this issue Jul 30, 2021 · 12 comments · Fixed by #267

Comments

@gr2m
Copy link
Member

gr2m commented Jul 30, 2021

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/release-notes-generator Raise the minimum required version of node Jul 30, 2021
@abel-mak
Copy link
Contributor

Hi, is modification of the minimum required version should be in package.json in engines?

@gr2m
Copy link
Member Author

gr2m commented Aug 23, 2021

yes, but there are more places you need to change. See this pull request for comparison, it also includes the change to ESM:
semantic-release/commit-analyzer#248

Here is the commit which bumps the minimal required version:
semantic-release/commit-analyzer@e7e56f6

@abel-mak
Copy link
Contributor

the changes should be in beta branch?

@gr2m
Copy link
Member Author

gr2m commented Aug 23, 2021

no, but the pull request should be opened against the beta branch

abel-mak added a commit to abel-mak/release-notes-generator that referenced this issue Aug 23, 2021
gr2m pushed a commit that referenced this issue Aug 23, 2021
BREAKING CHANGE: the minimum required version of node is now v14.17.
@abel-mak
Copy link
Contributor

abel-mak commented Aug 25, 2021

Hey, i tried with esm part but some test are not passing, related to proxyquire

@gr2m
Copy link
Member Author

gr2m commented Aug 25, 2021

Ah yes we've seen this elsewhere. @travi suggested an alternative. Can you start a pull request with your current changes and we take it from there?

abel-mak added a commit to abel-mak/release-notes-generator that referenced this issue Aug 25, 2021
@gr2m gr2m changed the title Raise the minimum required version of node Raise the minimum required version of node (and transition to ESM) Aug 25, 2021
@gr2m
Copy link
Member Author

gr2m commented Aug 25, 2021

found the comment. Can you try to replace proxyquire with https://github.com/testdouble/testdouble.js?

@abel-mak
Copy link
Contributor

the problem is this line

const {generateNotes} = proxyquire('..', {'conventional-changelog-writer': writer});

should it be?

const {generateNotes} = await td.replaceEsm('../index.js');

@gr2m
Copy link
Member Author

gr2m commented Aug 25, 2021

should it be?

const {generateNotes} = await td.replaceEsm('../index.js');

I don't know, I havent used testdouble myself yet. Could you give it a try and see if the tests pass?

@abel-mak
Copy link
Contributor

not it doesn't, but now the error is not related to that line, but instead this

  t.deepEqual(writer.args[0][0], {
    version: nextRelease.version,
    host,
    owner,
    repository,
    previousTag: lastRelease.gitTag,
    currentTag: nextRelease.gitTag,
    linkCompare: lastRelease.gitTag,
    issue: 'issues',
    commit: 'commit',
    packageData: undefined,
    linkReferences: undefined,
  });

Error:

 TypeError {
    message: 'Cannot read property \'0\' of undefined',
  }

@gr2m
Copy link
Member Author

gr2m commented Aug 25, 2021

I can't look into it myself before Aug 3rd. I'd appreciate if you or someone else could dig into it and try to figure out the errors

@github-actions
Copy link

🎉 This issue has been resolved in version 10.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