Skip to content

test: move side-effects-cache=false for pnpm #1435

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

Merged

Conversation

MikeMcC399
Copy link
Collaborator

Issue

  1. In order to disable the pnpm side effects cache, to prevent pnpm from skipping Cypress binary installation if the Cypress npm module is already cached, the Cypress documentation > pnpm Configuration now recommends using:

    pnpm config set side-effects-cache false --location project

    This uses ini-syntax and is compatible with pnpm 9.x and earlier 10.x versions. Later versions, such as [email protected] also accept this syntax and convert it into json-syntax using sideEffectsCache.

  2. When the above command is executed on a empty [email protected] project it writes now to the file pnpm-workspace.yaml instead of to .npmrc.

  3. The pnpm bookmark https://pnpm.io/npmrc#side-effects-cache no longer exists. It has been moved to https://pnpm.io/settings#sideeffectscache as part of https://pnpm.io/settings#build-settings.

Change

In the README.md > pnpm document section, link to https://on.cypress.io/install#pnpm-Configuration so that pnpm configuration instructions are not repeated and can be maintained in one place, on the Cypress documentation site for general use.

In

delete .npmrc and apply

pnpm config set side-effects-cache false --location project

to update the corresponding pnpm-workspace.yaml file with sideEffectsCache: false

@cypress-app-bot
Copy link

@MikeMcC399 MikeMcC399 added documentation Improvements or additions to documentation topic: caching 📦 tests labels Apr 24, 2025
@MikeMcC399 MikeMcC399 self-assigned this Apr 24, 2025
@MikeMcC399 MikeMcC399 marked this pull request as ready for review April 24, 2025 16:06
@MikeMcC399

This comment was marked as outdated.

@jennifer-shehane jennifer-shehane merged commit 6fb569f into cypress-io:master Apr 24, 2025
76 checks passed
@MikeMcC399 MikeMcC399 deleted the pnpm-side-effects-cache branch April 24, 2025 16:39
Copy link

🎉 This PR is included in version 6.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation released tests topic: caching 📦
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants