From 50b490ad54ab7006b453fd1641cf4c86117d8b36 Mon Sep 17 00:00:00 2001 From: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Date: Mon, 4 Mar 2024 12:31:01 +0100 Subject: [PATCH] misc: use pnpm add for ct dependency scaffolding --- cli/CHANGELOG.md | 4 ++++ packages/data-context/src/sources/WizardDataSource.ts | 2 +- packages/launchpad/cypress/e2e/project-setup.cy.ts | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 44c1fc3c57e..f62fbdab932 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -8,6 +8,10 @@ _Released 2/27/2024 (PENDING)_ - Fixed an issue where `.click()` commands on children of disabled elements would still produce "click" events -- even without `{ force: true }`. Fixes [#28788](https://github.com/cypress-io/cypress/issues/28788). - Changed RequestBody type to allow for boolean and null literals to be passed as body values. [#28789](https://github.com/cypress-io/cypress/issues/28789) +**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). + **Dependency Updates:** - Updated signal-exit from `3.0.3` to `3.0.7`. Addressed in [#28979](https://github.com/cypress-io/cypress/pull/28979). diff --git a/packages/data-context/src/sources/WizardDataSource.ts b/packages/data-context/src/sources/WizardDataSource.ts index 9a400a32177..69864d9e9cc 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 0a119a609f1..337858f26c2 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