-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
chore: improve npm release scripts #4972
Conversation
419eae8
to
2580a8c
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.
+1 to update peer dependencies as part of our version release process 👍
I'd like to discuss few aspects of the proposal, see my comments below.
bin/update-peer-deps.js
Outdated
const pkgVersion = lbModuleVersions[d]; | ||
if (pkgVersion) { | ||
// Update the version range to be `^<major>.0.0` | ||
pkgJson.peerDependencies[d] = `^${semver.major(pkgVersion)}.0.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.
Should we use the actual pkgVersion
, since that's the version we are testing in our CI? If we use MAJOR.0.0
, then it's possible to create a situation where the peer dep spec is too wide, because the extension depends on features introduced in semver-minor version after MAJOR.0.0
.
Another aspect to consider: removing a version from peerDependencies
range is a breaking change, similarly to how dropping support for a Node.js major version is a breaking change too.
It would be great if lerna
was handling these complexities automatically for us, see the discussion in lerna/lerna#955 and lerna/lerna#1018
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.
Let's be conservative to use the ^<pkgVersion>
for peer dependencies as a release is cut.
2580a8c
to
9076742
Compare
@bajtos PTAL. |
Improve npm build scripts:
update-peer-deps
to maintain peer dependencies during the release processversion
phase to ensure testing against latest versions and remove duplicate update.Checklist
👉 Read and sign the CLA (Contributor License Agreement) 👈
npm test
passes on your machinepackages/cli
were updatedexamples/*
were updated👉 Check out how to submit a PR 👈