From 70451540f06aabf71e570ffd77c9c9724d42a246 Mon Sep 17 00:00:00 2001
From: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
Date: Sun, 24 Mar 2024 18:14:07 +0100
Subject: [PATCH] Harmonize package manager install / add instructions
---
docs/guides/component-testing/angular/overview.mdx | 2 +-
docs/guides/component-testing/getting-started.mdx | 2 +-
docs/guides/component-testing/react/overview.mdx | 2 +-
docs/guides/component-testing/svelte/overview.mdx | 2 +-
docs/guides/component-testing/vue/overview.mdx | 2 +-
docs/guides/continuous-integration/introduction.mdx | 2 +-
.../migration/protractor-to-cypress.mdx | 8 ++++----
.../testing-strategies/amazon-cognito-authentication.mdx | 2 +-
docs/guides/getting-started/installing-cypress.mdx | 4 ++--
docs/guides/guides/launching-browsers.mdx | 2 +-
docs/guides/guides/test-retries.mdx | 2 +-
docs/guides/references/migration-guide.mdx | 8 ++++----
docs/guides/tooling/code-coverage.mdx | 2 +-
docs/guides/tooling/reporters.mdx | 4 ++--
docs/guides/tooling/typescript-support.mdx | 4 ++--
docs/guides/tooling/visual-testing.mdx | 2 +-
16 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/docs/guides/component-testing/angular/overview.mdx b/docs/guides/component-testing/angular/overview.mdx
index ccd6cf99f5..b47b63050b 100644
--- a/docs/guides/component-testing/angular/overview.mdx
+++ b/docs/guides/component-testing/angular/overview.mdx
@@ -20,7 +20,7 @@ To get up and running with Cypress Component Testing in Angular, install Cypress
into your project:
```bash
-npm install cypress -D
+npm install cypress --save-dev
```
Open Cypress:
diff --git a/docs/guides/component-testing/getting-started.mdx b/docs/guides/component-testing/getting-started.mdx
index cfa7de50f0..698bc4edd2 100644
--- a/docs/guides/component-testing/getting-started.mdx
+++ b/docs/guides/component-testing/getting-started.mdx
@@ -18,7 +18,7 @@ Getting started with Component Testing is super simple. Follow the guide below f
To begin we need to install Cypress in your project if you have not already done so.
```bash
-npm install cypress -D
+npm install cypress --save-dev
```
### Open Cypress
diff --git a/docs/guides/component-testing/react/overview.mdx b/docs/guides/component-testing/react/overview.mdx
index b0d515b3ab..07f7c3aade 100644
--- a/docs/guides/component-testing/react/overview.mdx
+++ b/docs/guides/component-testing/react/overview.mdx
@@ -26,7 +26,7 @@ To get up and running with Cypress Component Testing in React, install Cypress
into your project:
```bash
-npm install cypress -D
+npm install cypress --save-dev
```
Open Cypress:
diff --git a/docs/guides/component-testing/svelte/overview.mdx b/docs/guides/component-testing/svelte/overview.mdx
index cd9c773b6f..a5d0bb9326 100644
--- a/docs/guides/component-testing/svelte/overview.mdx
+++ b/docs/guides/component-testing/svelte/overview.mdx
@@ -30,7 +30,7 @@ To get up and running with Cypress Component Testing in Svelte, install Cypress
into your project:
```bash
-npm install cypress -D
+npm install cypress --save-dev
```
Open Cypress:
diff --git a/docs/guides/component-testing/vue/overview.mdx b/docs/guides/component-testing/vue/overview.mdx
index fbd3c6a43d..d71ff0d640 100644
--- a/docs/guides/component-testing/vue/overview.mdx
+++ b/docs/guides/component-testing/vue/overview.mdx
@@ -25,7 +25,7 @@ To get up and running with Cypress Component Testing in Vue, install Cypress
into your project:
```bash
-npm install cypress -D
+npm install cypress --save-dev
```
Open Cypress:
diff --git a/docs/guides/continuous-integration/introduction.mdx b/docs/guides/continuous-integration/introduction.mdx
index 9a6ff7093c..f5cd8c681f 100644
--- a/docs/guides/continuous-integration/introduction.mdx
+++ b/docs/guides/continuous-integration/introduction.mdx
@@ -107,7 +107,7 @@ If the server takes a very long time to start, we recommend trying the
module.
```shell
-npm install --save-dev start-server-and-test
+npm install start-server-and-test --save-dev
```
In your `package.json` scripts, pass the command to boot your server, the url
diff --git a/docs/guides/end-to-end-testing/migration/protractor-to-cypress.mdx b/docs/guides/end-to-end-testing/migration/protractor-to-cypress.mdx
index d23bd23052..43558762eb 100644
--- a/docs/guides/end-to-end-testing/migration/protractor-to-cypress.mdx
+++ b/docs/guides/end-to-end-testing/migration/protractor-to-cypress.mdx
@@ -252,14 +252,14 @@ Cypress manually.
```bash
-npm install --save-dev cypress
+npm install cypress --save-dev
```
```bash
-yarn add --dev cypress
+yarn add cypress --dev
```
@@ -274,14 +274,14 @@ Angular app for Cypress to run tests against your application.
```bash
-npm install --save-dev concurrently
+npm install concurrently --save-dev
```
```bash
-yarn add --dev concurrently
+yarn add concurrently --dev
```
diff --git a/docs/guides/end-to-end-testing/testing-strategies/amazon-cognito-authentication.mdx b/docs/guides/end-to-end-testing/testing-strategies/amazon-cognito-authentication.mdx
index bc4a12664e..abd61db69e 100644
--- a/docs/guides/end-to-end-testing/testing-strategies/amazon-cognito-authentication.mdx
+++ b/docs/guides/end-to-end-testing/testing-strategies/amazon-cognito-authentication.mdx
@@ -135,7 +135,7 @@ and install the [AWS Amazon Amplify CLI](https://docs.amplify.aws/cli) as
follows:
```jsx
-npm install -g @aws-amplify/cli
+npm install @aws-amplify/cli --global
```
The
diff --git a/docs/guides/getting-started/installing-cypress.mdx b/docs/guides/getting-started/installing-cypress.mdx
index 021bfe0bf1..8403f8c786 100644
--- a/docs/guides/getting-started/installing-cypress.mdx
+++ b/docs/guides/getting-started/installing-cypress.mdx
@@ -89,13 +89,13 @@ cd /your/project/path
```
```shell
-pnpm add cypress -D
+pnpm add --save-dev cypress
```
:::info
You need to make sure that you have the `pnpm` environment installed locally.
-If not you need to install it: `npm install pnpm@latest -g`.
+If not you need to install it: `npm install pnpm@latest --global`.
:::
diff --git a/docs/guides/guides/launching-browsers.mdx b/docs/guides/guides/launching-browsers.mdx
index 367e4641c3..8ddeb44a5f 100644
--- a/docs/guides/guides/launching-browsers.mdx
+++ b/docs/guides/guides/launching-browsers.mdx
@@ -178,7 +178,7 @@ these steps:
1. Add `experimentalWebKitSupport: true` to your
[configuration](/guides/references/configuration) to enable the experiment.
2. Install the `playwright-webkit` npm package in your repo to acquire WebKit
- itself: `npm install --save-dev playwright-webkit@1.34`.
+ itself: `npm install playwright-webkit@1.34 --save-dev`.
- We built this experiment on top of the Playwright WebKit browser as a
stepping stone towards creating a better UX with Cypress-provided browsers
in the future. Thank you, Playwright contributors.
diff --git a/docs/guides/guides/test-retries.mdx b/docs/guides/guides/test-retries.mdx
index 8bd03c8316..f13f0a5e34 100644
--- a/docs/guides/guides/test-retries.mdx
+++ b/docs/guides/guides/test-retries.mdx
@@ -262,7 +262,7 @@ retry attempts or failures when using Cypress test retries.
```ts
// need to install these dependencies
-// npm i lodash del --save-dev
+// npm install lodash del --save-dev
import _ from 'lodash'
import del from 'del'
```
diff --git a/docs/guides/references/migration-guide.mdx b/docs/guides/references/migration-guide.mdx
index 240cb25c50..19933ad10a 100644
--- a/docs/guides/references/migration-guide.mdx
+++ b/docs/guides/references/migration-guide.mdx
@@ -2023,7 +2023,7 @@ The Component Test Runner requires the following dependencies:
[installation steps](/guides/tooling/code-coverage)).
```shell
-npm i cypress @cypress/react @cypress/webpack-dev-server -D
+npm install cypress @cypress/react @cypress/webpack-dev-server --save-dev
```
**Install Vue 3 dependencies**
@@ -2034,7 +2034,7 @@ npm i cypress @cypress/react @cypress/webpack-dev-server -D
[`@cypress/webpack-dev-server`](https://www.npmjs.com/package/@cypress/webpack-dev-server).
```shell
-npm i cypress @cypress/vue@next @cypress/webpack-dev-server -D
+npm install cypress @cypress/vue@next @cypress/webpack-dev-server --save-dev
```
**Install Vue 2 dependencies**
@@ -2045,7 +2045,7 @@ npm i cypress @cypress/vue@next @cypress/webpack-dev-server -D
[`@cypress/webpack-dev-server`](https://www.npmjs.com/package/@cypress/webpack-dev-server).
```shell
-npm i cypress @cypress/vue @cypress/webpack-dev-server -D
+npm install cypress @cypress/vue @cypress/webpack-dev-server --save-dev
```
#### 3. Update plugins file to use `dev-server:start`
@@ -2299,7 +2299,7 @@ for the latest steps.
If you use `cy.react()` in your tests, you must manually install
[`cypress-react-selector`](https://www.npmjs.com/package/cypress-react-selector)
-with `npm i cypress-react-selector -D`. You do not need to update your support
+with `npm install cypress-react-selector --save-dev`. You do not need to update your support
file.
#### HTML Side effects
diff --git a/docs/guides/tooling/code-coverage.mdx b/docs/guides/tooling/code-coverage.mdx
index 7b24898b35..16a79c26d1 100644
--- a/docs/guides/tooling/code-coverage.mdx
+++ b/docs/guides/tooling/code-coverage.mdx
@@ -298,7 +298,7 @@ documentation for up-to-date installation instructions.
:::
```shell
-npm install -D @cypress/code-coverage
+npm install @cypress/code-coverage --save-dev
```
Then add the code below to the
diff --git a/docs/guides/tooling/reporters.mdx b/docs/guides/tooling/reporters.mdx
index ee71133535..4c6d37437c 100644
--- a/docs/guides/tooling/reporters.mdx
+++ b/docs/guides/tooling/reporters.mdx
@@ -194,7 +194,7 @@ We need to install additional dependencies:
with Cypress
```shell
-npm install --save-dev cypress-multi-reporters mocha-junit-reporter
+npm install cypress-multi-reporters mocha-junit-reporter --save-dev
```
Specify your reporter and reporterOptions in your Cypress configuration or via
@@ -280,7 +280,7 @@ JSON file per test file, and then combine all JSON reports into a single report.
We need to install some additional dependencies.
```shell
-npm install --save-dev mochawesome mochawesome-merge mochawesome-report-generator
+npm install mochawesome mochawesome-merge mochawesome-report-generator --save-dev
```
We need to configure the reporter in your
diff --git a/docs/guides/tooling/typescript-support.mdx b/docs/guides/tooling/typescript-support.mdx
index 36b14b35f5..7fdfbe6079 100644
--- a/docs/guides/tooling/typescript-support.mdx
+++ b/docs/guides/tooling/typescript-support.mdx
@@ -17,14 +17,14 @@ install it:
```shell
-npm install --save-dev typescript
+npm install typescript --save-dev
```
```shell
-yarn add --dev typescript
+yarn add typescript --dev
```
diff --git a/docs/guides/tooling/visual-testing.mdx b/docs/guides/tooling/visual-testing.mdx
index 10f109bab0..bb3e088db7 100644
--- a/docs/guides/tooling/visual-testing.mdx
+++ b/docs/guides/tooling/visual-testing.mdx
@@ -91,7 +91,7 @@ it('completes todo', () => {
cy.contains('.todo-list li', 'write tests').should('have.class', 'completed')
- // run 'npm i cypress-plugin-snapshots -S'
+ // run 'npm install cypress-plugin-snapshots --save'
// capture the element screenshot and
// compare to the baseline image
cy.get('.todoapp').toMatchImageSnapshot({