misc: use pnpm add for ct dependency scaffolding #29056
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
pnpm install
notadd
#29052Additional details
Cypress Component Testing was instructing the user to add framework dependencies using
pnpm install
when the underlying project was using pnpm as package manager. This was inconsistent with the pnpm cli documentation which listspnpm add <pkg>
as the appropriate command to add a package.Steps to test
22.04.4
LTS18.17.1
Prepare project
cy-pnpm-ct
npm install pnpm@latest -g mkdir cy-pnpm-ct cd cy-pnpm-ct git init pnpm init pnpm add cypress -D
Local Cypress build and run
In the Cypress Launchpad use "Add project" to select the directory
cy-pnpm-ct
Select "Component Testing"
Select "Front-end framework" > "Vue CLI (Vue 3)"
Click "Next step"
Note the instruction
Paste the instruction into a separate terminal window which is open in the directory
cy-pnpm-ct
and execute it.Note that it runs successfully.
Back in the Cypress Launchpad confirm that the status message "You've successfully installed all required dependencies." is shown.
How has the user experience changed?
When scaffolding Component Testing for a project using pnpm as package manager the Cypress Launchpad previously showed the instruction to install the required dependencies in the form
and now it shows the instruction in the following form:
BEFORE
AFTER
PR Tasks
cypress-documentation
?The documentation Component Testing > Getting Started only covers npm (not Yarn or pnpm) and does not cover the case where dependencies have not yet been installed, so the changes in this PR do not affect any existing documentation.
type definitions
?