@nx/playwright 24.1.0-beta.0 → 24.1.0-beta.2
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.
|
@@ -14,6 +14,12 @@ const npm_config_proxy_1 = require("../utils/npm-config-proxy");
|
|
|
14
14
|
const proxied_tls_verification_1 = require("../utils/proxied-tls-verification");
|
|
15
15
|
const reporters_1 = require("../utils/reporters");
|
|
16
16
|
const webserver_readiness_1 = require("./webserver-readiness");
|
|
17
|
+
const node_module_1 = require("node:module");
|
|
18
|
+
// Node passes a stand-in require, without a cache, require.extensions or
|
|
19
|
+
// Module._load, when an ESM loader hook supplies this module's source, as
|
|
20
|
+
// Yarn PnP does.
|
|
21
|
+
if (!require.cache)
|
|
22
|
+
require = (0, node_module_1.createRequire)(__filename);
|
|
17
23
|
const playwrightConfigGlob = '**/playwright.config.{js,ts,cjs,cts,mjs,mts}';
|
|
18
24
|
exports.createNodes = [
|
|
19
25
|
playwrightConfigGlob,
|
|
@@ -280,14 +286,14 @@ async function buildPlaywrightTargets(configFilePath, projectRoot, options, cont
|
|
|
280
286
|
}
|
|
281
287
|
const targetName = `${options.ciTargetName}--${relativeSpecFilePath}`;
|
|
282
288
|
ciTargetGroup.push(targetName);
|
|
283
|
-
targets[targetName] = {
|
|
284
|
-
...
|
|
289
|
+
targets[targetName] = (0, internal_1.applyTestFileDirectives)({
|
|
290
|
+
...ciBaseTargetConfig,
|
|
285
291
|
options: {
|
|
286
292
|
...ciBaseTargetConfig.options,
|
|
287
293
|
env: getAtomizedTaskEnvVars(reporterOutputs, outputSubfolder),
|
|
288
294
|
},
|
|
289
295
|
outputs: getAtomizedTaskOutputs(testOutput, reporterOutputs, context.workspaceRoot, projectRoot, outputSubfolder),
|
|
290
|
-
command: `${baseTargetConfig.command} ${relativeSpecFilePath} --output=${(0, devkit_1.joinPathFragments)(testOutput, outputSubfolder)}`,
|
|
296
|
+
command: `${baseTargetConfig.command} ${(0, internal_1.quoteShellArg)(relativeSpecFilePath)} --output=${(0, internal_1.quoteShellArg)((0, devkit_1.joinPathFragments)(testOutput, outputSubfolder))}`,
|
|
291
297
|
metadata: {
|
|
292
298
|
technologies: ['playwright'],
|
|
293
299
|
description: `Runs Playwright Tests in ${relativeSpecFilePath} in CI`,
|
|
@@ -300,7 +306,7 @@ async function buildPlaywrightTargets(configFilePath, projectRoot, options, cont
|
|
|
300
306
|
},
|
|
301
307
|
},
|
|
302
308
|
},
|
|
303
|
-
};
|
|
309
|
+
}, context.workspaceRoot, testFile, { ignoreServerInputs: true });
|
|
304
310
|
dependsOn.push({
|
|
305
311
|
target: targetName,
|
|
306
312
|
params: 'forward',
|
|
@@ -305,11 +305,13 @@ function forkChildEval(configFilePath, workspaceRoot, env) {
|
|
|
305
305
|
// `playwright test` from the project root: a NODE_OPTIONS loader runs at
|
|
306
306
|
// process start and resolves a relative path from there, whichever
|
|
307
307
|
// directory nx was invoked from.
|
|
308
|
-
const
|
|
308
|
+
const options = {
|
|
309
309
|
cwd: (0, node_path_1.join)(workspaceRoot, (0, node_path_1.dirname)(configFilePath)),
|
|
310
310
|
env,
|
|
311
311
|
stdio: ['ignore', 'ignore', 'pipe', 'ipc'],
|
|
312
|
-
|
|
312
|
+
windowsHide: true,
|
|
313
|
+
};
|
|
314
|
+
const child = (0, node_child_process_1.fork)(workerScriptPath, [configFilePath, workspaceRoot], options);
|
|
313
315
|
let stderr = '';
|
|
314
316
|
child.stderr?.on('data', (chunk) => {
|
|
315
317
|
if (stderr.length < MAX_STDERR) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/playwright",
|
|
3
|
-
"version": "24.1.0-beta.
|
|
3
|
+
"version": "24.1.0-beta.2",
|
|
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.1.0-beta.
|
|
79
|
-
"@nx/eslint": "24.1.0-beta.
|
|
80
|
-
"@nx/js": "24.1.0-beta.
|
|
78
|
+
"@nx/devkit": "24.1.0-beta.2",
|
|
79
|
+
"@nx/eslint": "24.1.0-beta.2",
|
|
80
|
+
"@nx/js": "24.1.0-beta.2",
|
|
81
81
|
"https-proxy-agent": "^7.0.6",
|
|
82
|
-
"minimatch": "
|
|
82
|
+
"minimatch": "11.0.8",
|
|
83
83
|
"semver": "^7.6.3",
|
|
84
84
|
"tslib": "^2.3.0"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"nx": "24.1.0-beta.
|
|
87
|
+
"nx": "24.1.0-beta.2"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"@playwright/test": "^1.36.0"
|