@nx/playwright 19.8.0-canary.20240912-b6140d4 → 19.8.0-canary.20240913-5bbaffb

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/playwright",
3
- "version": "19.8.0-canary.20240912-b6140d4",
3
+ "version": "19.8.0-canary.20240913-5bbaffb",
4
4
  "type": "commonjs",
5
5
  "homepage": "https://nx.dev",
6
6
  "private": false,
@@ -35,11 +35,11 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@phenomnomnominal/tsquery": "~5.0.1",
38
- "@nx/devkit": "19.8.0-canary.20240912-b6140d4",
39
- "@nx/eslint": "19.8.0-canary.20240912-b6140d4",
40
- "@nx/webpack": "19.8.0-canary.20240912-b6140d4",
41
- "@nx/vite": "19.8.0-canary.20240912-b6140d4",
42
- "@nx/js": "19.8.0-canary.20240912-b6140d4",
38
+ "@nx/devkit": "19.8.0-canary.20240913-5bbaffb",
39
+ "@nx/eslint": "19.8.0-canary.20240913-5bbaffb",
40
+ "@nx/webpack": "19.8.0-canary.20240913-5bbaffb",
41
+ "@nx/vite": "19.8.0-canary.20240913-5bbaffb",
42
+ "@nx/js": "19.8.0-canary.20240913-5bbaffb",
43
43
  "tslib": "^2.3.0",
44
44
  "minimatch": "9.0.3"
45
45
  },
@@ -14,7 +14,7 @@ async function convertToInferred(tree, options) {
14
14
  },
15
15
  ], options.project);
16
16
  if (migratedProjects.size === 0) {
17
- throw new Error('Could not find any targets to migrate.');
17
+ throw new executor_to_plugin_migrator_1.NoTargetsToMigrateError();
18
18
  }
19
19
  if (!options.skipFormat) {
20
20
  await (0, devkit_1.formatFiles)(tree);
@@ -6,6 +6,7 @@ const eslint_1 = require("@nx/eslint");
6
6
  const global_eslint_config_1 = require("@nx/eslint/src/generators/init/global-eslint-config");
7
7
  const versions_1 = require("./versions");
8
8
  const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
9
+ const flat_config_1 = require("@nx/eslint/src/utils/flat-config");
9
10
  async function addLinterToPlaywrightProject(tree, options) {
10
11
  if (options.linter === eslint_1.Linter.None) {
11
12
  return () => { };
@@ -33,20 +34,30 @@ async function addLinterToPlaywrightProject(tree, options) {
33
34
  : () => { });
34
35
  if ((0, eslint_file_1.isEslintConfigSupported)(tree, projectConfig.root) ||
35
36
  (0, eslint_file_1.isEslintConfigSupported)(tree)) {
36
- (0, eslint_file_1.addExtendsToLintConfig)(tree, projectConfig.root, 'plugin:playwright/recommended');
37
- if (options.rootProject) {
38
- (0, eslint_file_1.addPluginsToLintConfig)(tree, projectConfig.root, '@nx');
39
- (0, eslint_file_1.addOverrideToLintConfig)(tree, projectConfig.root, global_eslint_config_1.javaScriptOverride);
37
+ if ((0, flat_config_1.useFlatConfig)(tree)) {
38
+ (0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(tree, projectConfig.root, 'flat/recommended', 'playwright', 'eslint-plugin-playwright', false, false);
39
+ (0, eslint_file_1.addOverrideToLintConfig)(tree, projectConfig.root, {
40
+ files: ['*.ts', '*.js'],
41
+ rules: {},
42
+ });
43
+ }
44
+ else {
45
+ const addExtendsTask = (0, eslint_file_1.addExtendsToLintConfig)(tree, projectConfig.root, 'plugin:playwright/recommended');
46
+ tasks.push(addExtendsTask);
47
+ if (options.rootProject) {
48
+ (0, eslint_file_1.addPluginsToLintConfig)(tree, projectConfig.root, '@nx');
49
+ (0, eslint_file_1.addOverrideToLintConfig)(tree, projectConfig.root, global_eslint_config_1.javaScriptOverride);
50
+ }
51
+ (0, eslint_file_1.addOverrideToLintConfig)(tree, projectConfig.root, {
52
+ files: [`${options.directory}/**/*.{ts,js,tsx,jsx}`],
53
+ parserOptions: !options.setParserOptionsProject
54
+ ? undefined
55
+ : {
56
+ project: `${projectConfig.root}/tsconfig.*?.json`,
57
+ },
58
+ rules: {},
59
+ });
40
60
  }
41
- (0, eslint_file_1.addOverrideToLintConfig)(tree, projectConfig.root, {
42
- files: [`${options.directory}/**/*.{ts,js,tsx,jsx}`],
43
- parserOptions: !options.setParserOptionsProject
44
- ? undefined
45
- : {
46
- project: `${projectConfig.root}/tsconfig.*?.json`,
47
- },
48
- rules: {},
49
- });
50
61
  }
51
62
  return (0, devkit_1.runTasksInSerial)(...tasks);
52
63
  }
@@ -1,3 +1,3 @@
1
1
  export declare const nxVersion: any;
2
2
  export declare const playwrightVersion = "^1.36.0";
3
- export declare const eslintPluginPlaywrightVersion = "^0.15.3";
3
+ export declare const eslintPluginPlaywrightVersion = "^1.6.2";
@@ -3,4 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.eslintPluginPlaywrightVersion = exports.playwrightVersion = exports.nxVersion = void 0;
4
4
  exports.nxVersion = require('../../package.json').version;
5
5
  exports.playwrightVersion = '^1.36.0';
6
- exports.eslintPluginPlaywrightVersion = '^0.15.3';
6
+ exports.eslintPluginPlaywrightVersion = '^1.6.2';