-
Notifications
You must be signed in to change notification settings - Fork 25
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 #411
base: beta
Are you sure you want to change the base?
feat: ES Module #411
Conversation
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".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is great! thanks so much for taking this step!
just a few minor details that i spotted that i think could use tweaks, but excited to get this merged :)
- 16 | ||
- 20.8.1 | ||
- 20 | ||
- 21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 21 | |
- 22 |
since v21 is EOL at this point and v22 becomes LTS before the end of october
# https://github.com/lirantal/lockfile-lint#readme | ||
- name: Scan lockfile for security issues | ||
run: npx lockfile-lint --path package-lock.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the other repos with more recent changes, we've moved this into the scripts in package.json
that end up getting called from npm t
this changeset is a good reference for the group of changes that are related to what i'm highlighting here. i would also be ok with these changes being a follow-up to this PR, but the changes you are making in this PR set us up for those changes to make sense whichever way you decide is best
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after a little more thought, i think it may make sense to hold off on changing this for a follow-up instead of adding into this one. still open to either option, but i think splitting from this isolates things a little better
"c8": "^10.1.2", | ||
"semantic-release": "^24.1.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super minor since renovate will pin these after they are merged anyway, but more for awareness, our typical practice is to pin dev-deps to exact versions and leave prod-deps as ranges
"parse-json": "^5.0.0" | ||
"lodash-es": "^4.17.21", | ||
"parse-json": "^5.0.0", | ||
"prettier": "^3.3.3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prettier should be under dev-deps
], | ||
"all": true | ||
}, | ||
"exports": "./index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i know main
isnt strictly needed after switching to exports
, but i've hit enough snags with removing it from other projects, that i think it is still best to keep around for backward compatibility for now. lets have both exports
and main
set to the same value
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; thewarn
logger method/function is now available to use in pluginOther Changes Made
xo
withprettier
with default configuration; following newly established conventionnyc
withc8
for code coveragelodash
withlodash-es
for properesm
supportRelated Issues/PR
Closes #283
Closes #406
Closes #407
Screencast
screencast-github_com-2024_10_17-20_48_14.mp4