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
Add a script that generates changelog for patch release #11052
Conversation
|
||
function parseArgv() { | ||
const argv = minimist(process.argv.slice(2)); | ||
const previousVersion = argv["prev-version"]; |
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.
Shouldn't previous version always require("prettier").version
?
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 think that's correct in most cases. However, the release script actually get the previous version in a different way(ref:
prettier/scripts/release/release.js
Lines 20 to 24 in acf9242
const { stdout: previousVersion } = await runGit([ | |
"describe", | |
"--tags", | |
"--abbrev=0", | |
]); |
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.
@fisker What do you think? I want to merge this for next patch version.
- Add ./scripts/changelog-for-patch.mjs - Extract common functions to ./scripts/utils/changelog - Use changelog-for-patch.mjs from release script
194759f
to
15b112b
Compare
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.
LGTM, should we call prettier to format file? Maybe it will fail on lint ?
We call prettier at with prettier/scripts/release/steps/update-changelog.js Lines 80 to 83 in 15b112b
|
Description
./scripts/changelog-for-patch.mjs
./scripts/utils/changelog
changelog-for-patch.mjs
from release scriptChecklist
✨Try the playground for this PR✨