pagean 11.0.2 → 11.0.4

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/lib/utils.js +7 -7
  2. package/package.json +7 -6
package/lib/utils.js CHANGED
@@ -4,8 +4,8 @@
4
4
  * @module utils
5
5
  */
6
6
 
7
- import { dirname, join } from 'node:path';
8
7
  import { fileURLToPath } from 'node:url';
8
+ import path from 'node:path';
9
9
  import { readFile } from 'node:fs/promises';
10
10
 
11
11
  /**
@@ -22,16 +22,16 @@ const __filename = fileURLToPath(import.meta.url);
22
22
  * @type {string}
23
23
  */
24
24
  // eslint-disable-next-line no-underscore-dangle -- match CJS name
25
- const __dirname = dirname(__filename);
25
+ const __dirname = path.dirname(__filename);
26
26
 
27
27
  /**
28
28
  * Reads a JSON file and returns the parsed data.
29
29
  *
30
- * @param {string} path The path to the JSON file to read.
31
- * @returns {Promise<object>} The parsed JSON data.
30
+ * @param {string} filepath The path to the JSON file to read.
31
+ * @returns {Promise<object>} The parsed JSON data.
32
32
  */
33
- const readJson = async (path) => {
34
- const data = await readFile(path, 'utf8');
33
+ const readJson = async (filepath) => {
34
+ const data = await readFile(filepath, 'utf8');
35
35
  return JSON.parse(data);
36
36
  };
37
37
 
@@ -40,6 +40,6 @@ const readJson = async (path) => {
40
40
  *
41
41
  * @type {object}
42
42
  */
43
- const pkg = await readJson(join(__dirname, '..', 'package.json'));
43
+ const pkg = await readJson(path.join(__dirname, '..', 'package.json'));
44
44
 
45
45
  export { __dirname, __filename, readJson, pkg };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pagean",
3
- "version": "11.0.2",
3
+ "version": "11.0.4",
4
4
  "description": "Pagean is a web page analysis tool designed to automate tests requiring web pages to be loaded in a browser window (e.g. horizontal scrollbar, console errors)",
5
5
  "bin": {
6
6
  "pagean": "./bin/pagean.js",
@@ -53,19 +53,20 @@
53
53
  },
54
54
  "homepage": "https://gitlab.com/gitlab-ci-utils/pagean",
55
55
  "devDependencies": {
56
- "@aarongoldenthal/eslint-config-standard": "^27.0.1",
56
+ "@aarongoldenthal/eslint-config-standard": "^28.0.0",
57
57
  "@aarongoldenthal/stylelint-config-standard": "^18.0.0",
58
58
  "@vitest/coverage-v8": "^1.6.0",
59
59
  "bin-tester": "^6.0.0",
60
- "eslint": "^8.57.0",
60
+ "eslint": "^9.4.0",
61
+ "globals": "^15.4.0",
61
62
  "markdownlint-cli2": "^0.13.0",
62
- "prettier": "^3.2.5",
63
+ "prettier": "^3.3.2",
63
64
  "strip-ansi": "^7.1.0",
64
65
  "stylelint": "^16.6.1",
65
66
  "vitest": "^1.6.0"
66
67
  },
67
68
  "dependencies": {
68
- "ajv": "^8.14.0",
69
+ "ajv": "^8.16.0",
69
70
  "ajv-errors": "^3.0.0",
70
71
  "axios": "^1.7.2",
71
72
  "ci-logger": "^7.0.0",
@@ -76,7 +77,7 @@
76
77
  "kleur": "^4.1.5",
77
78
  "normalize-url": "^8.0.1",
78
79
  "protocolify": "^4.0.0",
79
- "puppeteer": "^22.10.0",
80
+ "puppeteer": "^22.10.1",
80
81
  "xml2js": "^0.6.2"
81
82
  }
82
83
  }