Skip to content

Commit

Permalink
feat!: update cypress to 8.3 and require it to be a peer dependency (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
haoqunjiang authored Sep 1, 2021
1 parent 18c1e8b commit 95a9b8c
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/migrations/migrate-from-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Please consider switching to ESLint. You can check out [`tslint-to-eslint-config
### E2E-Cypress Plugin

* Cypress is required as a peer dependency.
* 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.
* 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.

### E2E-WebDriverIO Plugin

Expand Down
3 changes: 3 additions & 0 deletions packages/@vue/cli-plugin-e2e-cypress/generator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ module.exports = api => {
})

api.extendPackage({
devDependencies: {
cypress: require('../package.json').devDependencies.cypress
},
scripts: {
'test:e2e': 'vue-cli-service test:e2e'
}
Expand Down
17 changes: 17 additions & 0 deletions packages/@vue/cli-plugin-e2e-cypress/migrator/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = api => {
api.extendPackage(pkg => {
const allDeps = {
...pkg.dependencies,
...pkg.devDependencies,
...pkg.optionalDependencies
}

if (!allDeps.cypress) {
return {
devDependencies: {
cypress: require('../package.json').devDependencies.cypress
}
}
}
})
}
5 changes: 4 additions & 1 deletion packages/@vue/cli-plugin-e2e-cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@
},
"dependencies": {
"@vue/cli-shared-utils": "^5.0.0-beta.3",
"cypress": "^7.1.0",
"eslint-plugin-cypress": "^2.11.2"
},
"devDependencies": {
"cypress": "^8.3.0"
},
"peerDependencies": {
"cypress": "*",
"@vue/cli-service": "^3.0.0 || ^4.0.0 || ^5.0.0-0"
}
}
21 changes: 10 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1204,10 +1204,10 @@
exec-sh "^0.3.2"
minimist "^1.2.0"

"@cypress/request@^2.88.5":
version "2.88.5"
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.5.tgz#8d7ecd17b53a849cfd5ab06d5abe7d84976375d7"
integrity sha512-TzEC1XMi1hJkywWpRfD2clreTa/Z+lOrXDCxxBTBPEcY5azdPi56A6Xw+O4tWJnaJH3iIE7G5aDXZC6JgRZLcA==
"@cypress/request@^2.88.6":
version "2.88.6"
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.6.tgz#a970dd675befc6bdf8a8921576c01f51cc5798e9"
integrity sha512-z0UxBE/+qaESAHY9p9sM2h8Y4XqtsbDCt0/DPOrqA/RZgKi4PkxdpXyK4wCCnSk1xHqWHZZAE+gV6aDAR6+caQ==
dependencies:
aws-sign2 "~0.7.0"
aws4 "^1.8.0"
Expand All @@ -1222,13 +1222,12 @@
isstream "~0.1.2"
json-stringify-safe "~5.0.1"
mime-types "~2.1.19"
oauth-sign "~0.9.0"
performance-now "^2.1.0"
qs "~6.5.2"
safe-buffer "^5.1.2"
tough-cookie "~2.5.0"
tunnel-agent "^0.6.0"
uuid "^3.3.2"
uuid "^8.3.2"

"@cypress/xvfb@^1.2.4":
version "1.2.4"
Expand Down Expand Up @@ -8510,12 +8509,12 @@ cyclist@^1.0.1:
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=

cypress@^7.1.0:
version "7.7.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-7.7.0.tgz#0839ae28e5520536f9667d6c9ae81496b3836e64"
integrity sha512-uYBYXNoI5ym0UxROwhQXWTi8JbUEjpC6l/bzoGZNxoKGsLrC1SDPgIDJMgLX/MeEdPL0UInXLDUWN/rSyZUCjQ==
cypress@^8.3.0:
version "8.3.1"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-8.3.1.tgz#c6760dbb907df2570b0e1ac235fa31c30f9260a6"
integrity sha512-1v6pfx+/5cXhaT5T6QKOvnkawmEHWHLiVzm3MYMoQN1fkX2Ma1C32STd3jBStE9qT5qPSTILjGzypVRxCBi40g==
dependencies:
"@cypress/request" "^2.88.5"
"@cypress/request" "^2.88.6"
"@cypress/xvfb" "^1.2.4"
"@types/node" "^14.14.31"
"@types/sinonjs__fake-timers" "^6.0.2"
Expand Down

0 comments on commit 95a9b8c

Please sign in to comment.