@nrwl/cypress 14.8.3 → 15.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/migrations.json +6 -0
- package/package.json +5 -5
- package/src/generators/cypress-project/schema.json +1 -1
- package/src/migrations/update-15-0-0/add-cypress-inputs.d.ts +2 -0
- package/src/migrations/update-15-0-0/add-cypress-inputs.js +49 -0
- package/src/migrations/update-15-0-0/add-cypress-inputs.js.map +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# [15.0.0-beta.1](https://github.com/nrwl/nx/compare/14.8.0...15.0.0-beta.1) (2022-10-05)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @nrwl/cypress
|
package/migrations.json
CHANGED
|
@@ -42,6 +42,12 @@
|
|
|
42
42
|
"version": "14.7.0-beta.0",
|
|
43
43
|
"description": "Update Cypress if using v10 to support latest component testing features",
|
|
44
44
|
"factory": "./src/migrations/update-14-7-0/update-cypress-version-if-10"
|
|
45
|
+
},
|
|
46
|
+
"add-cypress-inputs": {
|
|
47
|
+
"cli": "nx",
|
|
48
|
+
"version": "15.0.0-beta.0",
|
|
49
|
+
"description": "Stop hashing cypress spec files and config files for build targets and dependent tasks",
|
|
50
|
+
"factory": "./src/migrations/update-15-0-0/add-cypress-inputs"
|
|
45
51
|
}
|
|
46
52
|
},
|
|
47
53
|
"packageJsonUpdates": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/cypress",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.0-beta.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Cypress contains executors and generators allowing your workspace to use the powerful Cypress integration testing capabilities.",
|
|
6
6
|
"repository": {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"@babel/core": "^7.0.1",
|
|
38
38
|
"@babel/preset-env": "^7.0.0",
|
|
39
39
|
"@cypress/webpack-preprocessor": "^5.12.0",
|
|
40
|
-
"@nrwl/devkit": "
|
|
41
|
-
"@nrwl/linter": "
|
|
42
|
-
"@nrwl/workspace": "
|
|
40
|
+
"@nrwl/devkit": "15.0.0-beta.1",
|
|
41
|
+
"@nrwl/linter": "15.0.0-beta.1",
|
|
42
|
+
"@nrwl/workspace": "15.0.0-beta.1",
|
|
43
43
|
"@phenomnomnominal/tsquery": "4.1.1",
|
|
44
44
|
"babel-loader": "^8.0.2",
|
|
45
45
|
"chalk": "4.1.0",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
65
|
"types": "./index.d.ts",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "49c5e5069b80605943ef3bbe965e291d79354cd5"
|
|
67
67
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
5
|
+
const executor_options_utils_1 = require("@nrwl/workspace/src/utilities/executor-options-utils");
|
|
6
|
+
function default_1(tree) {
|
|
7
|
+
var _a, _b, _c, _d;
|
|
8
|
+
var _e;
|
|
9
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
10
|
+
const workspaceConfiguration = (0, devkit_1.readWorkspaceConfiguration)(tree);
|
|
11
|
+
const { cypressTargets, hasComponentTesting } = getCypressTargetNames(tree);
|
|
12
|
+
const hasProductionFileset = !!((_a = workspaceConfiguration.namedInputs) === null || _a === void 0 ? void 0 : _a.production);
|
|
13
|
+
if (hasComponentTesting && hasProductionFileset && cypressTargets.size > 0) {
|
|
14
|
+
const productionFileset = new Set(workspaceConfiguration.namedInputs.production);
|
|
15
|
+
for (const exclusion of [
|
|
16
|
+
'!{projectRoot}/cypress/**/*',
|
|
17
|
+
'!{projectRoot}/**/*.cy.[jt]s?(x)',
|
|
18
|
+
'!{projectRoot}/cypress.config.[jt]s',
|
|
19
|
+
]) {
|
|
20
|
+
productionFileset.add(exclusion);
|
|
21
|
+
}
|
|
22
|
+
workspaceConfiguration.namedInputs.production =
|
|
23
|
+
Array.from(productionFileset);
|
|
24
|
+
}
|
|
25
|
+
for (const targetName of cypressTargets) {
|
|
26
|
+
(_b = workspaceConfiguration.targetDefaults) !== null && _b !== void 0 ? _b : (workspaceConfiguration.targetDefaults = {});
|
|
27
|
+
const cypressTargetDefaults = ((_c = (_e = workspaceConfiguration.targetDefaults)[targetName]) !== null && _c !== void 0 ? _c : (_e[targetName] = {}));
|
|
28
|
+
(_d = cypressTargetDefaults.inputs) !== null && _d !== void 0 ? _d : (cypressTargetDefaults.inputs = [
|
|
29
|
+
'default',
|
|
30
|
+
hasProductionFileset ? '^production' : '^default',
|
|
31
|
+
]);
|
|
32
|
+
}
|
|
33
|
+
(0, devkit_1.updateWorkspaceConfiguration)(tree, workspaceConfiguration);
|
|
34
|
+
yield (0, devkit_1.formatFiles)(tree);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
exports.default = default_1;
|
|
38
|
+
function getCypressTargetNames(tree) {
|
|
39
|
+
const cypressTargets = new Set();
|
|
40
|
+
let hasComponentTesting = false;
|
|
41
|
+
(0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/cypress:cypress', (options, __, target) => {
|
|
42
|
+
cypressTargets.add(target);
|
|
43
|
+
if (options.testingType === 'component') {
|
|
44
|
+
hasComponentTesting = true;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
return { cypressTargets, hasComponentTesting };
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=add-cypress-inputs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-cypress-inputs.js","sourceRoot":"","sources":["../../../../../../packages/cypress/src/migrations/update-15-0-0/add-cypress-inputs.ts"],"names":[],"mappings":";;;AAAA,yCAKsB;AACtB,iGAA8F;AAG9F,mBAA+B,IAAU;;;;QACvC,MAAM,sBAAsB,GAAG,IAAA,mCAA0B,EAAC,IAAI,CAAC,CAAC;QAEhE,MAAM,EAAE,cAAc,EAAE,mBAAmB,EAAE,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAC5E,MAAM,oBAAoB,GAAG,CAAC,CAAC,CAAA,MAAA,sBAAsB,CAAC,WAAW,0CAAE,UAAU,CAAA,CAAC;QAE9E,IAAI,mBAAmB,IAAI,oBAAoB,IAAI,cAAc,CAAC,IAAI,GAAG,CAAC,EAAE;YAC1E,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAC/B,sBAAsB,CAAC,WAAW,CAAC,UAAU,CAC9C,CAAC;YACF,KAAK,MAAM,SAAS,IAAI;gBACtB,6BAA6B;gBAC7B,kCAAkC;gBAClC,qCAAqC;aACtC,EAAE;gBACD,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;aAClC;YACD,sBAAsB,CAAC,WAAW,CAAC,UAAU;gBAC3C,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;SACjC;QAED,KAAK,MAAM,UAAU,IAAI,cAAc,EAAE;YACvC,MAAA,sBAAsB,CAAC,cAAc,oCAArC,sBAAsB,CAAC,cAAc,GAAK,EAAE,EAAC;YAC7C,MAAM,qBAAqB,GAAG,aAAC,sBAAsB,CAAC,cAAc,EAClE,UAAU,wCAAV,UAAU,IACN,EAAE,EAAC,CAAC;YAEV,MAAA,qBAAqB,CAAC,MAAM,oCAA5B,qBAAqB,CAAC,MAAM,GAAK;gBAC/B,SAAS;gBACT,oBAAoB,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU;aAClD,EAAC;SACH;QAED,I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