@lvce-editor/test-with-playwright 6.0.0 → 6.1.0

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.
Files changed (2) hide show
  1. package/dist/main.js +8 -11
  2. package/package.json +2 -3
package/dist/main.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { join } from 'node:path';
2
+ import { pathToFileURL, fileURLToPath } from 'node:url';
2
3
 
3
4
  const HandleResult = 'HandleResult';
4
5
  const HandleFinalResult = 'HandleFinalResult';
@@ -390,10 +391,8 @@ const getOptions = ({
390
391
  const __dirname = import.meta.dirname;
391
392
  const root = join(__dirname, '..', '..', '..', '..', '..');
392
393
 
393
- const getTestWorkerPath = () => {
394
- const url = import.meta.resolve('@lvce-editor/test-with-playwright-worker')
395
- const path = fileURLToPath(url)
396
- return path
394
+ const getTestWorkerUrl = () => {
395
+ return import.meta.resolve('@lvce-editor/test-with-playwright-worker');
397
396
  };
398
397
 
399
398
  const normalizeLine = line => {
@@ -1323,11 +1322,12 @@ const runAllTests = async ({
1323
1322
  headless,
1324
1323
  timeout,
1325
1324
  commandMap,
1326
- testWorkerPath
1325
+ testWorkerUri
1327
1326
  }) => {
1328
1327
  // TODO use `using` once supported
1328
+ const path = fileURLToPath(testWorkerUri);
1329
1329
  const rpc = await NodeWorkerRpcParent.create({
1330
- path: testWorkerPath,
1330
+ path,
1331
1331
  argv: [],
1332
1332
  commandMap,
1333
1333
  stdio: 'inherit'
@@ -1356,10 +1356,7 @@ const handleCliArgs = async ({
1356
1356
  headless
1357
1357
  } = options;
1358
1358
  const timeout = 30_000;
1359
- const testWorkerPath = getTestWorkerPath();
1360
-
1361
- // TODO
1362
- // console.log({ argv, env })
1359
+ const testWorkerUri = getTestWorkerUrl();
1363
1360
  await runAllTests({
1364
1361
  // @ts-ignore
1365
1362
  onlyExtension,
@@ -1368,7 +1365,7 @@ const handleCliArgs = async ({
1368
1365
  headless,
1369
1366
  timeout,
1370
1367
  commandMap,
1371
- testWorkerPath
1368
+ testWorkerUri
1372
1369
  });
1373
1370
  };
1374
1371
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/test-with-playwright",
3
- "version": "6.0.0",
3
+ "version": "6.1.0",
4
4
  "description": "CLI tool for running Playwright tests",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,10 +12,9 @@
12
12
  "main": "dist/main.js",
13
13
  "bin": "bin/test-with-playwright.js",
14
14
  "dependencies": {
15
- "@lvce-editor/test-with-playwright-worker": "6.0.0",
15
+ "@lvce-editor/test-with-playwright-worker": "6.1.0",
16
16
  "@lvce-editor/test-worker": "^5.10.0"
17
17
  },
18
- "devDependencies": {},
19
18
  "engines": {
20
19
  "node": ">=22"
21
20
  },