@nx/cypress 22.6.1 → 22.6.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/package.json +5 -5
- package/plugins/cypress-preset.d.ts +1 -1
- package/plugins/cypress-preset.d.ts.map +1 -1
- package/src/generators/component-configuration/component-configuration.d.ts.map +1 -1
- package/src/generators/component-configuration/component-configuration.js +12 -0
- package/src/plugins/preprocessor-vite.d.ts +1 -1
- package/src/plugins/preprocessor-vite.d.ts.map +1 -1
- package/src/plugins/preprocessor-vite.js +2 -2
- package/src/utils/add-linter.d.ts.map +1 -1
- package/src/utils/add-linter.js +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/cypress",
|
|
3
|
-
"version": "22.6.
|
|
3
|
+
"version": "22.6.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": "22.6.
|
|
40
|
-
"@nx/eslint": "22.6.
|
|
41
|
-
"@nx/js": "22.6.
|
|
39
|
+
"@nx/devkit": "22.6.3",
|
|
40
|
+
"@nx/eslint": "22.6.3",
|
|
41
|
+
"@nx/js": "22.6.3",
|
|
42
42
|
"@phenomnomnominal/tsquery": "~6.1.4",
|
|
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": "22.6.
|
|
49
|
+
"nx": "22.6.3"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"cypress": ">= 13 < 16"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cypress-preset.d.ts","sourceRoot":"","sources":["../../../../packages/cypress/plugins/cypress-preset.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cypress-preset.d.ts","sourceRoot":"","sources":["../../../../packages/cypress/plugins/cypress-preset.ts"],"names":[],"mappings":"AAUA,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAYxC,UAAU,iBAAiB;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,yBAAyB;IACxC;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;CAC5B;AAID,MAAM,WAAW,+BACf,SAAQ,IAAI,CAAC,yBAAyB,EAAE,SAAS,CAAC;CAAG;AAEvD,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE;IAAE,WAAW,EAAE,WAAW,GAAG,KAAK,CAAA;CAAE,GAC7C,iBAAiB,CAwBnB;AA6CD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CACzB,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,yBAAyB,OAkEpC;AA0DD,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;QAII;IACJ,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE3C;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC;;OAEG;IACH,mBAAmB,CAAC,EAAE,YAAY,CAAC;CACpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-configuration.d.ts","sourceRoot":"","sources":["../../../../../../packages/cypress/src/generators/component-configuration/component-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,
|
|
1
|
+
{"version":3,"file":"component-configuration.d.ts","sourceRoot":"","sources":["../../../../../../packages/cypress/src/generators/component-configuration/component-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAIjB,oBAAoB,EAKpB,IAAI,EAIL,MAAM,YAAY,CAAC;AASpB,OAAO,EAAE,mCAAmC,EAAE,MAAM,UAAU,CAAC;AAI/D,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,mCAAmC,8BAM7C;AAED,wBAAsB,uCAAuC,CAC3D,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,mCAAmC,8BAwD7C;AAkHD,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,oBAAoB,QAsDpC;AAOD,eAAe,+BAA+B,CAAC"}
|
|
@@ -5,6 +5,7 @@ exports.componentConfigurationGeneratorInternal = componentConfigurationGenerato
|
|
|
5
5
|
exports.updateTsConfigForComponentTesting = updateTsConfigForComponentTesting;
|
|
6
6
|
const devkit_1 = require("@nx/devkit");
|
|
7
7
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
8
|
+
const semver_1 = require("semver");
|
|
8
9
|
const versions_1 = require("../../utils/versions");
|
|
9
10
|
const base_setup_1 = require("../base-setup/base-setup");
|
|
10
11
|
const init_1 = require("../init/init");
|
|
@@ -16,6 +17,17 @@ function componentConfigurationGenerator(tree, options) {
|
|
|
16
17
|
}
|
|
17
18
|
async function componentConfigurationGeneratorInternal(tree, options) {
|
|
18
19
|
(0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'cypress', 'component-configuration');
|
|
20
|
+
// Cypress CT does not support Vite 8 yet (@cypress/vite-dev-server
|
|
21
|
+
// peer dep is ^5.0.0 || ^6.0.0 || ^7.0.0).
|
|
22
|
+
const viteVersion = (0, devkit_1.getDependencyVersionFromPackageJson)(tree, 'vite');
|
|
23
|
+
if (viteVersion) {
|
|
24
|
+
const viteMajor = (0, semver_1.major)((0, semver_1.coerce)(viteVersion));
|
|
25
|
+
if (viteMajor >= 8) {
|
|
26
|
+
throw new Error(`Cypress component testing does not yet support Vite ${viteMajor}. ` +
|
|
27
|
+
`Downgrade to Vite 7 or earlier to use Cypress component testing. ` +
|
|
28
|
+
`See: https://github.com/cypress-io/cypress/issues/33078`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
19
31
|
const tasks = [];
|
|
20
32
|
const opts = normalizeOptions(tree, options);
|
|
21
33
|
if (!(0, versions_1.getInstalledCypressMajorVersion)(tree)) {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
23
23
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
24
24
|
**/
|
|
25
|
-
|
|
25
|
+
type InlineConfig = Record<string, any>;
|
|
26
26
|
type CypressPreprocessor = (file: Record<string, any>) => string | Promise<string>;
|
|
27
27
|
/**
|
|
28
28
|
* Use Vite as a file preprocess for Cypress test files.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preprocessor-vite.d.ts","sourceRoot":"","sources":["../../../../../packages/cypress/src/plugins/preprocessor-vite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;IAuBI;
|
|
1
|
+
{"version":3,"file":"preprocessor-vite.d.ts","sourceRoot":"","sources":["../../../../../packages/cypress/src/plugins/preprocessor-vite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;IAuBI;AAMJ,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAExC,KAAK,mBAAmB,GAAG,CACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KACtB,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAI9B;;;;GAIG;AACH,iBAAS,gBAAgB,CACvB,eAAe,GAAE,YAAiB,GACjC,mBAAmB,CAkErB;AAUD,eAAe,gBAAgB,CAAC"}
|
|
@@ -61,10 +61,10 @@ function vitePreprocessor(configOverrides = {}) {
|
|
|
61
61
|
};
|
|
62
62
|
cache.set(filePath, outputPath);
|
|
63
63
|
const { build } = await Function('return import("vite")')();
|
|
64
|
-
const watcher =
|
|
64
|
+
const watcher = await build({
|
|
65
65
|
...defaultConfig,
|
|
66
66
|
...configOverrides,
|
|
67
|
-
})
|
|
67
|
+
});
|
|
68
68
|
return new Promise((resolve, reject) => {
|
|
69
69
|
if (shouldWatch && isWatcher(watcher)) {
|
|
70
70
|
watcher.on('event', (event) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-linter.d.ts","sourceRoot":"","sources":["../../../../../packages/cypress/src/utils/add-linter.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EACL,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAwB,MAAM,YAAY,CAAC;AAiBtE,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb;;;QAGI;IACJ,UAAU,EAAE,MAAM,CAAC;IACnB;;;QAGI;IACJ,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"add-linter.d.ts","sourceRoot":"","sources":["../../../../../packages/cypress/src/utils/add-linter.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EACL,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAwB,MAAM,YAAY,CAAC;AAiBtE,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb;;;QAGI;IACJ,UAAU,EAAE,MAAM,CAAC;IACnB;;;QAGI;IACJ,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,eAAe,uBA8HzB"}
|
package/src/utils/add-linter.js
CHANGED
|
@@ -38,7 +38,12 @@ async function addLinterToCyProject(tree, options) {
|
|
|
38
38
|
(0, eslint_file_1.isEslintConfigSupported)(tree)) {
|
|
39
39
|
const overrides = [];
|
|
40
40
|
if ((0, flat_config_1.useFlatConfig)(tree)) {
|
|
41
|
-
(0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(tree, projectConfig.root, 'recommended',
|
|
41
|
+
(0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(tree, projectConfig.root, 'recommended', {
|
|
42
|
+
moduleName: 'cypress',
|
|
43
|
+
moduleImportPath: 'eslint-plugin-cypress/flat',
|
|
44
|
+
spread: false,
|
|
45
|
+
insertAtTheEnd: false,
|
|
46
|
+
});
|
|
42
47
|
(0, eslint_file_1.addOverrideToLintConfig)(tree, projectConfig.root, {
|
|
43
48
|
files: ['*.ts', '*.js'],
|
|
44
49
|
rules: {},
|