-
Notifications
You must be signed in to change notification settings - Fork 4
NEW @W-19365711@ Converted package versioning enforcement to git hooks #339
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
Conversation
jfeingold35
left a comment
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 didn't need to change anything in the publishing flow, because the commit in the publishing flow is done via graphQL, which I believe should sidestep Husky entirely.
| git diff --name-only $HEAD_SHA $BASE_SHA > `pwd`/changed_files.txt | ||
| node ./.node-scripts/validate-changed-package-versions.js `pwd`/changed_files.txt |
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.
In addition to the husky precommit stuff... do you want to also update these to use the .scatchfile as well?
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.
We could, but it doesn't matter terribly because there's no chance of the file being committed or anything like that.
| } | ||
| const releasedPackageVersion = getLatestReleasedVersion(changedPackage); | ||
| if (semver.lte(semver.parse(packageVersion.slice(0, packageVersion.length - 9)), semver.parse(releasedPackageVersion))) { | ||
| incorrectlyVersionedPackages.push(`${changedPackage} (currently versioned as ${packageVersion}) is semantically behind latest published release ${releasedPackageVersion}`); |
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 this should say is semantically not ahead of latest... because it could be equal.
stephen-carter-at-sf
left a comment
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.
Please fix my last 2 comments. Then you are good to merge.
No description provided.