Skip to content

chore: add Yarn v1 allow-scripts in update script#1815

Merged
mschile merged 2 commits into
cypress-io:masterfrom
MikeMcC399:update-cypress-yarn-classic
Jul 2, 2026
Merged

chore: add Yarn v1 allow-scripts in update script#1815
mschile merged 2 commits into
cypress-io:masterfrom
MikeMcC399:update-cypress-yarn-classic

Conversation

@MikeMcC399

@MikeMcC399 MikeMcC399 commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Situation

With the rollout of npm@11.16.0 to Node.js 24.18.0 Active LTS, running the script scripts/update-cypress-latest-yarn.sh results in a warning:

npm warn allow-scripts 1 package has install scripts not yet covered by allowScripts:
npm warn allow-scripts   yarn@1.22.22 (preinstall: :; (node ./preinstall.js > /dev/null 2>&1 || true))

Change

Modify scripts/update-cypress-latest-yarn.sh to install Yarn Classic with:

npm install yarn@1 --global --allow-scripts=yarn

Verification

Ubuntu 24.04.4 LTS, Node.js 24.18.0 LTS and execute:

./scripts/update-cypress-latest-yarn.sh

Confirm no npm allow-scripts warnings appear.


Note

Low Risk
Dev-only script change with no runtime, auth, or production impact.

Overview
Updates both global Yarn Classic installs in scripts/update-cypress-latest-yarn.sh from npm install yarn@1 -g to npm install yarn@1 --global --allow-scripts=yarn.

This opts in to Yarn v1’s install lifecycle scripts under npm 11.16+ (e.g. on Node.js 24.18 LTS), so running the Cypress example update script no longer emits allow-scripts warnings for yarn@1.22.22.

Reviewed by Cursor Bugbot for commit 68ca682. Bugbot is set up for automated code reviews on this repo. Configure here.

@cypress-app-bot

Copy link
Copy Markdown
Collaborator

@MikeMcC399 MikeMcC399 added the type: enhancement New feature or request label Jul 2, 2026
@MikeMcC399 MikeMcC399 self-assigned this Jul 2, 2026
@MikeMcC399
MikeMcC399 marked this pull request as ready for review July 2, 2026 08:14
@MikeMcC399
MikeMcC399 requested a review from mschile July 2, 2026 08:15
@mschile
mschile merged commit f721894 into cypress-io:master Jul 2, 2026
95 checks passed
@MikeMcC399
MikeMcC399 deleted the update-cypress-yarn-classic branch July 2, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants