-
Notifications
You must be signed in to change notification settings - Fork 60.5k
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
NPM/Yarn examples: Use lock file usually #26699
NPM/Yarn examples: Use lock file usually #26699
Conversation
Automatically generated comment ℹ️This comment is automatically generated and will be overwritten every time changes are committed to this branch. The table contains an overview of files in the Content directory changesYou may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.
fpt: Free, Pro, Team |
@SchulteMarkus Thanks so much for submitting a PR! I'll get this triaged for review ⚡ |
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.
@SchulteMarkus - Thank you for submitting this PR.
I've asked someone from our Actions dev team to take a look at this.
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.
@SchulteMarkus - Thanks again for this PR.
One of the Actions developers has taken a look at this and has approved the first part of the changes but said of the changes in the "Example using Yarn" section that the changes use Yarn 2 commands whereas, out of the box, GitHub hosted runners ships with Yarn 1.22.19 (https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md).
To avoid problems if people haven't modified this to upgrade the Yarn version on a runner, we need to be sure that the changes you are proposing will work using Yarn 1.22.19.
Could you check this and confirm here?
content/actions/automating-builds-and-tests/building-and-testing-nodejs.md
Show resolved
Hide resolved
Ui, good that you asked! |
Failure https://github.com/github/docs/actions/runs/5621341748/job/15231953003?pr=26699 seems to be GitHub infrastructure related (status 502). @hubwriter, can you execute the build again? |
Using the yarn.lock file should be the default in build pipelines. To emphasise this, this example comes first.
--frozen-lockfile is legacy[1]. Using the parameters "--immutable --immutable-cache --check-cache"is the replacement for the previous function according to https://yarnpkg.com/cli/install#examples [1] "For backward compatibility we offer an alias under the name of --frozen-lockfile, but it will be removed in a later release." https://yarnpkg.com/cli/install
Using 'npm ci' should be the default in npm build pipelines. To emphasise this, this example comes first.
As GitHub hosted runners are serving Yarn 1.x[1], going back to --frozen-lockfile "If you need reproducible dependencies, which is usually the case with the continuous integration systems, you should pass --frozen-lockfile flag." https://classic.yarnpkg.com/en/docs/cli/install#toc-yarn-install [1] #26699 (review)
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.
@SchulteMarkus - Many thanks for the changes.
I'll get this merged/published now. Thank you for helping to keep the docs up to date. Much appreciated.
Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues ⚡ |
Why:
Replacing --frozen-lockfile with its successorWhat's being changed:
Check off the following:
I have reviewed my changes in staging, available via the View deployment link in this PR's timeline.
data
directory.For content changes, I have completed the self-review checklist.