Conversation
This commit updates the code to use ES6 module syntax by replacing the `require` statements with `import` statements. This improves the code readability and maintainability. Refactor the `index.js` file to use ES6 module syntax Refactor the `lib/definitions/errors.js` file to use ES6 module syntax Refactor the `lib/get-error.js` file to use ES6 module syntax Refactor the `lib/git.js` file to use ES6 module syntax Refactor the `lib/prepare.js` file to use ES6 module syntax Refactor the `lib/resolve-config.js` file to use ES6 module syntax Refactor the `lib/verify.js` file to use ES6 module syntax
…rom `"package.json".homepage`;
…e support - Bump @semantic-release/error from ^3.0.0 to ^4.0.0 - Bump aggregate-error from ^3.0.0 to ^5.0.0 - Bump execa from ^5.0.0 to ^9.0.0 - Bump p-reduce from ^2.0.0 to ^3.0.0 - Update devDependencies: - Bump ava from 3.15.0 to 6.2.0 - Add c8 for coverage reporting - Bump prettier from ^3.3.3 to 3.5.3 - Bump semantic-release from 21.1.2 to 24.2.1 - Bump sinon from 17.0.1 to 19.0.2 - Bump tempy from 1.0.1 to 3.1.0 - Update Node.js engine support to ^22.14.0 || >= 24.10.0 - Add pretest script to run linting before tests - Replace nyc with c8 for test coverage reporting - Update peerDependencies for semantic-release to >=24.1.0
- Changed require statements to import statements in integration, prepare, and verify tests. - Replaced fs-extra's outputFile with native fs/promises methods for file operations. - Updated test cases to enhance consistency in formatting and structure. - Improved error handling in verification tests for assets and message options.
…and improve Node.js compatibility
…re running ls-engines
- Updated semantic-release to version ^25.0.3 - Updated sinon to version ^21.0.1 - Added npm-run-all to manage parallel test execution - Modified test script to run linting and tests in parallel - Introduced separate test scripts for unit and integration tests
travi
left a comment
There was a problem hiding this comment.
i just spot the one adjustment. then i think this is good to go. thanks a ton for the investment into getting these updated!
it looks like execa is making a true git call, which i would be surprised if it was doing that before. i havent looked deep enough to confirm that or what might need to change. my first thought was to check if there is an execa update available that was unblocked by the esm change, but it looks like youve already updated to the latest major. maybe there was a breaking change, or even just the nature or the esm change, that changed the way that was previously stubbed to allow the call through when it wasnt doing that before |
I don't know how the tests have been passing originally.... but I just found some error relating to the CI runner not having a global git |
- Added lockfile-lint, ls-engines, and publint for improved linting and validation. - Updated linting scripts to include separate commands for prettier and lockfile checks. - Configured lockfile-lint settings for package-lock.json.
This PR converts the plugin to ESM only.
Related to semantic-release/semantic-release#2133
BREAKING CHANGE:
@semantic-release/gitis now a native ES Module. It has named exports for each plugin hook (verifyConditions, prepare)BREAKING CHANGE: the minimum required version of semantic-release to use
@semantic-release/changelogis now v20.1.0Other Notable Changes
@semantic-release/error^3→^4(ESM-only)aggregate-error^3→^5(ESM-only, uses native AggregateError)execa^5→^9(ESM-only, named export)p-reduce^2→^3(ESM-only)clear-module,file-url,fs-extra,get-stream,nycc8for coverage; bumpedava,sinon,tempy,semantic-release,prettier^22.14.0 || >= 24.10.0; peer dep:>=24.1.0nyc→c8, addedpretest, removedtest:ciRelated Issue