@public-ui/visual-tests 3.0.2-6ae0104cda0b7b19a5b0d6bbc5f990b9fe544fa0.0 → 3.0.2-d721ede5369345abe032367b7d05a7c5a20dca9b.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/package.json +2 -2
  2. package/src/index.js +7 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/visual-tests",
3
- "version": "3.0.2-6ae0104cda0b7b19a5b0d6bbc5f990b9fe544fa0.0",
3
+ "version": "3.0.2-d721ede5369345abe032367b7d05a7c5a20dca9b.0",
4
4
  "license": "EUPL-1.2",
5
5
  "homepage": "https://public-ui.github.io",
6
6
  "repository": {
@@ -29,7 +29,7 @@
29
29
  "axe-playwright": "2.1.0",
30
30
  "portfinder": "1.0.37",
31
31
  "serve": "14.2.4",
32
- "@public-ui/sample-react": "3.0.2-6ae0104cda0b7b19a5b0d6bbc5f990b9fe544fa0.0"
32
+ "@public-ui/sample-react": "3.0.2-d721ede5369345abe032367b7d05a7c5a20dca9b.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@babel/eslint-parser": "7.27.5",
package/src/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import child_process from 'node:child_process';
2
- import path from 'node:path';
3
- import { fileURLToPath, pathToFileURL } from 'url';
4
1
  import * as crypto from 'crypto';
5
- import { readFile } from 'fs/promises';
6
2
  import * as fs from 'fs';
3
+ import { readFile } from 'fs/promises';
4
+ import child_process from 'node:child_process';
5
+ import path from 'node:path';
7
6
  import portfinder from 'portfinder';
8
7
  import * as process from 'process';
8
+ import { fileURLToPath } from 'url';
9
9
 
10
10
  const tempDir = process.env.RUNNER_TEMP || process.env.TMPDIR; // TODO: Check on Windows
11
11
 
@@ -27,15 +27,14 @@ if (!fs.existsSync(workingDir)) {
27
27
  }
28
28
 
29
29
  const buildPath = path.join(tempDir, `kolibri-visual-testing-build-${crypto.randomUUID()}`);
30
- const rawPackageJsonPath = new URL(path.join(workingDir, 'package.json'), import.meta.url).href;
31
- const packageJsonPath = process.platform === 'win32' ? pathToFileURL(rawPackageJsonPath) : rawPackageJsonPath;
32
- const packageJsonContent = await readFile(new URL(packageJsonPath, import.meta.url), 'utf8');
30
+ const packageJsonPath = path.join(workingDir, 'package.json');
31
+ const packageJsonContent = await readFile(packageJsonPath, 'utf8');
33
32
  const packageJson = JSON.parse(packageJsonContent);
34
33
 
35
34
  console.log(`
36
35
  Building React Sample App (v${packageJson?.version ?? '#.#.#'}) …`);
37
36
 
38
- const buildResult = child_process.spawnSync('pnpm', ['run', 'build', `--outDir="${buildPath}"`], {
37
+ const buildResult = child_process.spawnSync('pnpm', ['run', 'build', `--outDir=${buildPath}`], {
39
38
  cwd: workingDir,
40
39
  encoding: 'utf-8',
41
40
  shell: true,