@nx/playwright 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/playwright",
|
|
3
|
-
"version": "23.0.0-beta.
|
|
3
|
+
"version": "23.0.0-beta.18",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"homepage": "https://nx.dev",
|
|
6
6
|
"private": false,
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"directory": "packages/playwright"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@nx/devkit": "23.0.0-beta.
|
|
38
|
-
"@nx/eslint": "23.0.0-beta.
|
|
39
|
-
"@nx/js": "23.0.0-beta.
|
|
37
|
+
"@nx/devkit": "23.0.0-beta.18",
|
|
38
|
+
"@nx/eslint": "23.0.0-beta.18",
|
|
39
|
+
"@nx/js": "23.0.0-beta.18",
|
|
40
40
|
"tslib": "^2.3.0",
|
|
41
41
|
"minimatch": "10.2.5",
|
|
42
42
|
"semver": "^7.6.3"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"nx": "23.0.0-beta.
|
|
45
|
+
"nx": "23.0.0-beta.18"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@playwright/test": "^1.36.0"
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"version": 2,
|
|
4
4
|
"title": "Playwright executor",
|
|
5
5
|
"description": "Run Playwright tests.",
|
|
6
|
+
"x-deprecated": "The `@nx/playwright:playwright` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/playwright:convert-to-inferred` to migrate to the `@nx/playwright/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.",
|
|
6
7
|
"type": "object",
|
|
7
8
|
"properties": {
|
|
8
9
|
"browser": {
|
|
@@ -14,7 +14,7 @@ const add_linter_1 = require("../../utils/add-linter");
|
|
|
14
14
|
const assert_supported_playwright_version_1 = require("../../utils/assert-supported-playwright-version");
|
|
15
15
|
const versions_1 = require("../../utils/versions");
|
|
16
16
|
const init_1 = require("../init/init");
|
|
17
|
-
const
|
|
17
|
+
const internal_3 = require("@nx/eslint/internal");
|
|
18
18
|
function configurationGenerator(tree, options) {
|
|
19
19
|
return configurationGeneratorInternal(tree, { addPlugin: false, ...options });
|
|
20
20
|
}
|
|
@@ -300,7 +300,7 @@ Rename or remove the existing e2e target.`);
|
|
|
300
300
|
function ignoreTestOutput(tree, options) {
|
|
301
301
|
// Make sure playwright outputs are not linted.
|
|
302
302
|
if (options.linter === 'eslint') {
|
|
303
|
-
(0,
|
|
303
|
+
(0, internal_3.addIgnoresToLintConfig)(tree, '', ['**/test-output']);
|
|
304
304
|
}
|
|
305
305
|
// Handle gitignore
|
|
306
306
|
if (!tree.exists('.gitignore')) {
|
package/src/utils/add-linter.js
CHANGED
|
@@ -3,17 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.addLinterToPlaywrightProject = addLinterToPlaywrightProject;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const eslint_1 = require("@nx/eslint");
|
|
6
|
-
const
|
|
6
|
+
const internal_1 = require("@nx/eslint/internal");
|
|
7
7
|
const versions_1 = require("./versions");
|
|
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");
|
|
10
8
|
async function addLinterToPlaywrightProject(tree, options) {
|
|
11
9
|
if (options.linter === 'none') {
|
|
12
10
|
return () => { };
|
|
13
11
|
}
|
|
14
12
|
const tasks = [];
|
|
15
13
|
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
16
|
-
const eslintFile = (0,
|
|
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,
|
|
@@ -32,28 +30,28 @@ async function addLinterToPlaywrightProject(tree, options) {
|
|
|
32
30
|
tasks.push(!options.skipPackageJson
|
|
33
31
|
? (0, devkit_1.addDependenciesToPackageJson)(tree, {}, { 'eslint-plugin-playwright': versions_1.eslintPluginPlaywrightVersion }, undefined, true)
|
|
34
32
|
: () => { });
|
|
35
|
-
if ((0,
|
|
36
|
-
(0,
|
|
37
|
-
if ((0,
|
|
38
|
-
(0,
|
|
33
|
+
if ((0, internal_1.isEslintConfigSupported)(tree, projectConfig.root) ||
|
|
34
|
+
(0, internal_1.isEslintConfigSupported)(tree)) {
|
|
35
|
+
if ((0, internal_1.useFlatConfig)(tree)) {
|
|
36
|
+
(0, internal_1.addPredefinedConfigToFlatLintConfig)(tree, projectConfig.root, 'flat/recommended', {
|
|
39
37
|
moduleName: 'playwright',
|
|
40
38
|
moduleImportPath: 'eslint-plugin-playwright',
|
|
41
39
|
spread: false,
|
|
42
40
|
insertAtTheEnd: false,
|
|
43
41
|
});
|
|
44
|
-
(0,
|
|
42
|
+
(0, internal_1.addOverrideToLintConfig)(tree, projectConfig.root, {
|
|
45
43
|
files: ['*.ts', '*.js'],
|
|
46
44
|
rules: {},
|
|
47
45
|
});
|
|
48
46
|
}
|
|
49
47
|
else {
|
|
50
|
-
const addExtendsTask = (0,
|
|
48
|
+
const addExtendsTask = (0, internal_1.addExtendsToLintConfig)(tree, projectConfig.root, 'plugin:playwright/recommended');
|
|
51
49
|
tasks.push(addExtendsTask);
|
|
52
50
|
if (options.rootProject) {
|
|
53
|
-
(0,
|
|
54
|
-
(0,
|
|
51
|
+
(0, internal_1.addPluginsToLintConfig)(tree, projectConfig.root, '@nx');
|
|
52
|
+
(0, internal_1.addOverrideToLintConfig)(tree, projectConfig.root, internal_1.javaScriptOverride);
|
|
55
53
|
}
|
|
56
|
-
(0,
|
|
54
|
+
(0, internal_1.addOverrideToLintConfig)(tree, projectConfig.root, {
|
|
57
55
|
files: [`${options.directory}/**/*.{ts,js,tsx,jsx}`],
|
|
58
56
|
parserOptions: !options.setParserOptionsProject
|
|
59
57
|
? undefined
|