@nx/playwright 20.4.4 → 20.5.0-beta.1
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": "20.
|
|
3
|
+
"version": "20.5.0-beta.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"homepage": "https://nx.dev",
|
|
6
6
|
"private": false,
|
|
@@ -35,18 +35,26 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
38
|
-
"@nx/devkit": "20.
|
|
39
|
-
"@nx/eslint": "20.
|
|
40
|
-
"@nx/js": "20.
|
|
38
|
+
"@nx/devkit": "20.5.0-beta.1",
|
|
39
|
+
"@nx/eslint": "20.5.0-beta.1",
|
|
40
|
+
"@nx/js": "20.5.0-beta.1",
|
|
41
41
|
"tslib": "^2.3.0",
|
|
42
42
|
"minimatch": "9.0.3"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@playwright/test": "^1.36.0"
|
|
45
|
+
"@playwright/test": "^1.36.0",
|
|
46
|
+
"@nx/webpack": "file:../webpack",
|
|
47
|
+
"@nx/vite": "file:../vite"
|
|
46
48
|
},
|
|
47
49
|
"peerDependenciesMeta": {
|
|
48
50
|
"@playwright/test": {
|
|
49
51
|
"optional": true
|
|
52
|
+
},
|
|
53
|
+
"@nx/webpack": {
|
|
54
|
+
"optional": true
|
|
55
|
+
},
|
|
56
|
+
"@nx/vite": {
|
|
57
|
+
"optional": true
|
|
50
58
|
}
|
|
51
59
|
},
|
|
52
60
|
"executors": "./executors.json",
|
|
@@ -84,9 +84,8 @@ async function default_1(tree) {
|
|
|
84
84
|
: 'preview', projectToMigrate.configFileType === 'webpack'
|
|
85
85
|
? 'serveStaticTargetName'
|
|
86
86
|
: 'previewTargetName', projectToMigrate.configFileType === 'webpack'
|
|
87
|
-
?
|
|
88
|
-
:
|
|
89
|
-
.createNodesV2)) ??
|
|
87
|
+
? (await getDynamicImportedModule('@nx/webpack/src/plugins/plugin', '@nx/webpack should be installed when attempting to setup @nx/playwright with a webpack config file.')).createNodesV2
|
|
88
|
+
: (await getDynamicImportedModule('@nx/vite/plugin', '@nx/vite should be installed when attempting to setup @nx/playwright with a vite config file.')).createNodesV2)) ??
|
|
90
89
|
getServeStaticLikeTarget(tree, graph, projectToMigrate.projectName, projectToMigrate.configFileType === 'webpack'
|
|
91
90
|
? '@nx/web:file-server'
|
|
92
91
|
: '@nx/vite:preview-server');
|
|
@@ -132,6 +131,14 @@ async function default_1(tree) {
|
|
|
132
131
|
await (0, add_e2e_ci_target_defaults_1.default)(tree);
|
|
133
132
|
await (0, devkit_1.formatFiles)(tree);
|
|
134
133
|
}
|
|
134
|
+
async function getDynamicImportedModule(moduleName, error) {
|
|
135
|
+
try {
|
|
136
|
+
return (await Promise.resolve(`${moduleName}`).then(s => require(s)));
|
|
137
|
+
}
|
|
138
|
+
catch {
|
|
139
|
+
throw new Error(error);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
135
142
|
async function getServeStaticTargetNameForConfigFile(tree, pluginName, configFile, defaultTargetName, targetNamePluginOption, createNodesV2) {
|
|
136
143
|
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
137
144
|
const matchingPluginRegistrations = nxJson.plugins?.filter((p) => typeof p === 'string' ? p === pluginName : p.plugin === pluginName);
|