@nx/playwright 18.3.0-beta.1 → 18.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/playwright",
3
- "version": "18.3.0-beta.1",
3
+ "version": "18.3.0-beta.2",
4
4
  "type": "commonjs",
5
5
  "homepage": "https://nx.dev",
6
6
  "private": false,
@@ -33,9 +33,9 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@phenomnomnominal/tsquery": "~5.0.1",
36
- "@nx/devkit": "18.3.0-beta.1",
37
- "@nx/eslint": "18.3.0-beta.1",
38
- "@nx/js": "18.3.0-beta.1",
36
+ "@nx/devkit": "18.3.0-beta.2",
37
+ "@nx/eslint": "18.3.0-beta.2",
38
+ "@nx/js": "18.3.0-beta.2",
39
39
  "tslib": "^2.3.0",
40
40
  "minimatch": "9.0.3"
41
41
  },
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.initGeneratorInternal = exports.initGenerator = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const update_package_scripts_1 = require("@nx/devkit/src/utils/update-package-scripts");
5
+ const add_plugin_1 = require("@nx/devkit/src/utils/add-plugin");
6
6
  const plugin_1 = require("../../plugins/plugin");
7
7
  const versions_1 = require("../../utils/versions");
8
8
  function initGenerator(tree, options) {
@@ -22,10 +22,7 @@ async function initGeneratorInternal(tree, options) {
22
22
  }, undefined, options.keepExistingVersions));
23
23
  }
24
24
  if (options.addPlugin) {
25
- addPlugin(tree);
26
- }
27
- if (options.updatePackageScripts) {
28
- await (0, update_package_scripts_1.updatePackageScripts)(tree, plugin_1.createNodes);
25
+ await (0, add_plugin_1.addPlugin)(tree, await (0, devkit_1.createProjectGraphAsync)(), '@nx/playwright/plugin', plugin_1.createNodes, { targetName: ['e2e', 'playwright:e2e', 'playwright-e2e'] }, options.updatePackageScripts);
29
26
  }
30
27
  if (!options.skipFormat) {
31
28
  await (0, devkit_1.formatFiles)(tree);
@@ -33,19 +30,4 @@ async function initGeneratorInternal(tree, options) {
33
30
  return (0, devkit_1.runTasksInSerial)(...tasks);
34
31
  }
35
32
  exports.initGeneratorInternal = initGeneratorInternal;
36
- function addPlugin(tree) {
37
- const nxJson = (0, devkit_1.readNxJson)(tree);
38
- nxJson.plugins ??= [];
39
- if (!nxJson.plugins.some((p) => typeof p === 'string'
40
- ? p === '@nx/playwright/plugin'
41
- : p.plugin === '@nx/playwright/plugin')) {
42
- nxJson.plugins.push({
43
- plugin: '@nx/playwright/plugin',
44
- options: {
45
- targetName: 'e2e',
46
- },
47
- });
48
- (0, devkit_1.updateNxJson)(tree, nxJson);
49
- }
50
- }
51
33
  exports.default = initGenerator;