@nx/cypress 21.5.0-canary.20250902-92bd11a → 21.5.1-beta.3
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/README.md +1 -1
- package/package.json +5 -5
- package/src/utils/versions.d.ts +2 -1
- package/src/utils/versions.d.ts.map +1 -1
- package/src/utils/versions.js +14 -7
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
# Nx: Smart Repos · Fast Builds
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Get to green PRs in half the time. Nx optimizes your builds, scales your CI, and fixes failed PRs. Built for developers and AI agents.
|
|
26
26
|
|
|
27
27
|
This package is a [Cypress plugin for Nx](https://nx.dev/cypress/overview).
|
|
28
28
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/cypress",
|
|
3
|
-
"version": "21.5.
|
|
3
|
+
"version": "21.5.1-beta.3",
|
|
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": {
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"migrations": "./migrations.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@nx/devkit": "21.5.
|
|
40
|
-
"@nx/eslint": "21.5.
|
|
41
|
-
"@nx/js": "21.5.
|
|
39
|
+
"@nx/devkit": "21.5.1-beta.3",
|
|
40
|
+
"@nx/eslint": "21.5.1-beta.3",
|
|
41
|
+
"@nx/js": "21.5.1-beta.3",
|
|
42
42
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
43
43
|
"detect-port": "^1.5.1",
|
|
44
44
|
"semver": "^7.6.3",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"tslib": "^2.3.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"nx": "21.5.
|
|
49
|
+
"nx": "21.5.1-beta.3"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"cypress": ">= 3 < 15"
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare const cypressVersion = "^14.2.1";
|
|
|
7
7
|
export declare const cypressWebpackVersion = "^4.0.2";
|
|
8
8
|
export declare const viteVersion = "^6.0.0";
|
|
9
9
|
export declare const htmlWebpackPluginVersion = "^5.5.0";
|
|
10
|
-
export declare function versions(tree: Tree
|
|
10
|
+
export declare function versions(tree: Tree): Omit<typeof import("./versions"), "versions" | "getInstalledCypressVersion" | "getInstalledCypressMajorVersion" | "assertMinimumCypressVersion"> | {
|
|
11
11
|
nxVersion: any;
|
|
12
12
|
eslintPluginCypressVersion: string;
|
|
13
13
|
typesNodeVersion: string;
|
|
@@ -17,6 +17,7 @@ export declare function versions(tree: Tree, cypressMajorVersion?: number): Omit
|
|
|
17
17
|
viteVersion: string;
|
|
18
18
|
htmlWebpackPluginVersion: string;
|
|
19
19
|
};
|
|
20
|
+
export declare function getInstalledCypressVersion(tree?: Tree): string | null;
|
|
20
21
|
export declare function getInstalledCypressMajorVersion(tree?: Tree): number | null;
|
|
21
22
|
export declare function assertMinimumCypressVersion(minVersion: number, tree?: Tree): void;
|
|
22
23
|
//# sourceMappingURL=versions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../../../packages/cypress/src/utils/versions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAIjD,eAAO,MAAM,SAAS,KAAwC,CAAC;AAC/D,eAAO,MAAM,0BAA0B,WAAW,CAAC;AACnD,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,2BAA2B,WAAW,CAAC;AACpD,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAC9C,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,wBAAwB,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../../../packages/cypress/src/utils/versions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAIjD,eAAO,MAAM,SAAS,KAAwC,CAAC;AAC/D,eAAO,MAAM,0BAA0B,WAAW,CAAC;AACnD,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,2BAA2B,WAAW,CAAC;AACpD,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAC9C,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,wBAAwB,WAAW,CAAC;AAmBjD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,IAAI;;;;;;;;;EA2BlC;AAED,wBAAgB,0BAA0B,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAcrE;AAED,wBAAgB,+BAA+B,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,IAAI,CAI1E;AAED,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,IAAI,GACV,IAAI,CAON"}
|
package/src/utils/versions.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.htmlWebpackPluginVersion = exports.viteVersion = exports.cypressWebpackVersion = exports.cypressVersion = exports.cypressViteDevServerVersion = exports.typesNodeVersion = exports.eslintPluginCypressVersion = exports.nxVersion = void 0;
|
|
4
4
|
exports.versions = versions;
|
|
5
|
+
exports.getInstalledCypressVersion = getInstalledCypressVersion;
|
|
5
6
|
exports.getInstalledCypressMajorVersion = getInstalledCypressMajorVersion;
|
|
6
7
|
exports.assertMinimumCypressVersion = assertMinimumCypressVersion;
|
|
7
8
|
const devkit_1 = require("@nx/devkit");
|
|
@@ -24,16 +25,18 @@ const latestVersions = {
|
|
|
24
25
|
viteVersion: exports.viteVersion,
|
|
25
26
|
htmlWebpackPluginVersion: exports.htmlWebpackPluginVersion,
|
|
26
27
|
};
|
|
27
|
-
function versions(tree
|
|
28
|
-
|
|
28
|
+
function versions(tree) {
|
|
29
|
+
const installedCypressVersion = getInstalledCypressVersion(tree);
|
|
30
|
+
if (!installedCypressVersion) {
|
|
29
31
|
return latestVersions;
|
|
30
32
|
}
|
|
31
|
-
|
|
32
|
-
throw new Error(`Unsupported Cypress version: ${exports.cypressVersion}`);
|
|
33
|
-
}
|
|
33
|
+
const cypressMajorVersion = (0, semver_1.major)(installedCypressVersion);
|
|
34
34
|
if (cypressMajorVersion === 14) {
|
|
35
35
|
return latestVersions;
|
|
36
36
|
}
|
|
37
|
+
if (cypressMajorVersion > 14) {
|
|
38
|
+
throw new Error(`You're currently using an unsupported Cypress version: ${installedCypressVersion}. Supported versions are v13 and v14.`);
|
|
39
|
+
}
|
|
37
40
|
return {
|
|
38
41
|
nxVersion: exports.nxVersion,
|
|
39
42
|
eslintPluginCypressVersion: '^3.5.0',
|
|
@@ -45,7 +48,7 @@ function versions(tree, cypressMajorVersion = getInstalledCypressMajorVersion(tr
|
|
|
45
48
|
htmlWebpackPluginVersion: '^5.5.0',
|
|
46
49
|
};
|
|
47
50
|
}
|
|
48
|
-
function
|
|
51
|
+
function getInstalledCypressVersion(tree) {
|
|
49
52
|
try {
|
|
50
53
|
let version;
|
|
51
54
|
if (tree) {
|
|
@@ -54,12 +57,16 @@ function getInstalledCypressMajorVersion(tree) {
|
|
|
54
57
|
else {
|
|
55
58
|
version = getCypressVersionFromFileSystem();
|
|
56
59
|
}
|
|
57
|
-
return version
|
|
60
|
+
return version;
|
|
58
61
|
}
|
|
59
62
|
catch {
|
|
60
63
|
return null;
|
|
61
64
|
}
|
|
62
65
|
}
|
|
66
|
+
function getInstalledCypressMajorVersion(tree) {
|
|
67
|
+
const installedCypressVersion = getInstalledCypressVersion(tree);
|
|
68
|
+
return installedCypressVersion ? (0, semver_1.major)(installedCypressVersion) : null;
|
|
69
|
+
}
|
|
63
70
|
function assertMinimumCypressVersion(minVersion, tree) {
|
|
64
71
|
const version = getInstalledCypressMajorVersion(tree);
|
|
65
72
|
if (version && version < minVersion) {
|