From 82536133a792d2e370f42509e904b386a6dae02c Mon Sep 17 00:00:00 2001 From: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Date: Tue, 12 Mar 2024 17:59:54 +0100 Subject: [PATCH] misc: use pnpm add for ct dependency scaffolding (#29056) Co-authored-by: Jennifer Shehane --- cli/CHANGELOG.md | 1 + packages/data-context/src/sources/WizardDataSource.ts | 2 +- packages/launchpad/cypress/e2e/project-setup.cy.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 006582e5f42c..422b2ae6ec95 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -20,6 +20,7 @@ _Released 3/12/2024 (PENDING)_ **Misc:** +- Changed Component Testing scaffolding instruction to `pnpm add` to add framework dependencies when a project uses pnpm as package manager. Addresses [#29052](https://github.com/cypress-io/cypress/issues/29052). - Command messages in the Cypress command logs will now truncate display at 100 lines instead of 50. Fixes [#29023](https://github.com/cypress-io/cypress/issues/29023). - Capture the `beforeTest` timestamp inside the browser for the purposes of accurately determining test start for Test Replay. Addressed in [#29061](https://github.com/cypress-io/cypress/pull/29061). diff --git a/packages/data-context/src/sources/WizardDataSource.ts b/packages/data-context/src/sources/WizardDataSource.ts index 9a400a32177c..69864d9e9cc0 100644 --- a/packages/data-context/src/sources/WizardDataSource.ts +++ b/packages/data-context/src/sources/WizardDataSource.ts @@ -31,7 +31,7 @@ export class WizardDataSource { async installDependenciesCommand () { const commands = { 'npm': 'npm install -D', - 'pnpm': 'pnpm install -D', + 'pnpm': 'pnpm add -D', 'yarn': 'yarn add -D', } as const diff --git a/packages/launchpad/cypress/e2e/project-setup.cy.ts b/packages/launchpad/cypress/e2e/project-setup.cy.ts index 077e2d7ffe53..9a1bb69b436d 100644 --- a/packages/launchpad/cypress/e2e/project-setup.cy.ts +++ b/packages/launchpad/cypress/e2e/project-setup.cy.ts @@ -581,7 +581,7 @@ describe('Launchpad: Setup Project', () => { cy.get('[data-testid="select-framework"]').click() cy.findByText('Create React App').click() cy.contains('button', 'Next step').should('not.be.disabled').click() - cy.findByDisplayValue('pnpm install -D react-scripts react-dom react') + cy.findByDisplayValue('pnpm add -D react-scripts react-dom react') }) // TODO: Had to revert due to regression: https://github.com/cypress-io/cypress/pull/26452