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: ES Module #420

Merged
merged 3 commits into from
Jan 31, 2025
Merged

feat: ES Module #420

merged 3 commits into from
Jan 31, 2025

Conversation

babblebey
Copy link
Member

@babblebey babblebey commented Jan 30, 2025

This PR converts the plugin to ESM only.

Related to semantic-release/semantic-release#2133

BREAKING CHANGE: @semantic-release/exec is now a native ES Module. It has named exports for each plugin hook (verifyConditions, analyzeCommits, verifyRelease, generateNotes, prepare, publish, addChannel, success, fail)

BREAKING CHANGE: the minimum required version of semantic-release to use @semantic-release/exec is now v24.1.0; the warn logger method/function is now available to use in plugin

Other Changes Made

  • Replaced xo with prettier with default configuration; following newly established convention
  • Replaced nyc with c8 for code coverage
  • Replaced lodash with lodash-es for proper esm support

Related Issue

Promoting #411 to Stable Release

babblebey and others added 3 commits November 18, 2024 13:48
* refactor: Convert require statements to ES6 imports

* refactor: use `lodash-es` instead of `lodash`

* refactor: remove `#readme` from `"package.json".homepage`

* refactor: update "package.json" exports field for `esm`

* refactor: use `createRequire` to get `homepage` from `package.json`

* refactor: update `lib` functions to use named exports

* refactor: update debug import in index.js

* refactor: add "type" field to package.json

* refactor: update import paths to `../index.js` in test files

* refactor: replace `xo` with `prettier`

* fix: `npm audit fix` package in lockfile

* refactor: bump `semantic-release` peer-dependencies version

* refactor: update Node.js versions in test workflow

Update the Node.js versions in the test workflow to include 20.8.1, 20, and 21. This ensures compatibility with different versions of Node.js during testing.

Also, replace the deprecated "npm ci" command with "npm clean-install" to install dependencies.

Additionally, add a step to run "npm audit signatures" to check for any security issues in the dependencies.

Finally, include a step to scan the lockfile for security issues using "lockfile-lint".

* refactor: Update Node.js versions in test workflow

* refactor: temporarily Remove `npm audit signatures` step in test workflow

* fix(lint): initial prettier lint

* refactor: update `semantic-release` peer-dependencies version

BREAKING CHANGE: the minimum required version of semantic-release to use `@semantic-release/exec` is now v24.1.0; the warn logger method/function is now available to use in plugin

* refactor: replace `nyc` with `c8` as package for code coverage

* refactor: update Node.js versions in package-lock.json and package.json

* refactor: update `semantic-release` peer-dependencies version

* Update .github/workflows/test.yml

Co-authored-by: Matt Travi <[email protected]>

* refactor: update package.json to use fixed versions for `prettier` and `semantic-release`

* refactor: add main entry point to package.json

BREAKING CHANGE: `@semantic-release/exec` is now a native ES Module. It has named exports for each plugin hook (verifyConditions, analyzeCommits, verifyRelease, generateNotes, prepare, publish, addChannel, success, fail)

---------

Co-authored-by: Matt Travi <[email protected]>
@babblebey babblebey requested a review from travi January 30, 2025 23:19
@travi
Copy link
Member

travi commented Jan 31, 2025

thanks so much for this work!

@travi travi merged commit 36ec29c into master Jan 31, 2025
9 checks passed
Copy link

🎉 This PR is included in version 7.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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants