Skip to content

Commit cc66129

Browse files
committed
Merge branch 'develop' into feature-multidomain
2 parents 92932c5 + efb4062 commit cc66129

File tree

31 files changed

+227
-181
lines changed

31 files changed

+227
-181
lines changed

appveyor.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ branches:
22
only:
33
- master
44
- develop
5-
- issue-17944-remove-source-files
6-
- windows-code-signing
5+
- fix-test-other-projects
76
- /win*/
87

98
# https://www.appveyor.com/docs/lang/nodejs-iojs/

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": "94.0.4606.31",
3-
"chrome:stable": "93.0.4577.63"
2+
"chrome:beta": "94.0.4606.41",
3+
"chrome:stable": "93.0.4577.82"
44
}

circle.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ macBuildFilters: &macBuildFilters
88
branches:
99
only:
1010
- develop
11-
- issue-17944-remove-source-files
11+
- fix-test-other-projects
1212

1313
defaults: &defaults
1414
parallelism: 1
@@ -42,7 +42,7 @@ onlyMainBranches: &onlyMainBranches
4242
branches:
4343
only:
4444
- develop
45-
- issue-17944-remove-source-files
45+
- fix-test-other-projects
4646
requires:
4747
- create-build-artifacts
4848

@@ -1481,7 +1481,7 @@ jobs:
14811481
- run:
14821482
name: Check current branch to persist artifacts
14831483
command: |
1484-
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "issue-17944-remove-source-files" ]]; then
1484+
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "fix-test-other-projects" ]]; then
14851485
echo "Not uploading artifacts or posting install comment for this branch."
14861486
circleci-agent step halt
14871487
fi
@@ -2073,6 +2073,7 @@ linux-workflow: &linux-workflow
20732073
# Any attempts to automate this are welcome
20742074
# If CircleCI provided an "after all" hook, then this wouldn't be necessary
20752075
- npm-release:
2076+
context: test-runner:npm-release
20762077
requires:
20772078
- build
20782079
- npm-eslint-plugin-dev
@@ -2116,7 +2117,7 @@ linux-workflow: &linux-workflow
21162117
branches:
21172118
only:
21182119
- develop
2119-
- issue-17944-remove-source-files
2120+
- fix-test-other-projects
21202121
requires:
21212122
- build
21222123
- test-kitchensink:
@@ -2128,7 +2129,7 @@ linux-workflow: &linux-workflow
21282129
branches:
21292130
only:
21302131
- develop
2131-
- issue-17944-remove-source-files
2132+
- fix-test-other-projects
21322133
requires:
21332134
- build
21342135
- create-build-artifacts:
@@ -2178,15 +2179,15 @@ linux-workflow: &linux-workflow
21782179
branches:
21792180
only:
21802181
- develop
2181-
- issue-17944-remove-source-files
2182+
- fix-test-other-projects
21822183
requires:
21832184
- create-build-artifacts
21842185
- test-npm-module-and-verify-binary:
21852186
filters:
21862187
branches:
21872188
only:
21882189
- develop
2189-
- issue-17944-remove-source-files
2190+
- fix-test-other-projects
21902191
requires:
21912192
- create-build-artifacts
21922193
- test-binary-against-staging:
@@ -2195,7 +2196,7 @@ linux-workflow: &linux-workflow
21952196
branches:
21962197
only:
21972198
- develop
2198-
- issue-17944-remove-source-files
2199+
- fix-test-other-projects
21992200
requires:
22002201
- create-build-artifacts
22012202

@@ -2220,7 +2221,7 @@ linux-workflow: &linux-workflow
22202221
branches:
22212222
only:
22222223
- develop
2223-
- issue-17944-remove-source-files
2224+
- fix-test-other-projects
22242225
requires:
22252226
- create-build-artifacts
22262227

@@ -2292,7 +2293,7 @@ mac-workflow: &mac-workflow
22922293
branches:
22932294
only:
22942295
- develop
2295-
- issue-17944-remove-source-files
2296+
- fix-test-other-projects
22962297
requires:
22972298
- darwin-create-build-artifacts
22982299

@@ -2304,7 +2305,7 @@ mac-workflow: &mac-workflow
23042305
branches:
23052306
only:
23062307
- develop
2307-
- issue-17944-remove-source-files
2308+
- fix-test-other-projects
23082309
requires:
23092310
- darwin-create-build-artifacts
23102311

npm/cypress-schematic/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [@cypress/schematic-v1.5.1](https://github.com/cypress-io/cypress/compare/@cypress/schematic-v1.5.0...@cypress/schematic-v1.5.1) (2021-09-10)
2+
3+
4+
### Bug Fixes
5+
6+
* **cypress/schematic:** add edge to list of allowed browsers ([#17637](https://github.com/cypress-io/cypress/issues/17637)) ([49de24f](https://github.com/cypress-io/cypress/commit/49de24f6178e0ef7bfd654c3efc0bfa8008e962e))
7+
18
# [@cypress/schematic-v1.5.0](https://github.com/cypress-io/cypress/compare/@cypress/schematic-v1.4.2...@cypress/schematic-v1.5.0) (2021-07-20)
29

310

npm/react/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [@cypress/react-v5.10.0](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.9.4...@cypress/react-v5.10.0) (2021-09-10)
2+
3+
4+
### Features
5+
6+
* allow usage of @react/plugins with cypress.config.js ([#17738](https://github.com/cypress-io/cypress/issues/17738)) ([da4b1e0](https://github.com/cypress-io/cypress/commit/da4b1e06ce33945aabddda0e6e175dc0e1b488a5))
7+
18
# [@cypress/react-v5.9.4](https://github.com/cypress-io/cypress/compare/@cypress/react-v5.9.3...@cypress/react-v5.9.4) (2021-08-10)
29

310

npm/react/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@
44
"description": "Test React components using Cypress",
55
"main": "dist/cypress-react.cjs.js",
66
"scripts": {
7-
"build": "rimraf dist && yarn rollup -c rollup.config.js",
7+
"build": "rimraf dist && yarn transpile-plugins && yarn rollup -c rollup.config.js",
88
"build-prod": "yarn build",
99
"cy:open": "node ../../scripts/cypress.js open-ct",
1010
"cy:open:debug": "node --inspect-brk ../../scripts/start.js --component-testing --run-project ${PWD}",
1111
"cy:run": "node ../../scripts/cypress.js run-ct",
1212
"cy:run:debug": "node --inspect-brk ../../scripts/start.js --component-testing --run-project ${PWD}",
1313
"pretest": "yarn transpile",
14-
"test": "yarn cy:run",
14+
"test": "yarn test-unit && yarn test-component",
15+
"test-unit": "mocha -r @packages/ts/register test/**/*.spec.*",
16+
"test-component": "yarn cy:run",
1517
"test-ci": "node ../../scripts/run-ct-examples.js --examplesList=./examples.env",
1618
"transpile": "tsc",
19+
"transpile-plugins": "yarn transpile --project ./plugins",
1720
"watch": "yarn build --watch --watch.exclude ./dist/**/*"
1821
},
1922
"dependencies": {

npm/react/plugins/next/findNextWebpackConfig.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/// <reference types="next" />
33
const debug = require('debug')('@cypress/react')
44
const getNextJsBaseWebpackConfig = require('next/dist/build/webpack-config').default
5+
const { findPagesDir } = require('../../dist/next/findPagesDir')
56

67
async function getNextWebpackConfig (config) {
78
let loadConfig
@@ -26,7 +27,7 @@ async function getNextWebpackConfig (config) {
2627
config: nextConfig,
2728
dev: true,
2829
isServer: false,
29-
pagesDir: config.projectRoot,
30+
pagesDir: findPagesDir(config.projectRoot),
3031
entrypoints: {},
3132
rewrites: { fallback: [], afterFiles: [], beforeFiles: [] },
3233
},
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import * as fs from 'fs'
2+
import * as path from 'path'
3+
4+
const existsSync = (file: string) => {
5+
try {
6+
fs.accessSync(file, fs.constants.F_OK)
7+
8+
return true
9+
} catch (_) {
10+
return false
11+
}
12+
}
13+
14+
/**
15+
* Next allows the `pages` directory to be located at either
16+
* `${projectRoot}/pages` or `${projectRoot}/src/pages`.
17+
* If neither is found, return projectRoot
18+
*/
19+
export function findPagesDir (projectRoot: string) {
20+
// prioritize ./pages over ./src/pages
21+
let pagesDir = path.join(projectRoot, 'pages')
22+
23+
if (existsSync(pagesDir)) {
24+
return pagesDir
25+
}
26+
27+
pagesDir = path.join(projectRoot, 'src/pages')
28+
if (existsSync(pagesDir)) {
29+
return pagesDir
30+
}
31+
32+
return projectRoot
33+
}

npm/react/plugins/tsconfig.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"rootDir": "./",
5+
"types": [
6+
"cypress",
7+
"node"
8+
]
9+
},
10+
"include": ["./**/*.ts"]
11+
}

npm/react/test/fixtures/next-plugin/next-project-one/pages/foo.js

Whitespace-only changes.

0 commit comments

Comments
 (0)