Skip to content

Commit 86a2d87

Browse files
committed
Merge remote-tracking branch 'origin/develop' into system-tests-refinement
2 parents 17a4f4c + 5e2de0c commit 86a2d87

File tree

131 files changed

+3281
-4430
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+3281
-4430
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
- Closes <!-- link to the issue here, if there is one -->
99

1010
### User facing changelog
11-
<!-- Explain the change(s) for every user to read in our changelog. Examples: https://on.cypress.io/changelog -->
11+
<!--
12+
Explain the change(s) for every user to read in our changelog. Examples: https://on.cypress.io/changelog
13+
If the change is not user-facing, write "n/a".
14+
-->
1215

1316
### Additional details
1417
<!-- Examples:
@@ -22,11 +25,14 @@
2225
Screenshots or GIFs are preferred. -->
2326

2427
### PR Tasks
25-
<!-- These tasks must be completed before a PR is merged.
26-
Delete tasks if they are not applicable. -->
28+
<!--
29+
These tasks must be completed before a PR is merged.
30+
If a task does not apply, write [na] instead of checking the box.
31+
DO NOT DELETE the PR checklist.
32+
-->
2733

2834
- [ ] Have tests been added/updated?
29-
- [ ] Has the original issue or this PR been tagged with a release in ZenHub? <!-- (internal team only)-->
35+
- [ ] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
3036
- [ ] Has a PR for user-facing changes been opened in [`cypress-documentation`](https://github.com/cypress-io/cypress-documentation)? <!-- Link to PR here -->
3137
- [ ] Have API changes been updated in the [`type definitions`](https://github.com/cypress-io/cypress/blob/develop/cli/types/cypress.d.ts)?
3238
- [ ] Have new configuration options been added to the [`cypress.schema.json`](https://github.com/cypress-io/cypress/blob/develop/cli/schema/cypress.schema.json)?

__snapshots__/packages-spec.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,19 @@ exports['packages can copy files from package.json 1'] = {
1515
"tmp": {
1616
"packages": {
1717
"coffee": {
18-
"package.json": "{\"main\":\"src/main.js\", \"name\": \"foo\", \"files\": [\"lib\"]}",
18+
"lib": {
19+
"foo.js": "{}"
20+
},
1921
"src": {
2022
"main.js": "console.log()"
2123
},
22-
"lib": {
23-
"foo.js": "{}"
24-
}
24+
"package.json": "{\n \"main\": \"src/main.js\",\n \"name\": \"foo\",\n \"files\": [\n \"lib\"\n ]\n}\n"
2525
}
2626
}
2727
}
2828
}
2929

30+
3031
exports['transformRequires can find and replace symlink requires 1'] = {
3132
"[cwd]": {
3233
"build": {

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ branches:
22
only:
33
- master
44
- develop
5+
- windows-code-signing
56
- 9.0-release
67
- /win*/
78

browser-versions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"chrome:beta": "96.0.4664.35",
3-
"chrome:stable": "95.0.4638.69"
2+
"chrome:beta": "96.0.4664.45",
3+
"chrome:stable": "96.0.4664.45"
44
}

circle.yml

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ macBuildFilters: &macBuildFilters
88
branches:
99
only:
1010
- develop
11-
- 9.0-release
1211

1312
defaults: &defaults
1413
parallelism: 1
@@ -42,7 +41,6 @@ onlyMainBranches: &onlyMainBranches
4241
branches:
4342
only:
4443
- develop
45-
- 9.0-release
4644
requires:
4745
- create-build-artifacts
4846

@@ -1564,7 +1562,7 @@ jobs:
15641562
- run:
15651563
name: Check current branch to persist artifacts
15661564
command: |
1567-
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "9.0-release" ]]; then
1565+
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "tgriesser/build/root-yarn-install" ]]; then
15681566
echo "Not uploading artifacts or posting install comment for this branch."
15691567
circleci-agent step halt
15701568
fi
@@ -1937,17 +1935,6 @@ jobs:
19371935
repo: cypress-example-todomvc
19381936
browser: firefox
19391937

1940-
"test-binary-against-documentation-firefox":
1941-
<<: *defaults
1942-
resource_class: medium
1943-
steps:
1944-
- test-binary-against-repo:
1945-
repo: cypress-documentation
1946-
browser: firefox
1947-
command: "yarn cypress run"
1948-
wait-on: http://localhost:3000
1949-
server-start-command: yarn serve:dist
1950-
19511938
"test-binary-against-conduit-chrome":
19521939
<<: *defaults
19531940
resource_class: medium
@@ -2209,7 +2196,6 @@ linux-workflow: &linux-workflow
22092196
branches:
22102197
only:
22112198
- develop
2212-
- 9.0-release
22132199
requires:
22142200
- build
22152201
- test-kitchensink:
@@ -2221,7 +2207,6 @@ linux-workflow: &linux-workflow
22212207
branches:
22222208
only:
22232209
- develop
2224-
- 9.0-release
22252210
requires:
22262211
- build
22272212
- create-build-artifacts:
@@ -2271,15 +2256,13 @@ linux-workflow: &linux-workflow
22712256
branches:
22722257
only:
22732258
- develop
2274-
- 9.0-release
22752259
requires:
22762260
- create-build-artifacts
22772261
- test-npm-module-and-verify-binary:
22782262
filters:
22792263
branches:
22802264
only:
22812265
- develop
2282-
- 9.0-release
22832266
requires:
22842267
- create-build-artifacts
22852268
- test-binary-against-staging:
@@ -2288,22 +2271,21 @@ linux-workflow: &linux-workflow
22882271
branches:
22892272
only:
22902273
- develop
2291-
- 9.0-release
22922274
requires:
22932275
- create-build-artifacts
22942276

22952277
- test-binary-against-kitchensink-chrome:
22962278
<<: *onlyMainBranches
2297-
- test-binary-against-conduit-chrome:
2298-
<<: *onlyMainBranches
2279+
# Re-enable when the cypress-example-conduit-app project is fixed.
2280+
# https://github.com/cypress-io/cypress-example-conduit-app/issues/346
2281+
# - test-binary-against-conduit-chrome:
2282+
# <<: *onlyMainBranches
22992283
- test-binary-against-recipes-firefox:
23002284
<<: *onlyMainBranches
23012285
- test-binary-against-kitchensink-firefox:
23022286
<<: *onlyMainBranches
23032287
- test-binary-against-todomvc-firefox:
23042288
<<: *onlyMainBranches
2305-
- test-binary-against-documentation-firefox:
2306-
<<: *onlyMainBranches
23072289
- test-binary-against-api-testing-firefox:
23082290
<<: *onlyMainBranches
23092291
- test-binary-against-piechopper-firefox:
@@ -2313,7 +2295,6 @@ linux-workflow: &linux-workflow
23132295
branches:
23142296
only:
23152297
- develop
2316-
- 9.0-release
23172298
requires:
23182299
- create-build-artifacts
23192300

@@ -2385,7 +2366,6 @@ mac-workflow: &mac-workflow
23852366
branches:
23862367
only:
23872368
- develop
2388-
- 9.0-release
23892369
requires:
23902370
- darwin-create-build-artifacts
23912371

@@ -2397,7 +2377,6 @@ mac-workflow: &mac-workflow
23972377
branches:
23982378
only:
23992379
- develop
2400-
- 9.0-release
24012380
requires:
24022381
- darwin-create-build-artifacts
24032382

cli/lib/tasks/install.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ const getNpmArgv = () => {
3838
const getVersionSpecifier = (startDir = path.resolve(__dirname, '../..')) => {
3939
const argv = getNpmArgv()
4040

41+
if ((process.env.npm_package_resolved || '').endsWith('cypress.tgz')) {
42+
return process.env.npm_package_resolved
43+
}
44+
4145
if (argv) {
4246
const tgz = _.find(argv, (t) => t.endsWith('cypress.tgz'))
4347

@@ -81,7 +85,7 @@ const getVersionSpecifier = (startDir = path.resolve(__dirname, '../..')) => {
8185
})
8286
}
8387

84-
const betaNpmUrlRe = /^\/beta\/npm\/(?<version>[0-9.]+)\/(?<artifactSlug>[^/]+)\/cypress\.tgz$/
88+
const betaNpmUrlRe = /^\/beta\/npm\/(?<version>[0-9.]+)\/(?<artifactSlug>.+?)\/cypress\.tgz$/
8589

8690
// convert a prerelease NPM package .tgz URL to the corresponding binary .zip URL
8791
const getBinaryUrlFromPrereleaseNpmUrl = (npmUrl) => {

cli/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"private": true,
55
"main": "index.js",
66
"scripts": {
7+
"clean": "node ./scripts/clean.js",
78
"prebuild": "yarn postinstall && node ./scripts/start-build.js",
89
"build": "node ./scripts/build.js",
910
"dtslint": "dtslint types",
@@ -27,7 +28,7 @@
2728
"@types/sizzle": "^2.3.2",
2829
"arch": "^2.2.0",
2930
"blob-util": "^2.0.2",
30-
"bluebird": "^3.7.2",
31+
"bluebird": "3.7.2",
3132
"cachedir": "^2.3.0",
3233
"chalk": "^4.1.0",
3334
"check-more-types": "^2.24.0",

cli/scripts/clean.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const shelljs = require('shelljs')
2+
const { includeTypes } = require('./utils')
3+
4+
shelljs.rm('-rf', 'build')
5+
6+
includeTypes.map((m) => {
7+
shelljs.rm('-rf', `types/${m}`)
8+
})

cli/scripts/post-install.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ filesToUncomment.forEach((file) => {
8989
const filePath = join(__dirname, '../types', file)
9090
const str = fs.readFileSync(filePath).toString()
9191

92-
const result = str.split('\n').map((line) => line.substring(3)).join('\n')
92+
const result = str.split('\n').map((line) => {
93+
return line.startsWith('// ') ? line.substring(3) : line
94+
}).join('\n')
9395

9496
fs.writeFileSync(filePath, result)
9597
})

cli/test/lib/tasks/install_spec.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,9 @@ describe('/lib/tasks/install', function () {
472472

473473
expect(install._getBinaryUrlFromPrereleaseNpmUrl('https://cdn.cypress.io/beta/npm/5.1.1/circle-develop-3fdfc3b453eb38ad3c0b079531e4dde6668e3dd0-436710/cypress.tgz'))
474474
.to.eq('https://cdn.cypress.io/beta/binary/5.1.1/linux-x64/circle-develop-3fdfc3b453eb38ad3c0b079531e4dde6668e3dd0-436710/cypress.zip')
475+
476+
expect(install._getBinaryUrlFromPrereleaseNpmUrl('https://cdn.cypress.io/beta/npm/5.1.1/circle-develop/some/branch-3fdfc3b453eb38ad3c0b079531e4dde6668e3dd0-436710/cypress.tgz'))
477+
.to.eq('https://cdn.cypress.io/beta/binary/5.1.1/linux-x64/circle-develop/some/branch-3fdfc3b453eb38ad3c0b079531e4dde6668e3dd0-436710/cypress.zip')
475478
})
476479

477480
it('returns nothing for an invalid url', function () {
@@ -502,6 +505,14 @@ describe('/lib/tasks/install', function () {
502505
expect(await install._getVersionSpecifier('/foo/bar/baz')).to.eq('https://foo.com/cypress.tgz')
503506
})
504507

508+
it('resolves with cypress.tgz URL if specified in npm env npm_package_resolved', async function () {
509+
restoreEnv = mockedEnv({
510+
npm_package_resolved: 'https://foo.com/cypress.tgz',
511+
})
512+
513+
expect(await install._getVersionSpecifier('/foo/bar/baz')).to.eq('https://foo.com/cypress.tgz')
514+
})
515+
505516
it('resolves with versionSpecifier from parent pkg.json', async function () {
506517
fs.readJSON.withArgs('/foo/bar/baz/package.json').resolves({
507518
dependencies: {

0 commit comments

Comments
 (0)