@nx/playwright 24.0.0-canary.20261020-e7ffd79 → 24.0.0-canary.20261026-e5bc931
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/dist/src/generators/configuration/configuration.js +6 -3
- package/dist/src/generators/configuration/schema.d.ts +0 -4
- package/dist/src/generators/configuration/schema.json +0 -6
- package/dist/src/plugins/plugin.js +2 -2
- package/dist/src/utils/add-linter.d.ts +0 -4
- package/dist/src/utils/add-linter.js +1 -1
- package/package.json +5 -5
|
@@ -57,6 +57,7 @@ async function configurationGeneratorInternal(tree, rawOptions) {
|
|
|
57
57
|
allowJs: true,
|
|
58
58
|
outDir: 'out-tsc/playwright',
|
|
59
59
|
sourceMap: false,
|
|
60
|
+
types: ['node'],
|
|
60
61
|
},
|
|
61
62
|
include: [
|
|
62
63
|
(0, devkit_1.joinPathFragments)(options.directory, '**/*.ts'),
|
|
@@ -85,6 +86,7 @@ async function configurationGeneratorInternal(tree, rawOptions) {
|
|
|
85
86
|
allowJs: true,
|
|
86
87
|
outDir: `${offsetFromProjectRoot}dist/out-tsc`,
|
|
87
88
|
sourceMap: false,
|
|
89
|
+
types: ['node'],
|
|
88
90
|
},
|
|
89
91
|
include: [
|
|
90
92
|
'**/*.ts',
|
|
@@ -115,7 +117,6 @@ async function configurationGeneratorInternal(tree, rawOptions) {
|
|
|
115
117
|
}
|
|
116
118
|
else {
|
|
117
119
|
tsconfig.compilerOptions.outDir = `${offsetFromProjectRoot}dist/out-tsc`;
|
|
118
|
-
tsconfig.compilerOptions.module = 'commonjs';
|
|
119
120
|
}
|
|
120
121
|
(0, devkit_1.writeJson)(tree, tsconfigPath, tsconfig);
|
|
121
122
|
}
|
|
@@ -141,7 +142,7 @@ async function configurationGeneratorInternal(tree, rawOptions) {
|
|
|
141
142
|
skipPackageJson: options.skipPackageJson,
|
|
142
143
|
js: options.js,
|
|
143
144
|
directory: options.directory,
|
|
144
|
-
enableTypedLinting:
|
|
145
|
+
enableTypedLinting: options.enableTypedLinting,
|
|
145
146
|
rootProject: options.rootProject ?? projectConfig.root === '.',
|
|
146
147
|
}));
|
|
147
148
|
if (options.js) {
|
|
@@ -153,7 +154,9 @@ async function configurationGeneratorInternal(tree, rawOptions) {
|
|
|
153
154
|
tasks.push((0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
|
|
154
155
|
// required since used in playwright config
|
|
155
156
|
'@nx/devkit': versions_1.nxVersion,
|
|
156
|
-
})
|
|
157
|
+
}),
|
|
158
|
+
// The e2e tsconfig loads Node types. Keep an installed version.
|
|
159
|
+
(0, devkit_1.addDependenciesToPackageJson)(tree, {}, { '@types/node': internal_2.typesNodeVersion }, undefined, true));
|
|
157
160
|
}
|
|
158
161
|
if (!options.skipInstall) {
|
|
159
162
|
tasks.push(getBrowsersInstallTask());
|
|
@@ -12,10 +12,6 @@ export interface ConfigurationGeneratorSchema {
|
|
|
12
12
|
skipInstall?: boolean;
|
|
13
13
|
linter?: LinterType;
|
|
14
14
|
enableTypedLinting?: boolean; // default is false
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
|
|
17
|
-
*/
|
|
18
|
-
setParserOptionsProject?: boolean; // default is false
|
|
19
15
|
/**
|
|
20
16
|
* command to give playwright to run the web server
|
|
21
17
|
* @example: "npx nx serve my-fe-app"
|
|
@@ -52,12 +52,6 @@
|
|
|
52
52
|
"description": "Whether to enable typed linting. For flat configs, this configures the recommended `parserOptions.projectService` and `tsconfigRootDir`. For legacy `.eslintrc` configs, this configures `parserOptions.project`. We do not enable this by default for lint performance reasons.",
|
|
53
53
|
"default": false
|
|
54
54
|
},
|
|
55
|
-
"setParserOptionsProject": {
|
|
56
|
-
"type": "boolean",
|
|
57
|
-
"description": "Deprecated alias for `enableTypedLinting`.",
|
|
58
|
-
"default": false,
|
|
59
|
-
"x-deprecated": "Use `enableTypedLinting` instead. This option will be removed in Nx v24."
|
|
60
|
-
},
|
|
61
55
|
"skipFormat": {
|
|
62
56
|
"description": "Skip formatting files.",
|
|
63
57
|
"type": "boolean",
|
|
@@ -669,8 +669,8 @@ function toReadinessServer(task) {
|
|
|
669
669
|
return server;
|
|
670
670
|
}
|
|
671
671
|
function parseTaskFromCommand(command) {
|
|
672
|
-
const nxRunRegex = /^(?:(?:npx|yarn|bun|pnpm|pnpm exec|pnpx) )?nx run (\S+:\S+)$/;
|
|
673
|
-
const infixRegex = /^(?:(?:npx|yarn|bun|pnpm|pnpm exec|pnpx) )?nx (\S+ \S+)$/;
|
|
672
|
+
const nxRunRegex = /^(?:(?:npx|yarn|bun|bunx|bun x|pnpm|pnpm exec|pnpx) )?nx run (\S+:\S+)$/;
|
|
673
|
+
const infixRegex = /^(?:(?:npx|yarn|bun|bunx|bun x|pnpm|pnpm exec|pnpx) )?nx (\S+ \S+)$/;
|
|
674
674
|
const nxRunMatch = command.match(nxRunRegex);
|
|
675
675
|
if (nxRunMatch) {
|
|
676
676
|
// Truthiness rather than `!== undefined`: a trailing colon (`app:serve:`)
|
|
@@ -4,10 +4,6 @@ export interface PlaywrightLinterOptions {
|
|
|
4
4
|
project: string;
|
|
5
5
|
linter: LinterType;
|
|
6
6
|
enableTypedLinting?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
|
|
9
|
-
*/
|
|
10
|
-
setParserOptionsProject?: boolean;
|
|
11
7
|
skipPackageJson: boolean;
|
|
12
8
|
rootProject: boolean;
|
|
13
9
|
js?: boolean;
|
|
@@ -12,7 +12,7 @@ async function addLinterToPlaywrightProject(tree, options) {
|
|
|
12
12
|
const tasks = [];
|
|
13
13
|
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
14
14
|
const eslintFile = (0, internal_1.findEslintFile)(tree, projectConfig.root);
|
|
15
|
-
const enableTypedLinting =
|
|
15
|
+
const { enableTypedLinting } = options;
|
|
16
16
|
// An existing ESLint config means the project is already registered, so skip
|
|
17
17
|
// straight to the Playwright-specific shaping below.
|
|
18
18
|
if (options.linter !== 'eslint' || !eslintFile) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/playwright",
|
|
3
|
-
"version": "24.0.0-canary.
|
|
3
|
+
"version": "24.0.0-canary.20261026-e5bc931",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
@@ -75,16 +75,16 @@
|
|
|
75
75
|
"supportsOptionalMigrations": true
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@nx/devkit": "24.0.0-canary.
|
|
79
|
-
"@nx/eslint": "24.0.0-canary.
|
|
80
|
-
"@nx/js": "24.0.0-canary.
|
|
78
|
+
"@nx/devkit": "24.0.0-canary.20261026-e5bc931",
|
|
79
|
+
"@nx/eslint": "24.0.0-canary.20261026-e5bc931",
|
|
80
|
+
"@nx/js": "24.0.0-canary.20261026-e5bc931",
|
|
81
81
|
"https-proxy-agent": "^7.0.6",
|
|
82
82
|
"minimatch": "10.2.5",
|
|
83
83
|
"semver": "^7.6.3",
|
|
84
84
|
"tslib": "^2.3.0"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"nx": "24.0.0-canary.
|
|
87
|
+
"nx": "24.0.0-canary.20261026-e5bc931"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"@playwright/test": "^1.36.0"
|