-
Notifications
You must be signed in to change notification settings - Fork 4
chore: pnpm migration[KHCP-21042] #890
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
base: main
Are you sure you want to change the base?
Changes from all commits
11e06cc
c1e26f6
03c814b
08eee33
3c3908d
b181bda
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,8 +74,8 @@ jobs: | |
| tag="pr-${{ github.event.pull_request.number }}" | ||
| echo "preid=${preid}" | ||
|
|
||
| # Use yarn to bump the version for the prerelease | ||
| pnpm version prerelease --preid ${preid} --no-git-tag-version --yes --amend | ||
| # Use pnpm to bump the version for the prerelease | ||
| pnpm version prerelease --preid ${preid} --no-git-tag-version --yes | ||
|
|
||
| package_version=$(jq -r ".version" package.json) | ||
| package=@kong/spec-renderer@"${package_version}" | ||
|
|
@@ -88,14 +88,15 @@ jobs: | |
|
|
||
| npm_instructions="" | ||
|
|
||
| pkg=$(pnpm publish --no-git-checks --access public --report-summary --tag "${tag}" | grep "+ "| sed 's/+ //') | ||
| pnpm publish --no-git-checks --access public --tag "${tag}" | ||
|
|
||
| if [[ -z "${pkg}" ]]; then | ||
| if [ $? -ne 0 ]; then | ||
|
Comment on lines
-91
to
+93
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this refactor necessary?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, pnpm v11 changed the publish output format. the CI would fail with
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you leave some more context on the pull request; otherwise, we're just assuming what the changes are. Please leave some context in the areas that were changed |
||
| echo "Error publishing package" | ||
| exit -1 | ||
|
Comment on lines
+91
to
95
|
||
| fi | ||
|
|
||
| npm_instructions="@$(echo ${pkg}|cut -d'@' -f2)@${tag}" | ||
| package_name=$(jq -r ".name" package.json) | ||
| npm_instructions="${package_name}@${tag}" | ||
|
Comment on lines
-98
to
+99
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this refactor necessary?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, |
||
|
|
||
| echo "npm_instructions<<EOF" >> $GITHUB_OUTPUT | ||
| echo -e "$npm_instructions" >> $GITHUB_OUTPUT | ||
|
|
||
This file was deleted.
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.
why is
--amendremoved?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.
amend flag was droppend in pnpm v11. was leading to
ERROR: Unknown option: 'amend'.no-git-tag-versionalready helps ensure no git commit or tag is created here.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.
seems like amend wasn't there in previous versions either. v11 has a native publish flow as mentioned in the highlights section point 6 here - https://pnpm.io/blog/releases/11.0. earlier it used to delegate to the npm CLI where passing extra flags was not erroring.
Uh oh!
There was an error while loading. Please reload this page.
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.
reference to the above comment - https://pnpm.io/pnpm-cli#differences-vs-npm. "Unlike npm, pnpm validates all options"