@nx/playwright 23.1.0 → 23.2.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.
@@ -41,4 +41,12 @@ export interface NxPlaywrightOptions {
41
41
  * @param pathToConfig will be used to construct the output paths for reporters and test results
42
42
  * @param options optional configuration options
43
43
  */
44
- export declare function nxE2EPreset(pathToConfig: string, options?: NxPlaywrightOptions): import("@playwright/test").PlaywrightTestConfig<{}, {}>;
44
+ export declare function nxE2EPreset(pathToConfig: string, options?: NxPlaywrightOptions): {
45
+ testDir: string;
46
+ outputDir: string;
47
+ fullyParallel: true;
48
+ forbidOnly: boolean;
49
+ retries: number;
50
+ workers: number;
51
+ reporter: any[];
52
+ };
@@ -4,7 +4,6 @@ exports.nxE2EPreset = nxE2EPreset;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const internal_1 = require("@nx/devkit/internal");
6
6
  const internal_2 = require("@nx/js/internal");
7
- const test_1 = require("@playwright/test");
8
7
  const node_fs_1 = require("node:fs");
9
8
  const node_path_1 = require("node:path");
10
9
  const semver_1 = require("semver");
@@ -71,7 +70,12 @@ function nxE2EPreset(pathToConfig, options) {
71
70
  },
72
71
  ]);
73
72
  }
74
- return (0, test_1.defineConfig)({
73
+ // Plain object on purpose: consumers spread this into their own
74
+ // `defineConfig(...)` call. Calling `defineConfig` here would require
75
+ // `@playwright/test` at runtime, which crashes when the preset package and
76
+ // the consuming workspace resolve different copies of it (playwright
77
+ // refuses to be loaded twice in one process).
78
+ return {
75
79
  testDir: options?.testDir ?? './src',
76
80
  outputDir: testResultOuputDir,
77
81
  /* Run tests in files in parallel */
@@ -84,5 +88,5 @@ function nxE2EPreset(pathToConfig, options) {
84
88
  workers: process.env.CI ? 1 : undefined,
85
89
  /* Reporter to use. See https://playwright.dev/docs/test-reporters */
86
90
  reporter: [...reporters],
87
- });
91
+ };
88
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/playwright",
3
- "version": "23.1.0",
3
+ "version": "23.2.0-beta.1",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "files": [
@@ -78,12 +78,12 @@
78
78
  "tslib": "^2.3.0",
79
79
  "minimatch": "10.2.5",
80
80
  "semver": "^7.6.3",
81
- "@nx/eslint": "23.1.0",
82
- "@nx/js": "23.1.0",
83
- "@nx/devkit": "23.1.0"
81
+ "@nx/devkit": "23.2.0-beta.1",
82
+ "@nx/eslint": "23.2.0-beta.1",
83
+ "@nx/js": "23.2.0-beta.1"
84
84
  },
85
85
  "devDependencies": {
86
- "nx": "23.1.0"
86
+ "nx": "23.2.0-beta.1"
87
87
  },
88
88
  "peerDependencies": {
89
89
  "@playwright/test": "^1.36.0"