Skip to content

Commit 95a9b8c

Browse files
authored
feat!: update cypress to 8.3 and require it to be a peer dependency (#6662)
1 parent 18c1e8b commit 95a9b8c

File tree

5 files changed

+35
-13
lines changed

5 files changed

+35
-13
lines changed

docs/migrations/migrate-from-v4.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Please consider switching to ESLint. You can check out [`tslint-to-eslint-config
121121
### E2E-Cypress Plugin
122122

123123
* Cypress is required as a peer dependency.
124-
* Cypress is updated from v3 to v7. See [Cypress Migration Guide](https://docs.cypress.io/guides/references/migration-guide.html) for detailed instructions of the migration process.
124+
* Cypress is updated from v3 to v8. See [Cypress Migration Guide](https://docs.cypress.io/guides/references/migration-guide.html) for detailed instructions of the migration process.
125125

126126
### E2E-WebDriverIO Plugin
127127

packages/@vue/cli-plugin-e2e-cypress/generator/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ module.exports = api => {
55
})
66

77
api.extendPackage({
8+
devDependencies: {
9+
cypress: require('../package.json').devDependencies.cypress
10+
},
811
scripts: {
912
'test:e2e': 'vue-cli-service test:e2e'
1013
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = api => {
2+
api.extendPackage(pkg => {
3+
const allDeps = {
4+
...pkg.dependencies,
5+
...pkg.devDependencies,
6+
...pkg.optionalDependencies
7+
}
8+
9+
if (!allDeps.cypress) {
10+
return {
11+
devDependencies: {
12+
cypress: require('../package.json').devDependencies.cypress
13+
}
14+
}
15+
}
16+
})
17+
}

packages/@vue/cli-plugin-e2e-cypress/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@
2424
},
2525
"dependencies": {
2626
"@vue/cli-shared-utils": "^5.0.0-beta.3",
27-
"cypress": "^7.1.0",
2827
"eslint-plugin-cypress": "^2.11.2"
2928
},
29+
"devDependencies": {
30+
"cypress": "^8.3.0"
31+
},
3032
"peerDependencies": {
33+
"cypress": "*",
3134
"@vue/cli-service": "^3.0.0 || ^4.0.0 || ^5.0.0-0"
3235
}
3336
}

yarn.lock

+10-11
Original file line numberDiff line numberDiff line change
@@ -1204,10 +1204,10 @@
12041204
exec-sh "^0.3.2"
12051205
minimist "^1.2.0"
12061206

1207-
"@cypress/request@^2.88.5":
1208-
version "2.88.5"
1209-
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.5.tgz#8d7ecd17b53a849cfd5ab06d5abe7d84976375d7"
1210-
integrity sha512-TzEC1XMi1hJkywWpRfD2clreTa/Z+lOrXDCxxBTBPEcY5azdPi56A6Xw+O4tWJnaJH3iIE7G5aDXZC6JgRZLcA==
1207+
"@cypress/request@^2.88.6":
1208+
version "2.88.6"
1209+
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.6.tgz#a970dd675befc6bdf8a8921576c01f51cc5798e9"
1210+
integrity sha512-z0UxBE/+qaESAHY9p9sM2h8Y4XqtsbDCt0/DPOrqA/RZgKi4PkxdpXyK4wCCnSk1xHqWHZZAE+gV6aDAR6+caQ==
12111211
dependencies:
12121212
aws-sign2 "~0.7.0"
12131213
aws4 "^1.8.0"
@@ -1222,13 +1222,12 @@
12221222
isstream "~0.1.2"
12231223
json-stringify-safe "~5.0.1"
12241224
mime-types "~2.1.19"
1225-
oauth-sign "~0.9.0"
12261225
performance-now "^2.1.0"
12271226
qs "~6.5.2"
12281227
safe-buffer "^5.1.2"
12291228
tough-cookie "~2.5.0"
12301229
tunnel-agent "^0.6.0"
1231-
uuid "^3.3.2"
1230+
uuid "^8.3.2"
12321231

12331232
"@cypress/xvfb@^1.2.4":
12341233
version "1.2.4"
@@ -8510,12 +8509,12 @@ cyclist@^1.0.1:
85108509
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
85118510
integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=
85128511

8513-
cypress@^7.1.0:
8514-
version "7.7.0"
8515-
resolved "https://registry.yarnpkg.com/cypress/-/cypress-7.7.0.tgz#0839ae28e5520536f9667d6c9ae81496b3836e64"
8516-
integrity sha512-uYBYXNoI5ym0UxROwhQXWTi8JbUEjpC6l/bzoGZNxoKGsLrC1SDPgIDJMgLX/MeEdPL0UInXLDUWN/rSyZUCjQ==
8512+
cypress@^8.3.0:
8513+
version "8.3.1"
8514+
resolved "https://registry.yarnpkg.com/cypress/-/cypress-8.3.1.tgz#c6760dbb907df2570b0e1ac235fa31c30f9260a6"
8515+
integrity sha512-1v6pfx+/5cXhaT5T6QKOvnkawmEHWHLiVzm3MYMoQN1fkX2Ma1C32STd3jBStE9qT5qPSTILjGzypVRxCBi40g==
85178516
dependencies:
8518-
"@cypress/request" "^2.88.5"
8517+
"@cypress/request" "^2.88.6"
85198518
"@cypress/xvfb" "^1.2.4"
85208519
"@types/node" "^14.14.31"
85218520
"@types/sinonjs__fake-timers" "^6.0.2"

0 commit comments

Comments
 (0)