@nx/cypress 23.0.0-beta.16 → 23.0.0-beta.18

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/cypress",
3
- "version": "23.0.0-beta.16",
3
+ "version": "23.0.0-beta.18",
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": {
@@ -76,9 +76,9 @@
76
76
  "migrations": "./migrations.json"
77
77
  },
78
78
  "dependencies": {
79
- "@nx/devkit": "23.0.0-beta.16",
80
- "@nx/eslint": "23.0.0-beta.16",
81
- "@nx/js": "23.0.0-beta.16",
79
+ "@nx/devkit": "23.0.0-beta.18",
80
+ "@nx/eslint": "23.0.0-beta.18",
81
+ "@nx/js": "23.0.0-beta.18",
82
82
  "@phenomnomnominal/tsquery": "~6.2.0",
83
83
  "detect-port": "^2.1.0",
84
84
  "semver": "^7.6.3",
@@ -86,7 +86,7 @@
86
86
  "tslib": "^2.3.0"
87
87
  },
88
88
  "devDependencies": {
89
- "nx": "23.0.0-beta.16"
89
+ "nx": "23.0.0-beta.18"
90
90
  },
91
91
  "peerDependencies": {
92
92
  "cypress": ">= 13 < 16"
@@ -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,uBAgIzB"}
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;AAetE,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,uBAgIzB"}
@@ -3,9 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addLinterToCyProject = addLinterToCyProject;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const eslint_1 = require("@nx/eslint");
6
- const global_eslint_config_1 = require("@nx/eslint/src/generators/init/global-eslint-config");
7
- const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
8
- const flat_config_1 = require("@nx/eslint/src/utils/flat-config");
6
+ const internal_1 = require("@nx/eslint/internal");
9
7
  const versions_1 = require("./versions");
10
8
  async function addLinterToCyProject(tree, options) {
11
9
  if (options.linter === 'none') {
@@ -13,7 +11,7 @@ async function addLinterToCyProject(tree, options) {
13
11
  }
14
12
  const tasks = [];
15
13
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
16
- const eslintFile = (0, eslint_file_1.findEslintFile)(tree, projectConfig.root);
14
+ const eslintFile = (0, internal_1.findEslintFile)(tree, projectConfig.root);
17
15
  if (!eslintFile) {
18
16
  tasks.push(await (0, eslint_1.lintProjectGenerator)(tree, {
19
17
  project: options.project,
@@ -34,28 +32,28 @@ async function addLinterToCyProject(tree, options) {
34
32
  const pkgVersions = (0, versions_1.versions)(tree);
35
33
  tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, {}, { 'eslint-plugin-cypress': pkgVersions.eslintPluginCypressVersion }, undefined, true));
36
34
  }
37
- if ((0, eslint_file_1.isEslintConfigSupported)(tree, projectConfig.root) ||
38
- (0, eslint_file_1.isEslintConfigSupported)(tree)) {
35
+ if ((0, internal_1.isEslintConfigSupported)(tree, projectConfig.root) ||
36
+ (0, internal_1.isEslintConfigSupported)(tree)) {
39
37
  const overrides = [];
40
- if ((0, flat_config_1.useFlatConfig)(tree)) {
41
- (0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(tree, projectConfig.root, 'recommended', {
38
+ if ((0, internal_1.useFlatConfig)(tree)) {
39
+ (0, internal_1.addPredefinedConfigToFlatLintConfig)(tree, projectConfig.root, 'recommended', {
42
40
  moduleName: 'cypress',
43
41
  moduleImportPath: 'eslint-plugin-cypress/flat',
44
42
  spread: false,
45
43
  insertAtTheEnd: false,
46
44
  });
47
- (0, eslint_file_1.addOverrideToLintConfig)(tree, projectConfig.root, {
45
+ (0, internal_1.addOverrideToLintConfig)(tree, projectConfig.root, {
48
46
  files: ['*.ts', '*.js'],
49
47
  rules: {},
50
48
  });
51
49
  }
52
50
  else {
53
51
  if (options.rootProject) {
54
- (0, eslint_file_1.addPluginsToLintConfig)(tree, projectConfig.root, '@nx');
55
- overrides.push(global_eslint_config_1.typeScriptOverride);
56
- overrides.push(global_eslint_config_1.javaScriptOverride);
52
+ (0, internal_1.addPluginsToLintConfig)(tree, projectConfig.root, '@nx');
53
+ overrides.push(internal_1.typeScriptOverride);
54
+ overrides.push(internal_1.javaScriptOverride);
57
55
  }
58
- const addExtendsTask = (0, eslint_file_1.addExtendsToLintConfig)(tree, projectConfig.root, 'plugin:cypress/recommended');
56
+ const addExtendsTask = (0, internal_1.addExtendsToLintConfig)(tree, projectConfig.root, 'plugin:cypress/recommended');
59
57
  tasks.push(addExtendsTask);
60
58
  }
61
59
  /**
@@ -71,7 +69,7 @@ async function addLinterToCyProject(tree, options) {
71
69
  };
72
70
  if (options.overwriteExisting) {
73
71
  overrides.unshift({
74
- files: (0, flat_config_1.useFlatConfig)(tree)
72
+ files: (0, internal_1.useFlatConfig)(tree)
75
73
  ? // For flat configs we don't need to specify the files
76
74
  undefined
77
75
  : ['*.ts', '*.tsx', '*.js', '*.jsx'],
@@ -82,11 +80,11 @@ async function addLinterToCyProject(tree, options) {
82
80
  },
83
81
  rules: {},
84
82
  });
85
- (0, eslint_file_1.replaceOverridesInLintConfig)(tree, projectConfig.root, overrides);
83
+ (0, internal_1.replaceOverridesInLintConfig)(tree, projectConfig.root, overrides);
86
84
  }
87
85
  else {
88
86
  overrides.unshift({
89
- files: (0, flat_config_1.useFlatConfig)(tree)
87
+ files: (0, internal_1.useFlatConfig)(tree)
90
88
  ? // For flat configs we don't need to specify the files
91
89
  undefined
92
90
  : [
@@ -100,7 +98,7 @@ async function addLinterToCyProject(tree, options) {
100
98
  },
101
99
  rules: {},
102
100
  });
103
- overrides.forEach((override) => (0, eslint_file_1.addOverrideToLintConfig)(tree, projectConfig.root, override));
101
+ overrides.forEach((override) => (0, internal_1.addOverrideToLintConfig)(tree, projectConfig.root, override));
104
102
  }
105
103
  }
106
104
  return (0, devkit_1.runTasksInSerial)(...tasks);