@wdio/logger 10.0.0-alpha.149 → 10.0.0-alpha.18

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/build/browser.js CHANGED
@@ -5,7 +5,7 @@ function getLogger(component) {
5
5
  return LOG_METHODS.reduce((acc, cur) => {
6
6
  const prop = cur;
7
7
  if (console[prop]) {
8
- acc[prop] = console[prop].bind(console, `${component}:`);
8
+ acc[prop] = console[prop].bind(console, "".concat(component, ":"));
9
9
  }
10
10
  return acc;
11
11
  }, {});
package/build/index.cjs CHANGED
@@ -63,7 +63,7 @@ var parseMaskingPatterns = (maskingRegexString) => {
63
63
  }).filter((regex2) => regex2 !== void 0);
64
64
  };
65
65
  var mask = (text, maskingPatterns) => {
66
- if (!maskingPatterns) {
66
+ if (!maskingPatterns || typeof text !== "string") {
67
67
  return text;
68
68
  }
69
69
  const endsWithNewline = text.endsWith("\n");
package/build/index.js CHANGED
@@ -25,7 +25,7 @@ var parseMaskingPatterns = (maskingRegexString) => {
25
25
  }).filter((regex) => regex !== void 0);
26
26
  };
27
27
  var mask = (text, maskingPatterns) => {
28
- if (!maskingPatterns) {
28
+ if (!maskingPatterns || typeof text !== "string") {
29
29
  return text;
30
30
  }
31
31
  const endsWithNewline = text.endsWith("\n");
package/build/utils.d.ts CHANGED
@@ -15,7 +15,7 @@ export declare const parseMaskingPatterns: (maskingRegexString: string | undefin
15
15
  *
16
16
  * @param {string} text - The text to mask.
17
17
  * @param {RegExp[] | undefined} maskingPatterns - Array of RegExp patterns to use for masking.
18
- * @returns {string} The masked text, or the original text when no patterns are provided.
18
+ * @returns {string} The masked text, or the original value if not a string or if no patterns are provided.
19
19
  */
20
20
  export declare const mask: (text: string, maskingPatterns: RegExp[] | undefined) => string;
21
21
  //# sourceMappingURL=utils.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/logger",
3
- "version": "10.0.0-alpha.149+ce13bea83",
3
+ "version": "10.0.0-alpha.18+dbf0f4971",
4
4
  "description": "A helper utility for logging of WebdriverIO packages",
5
5
  "author": "Christian Bromann <mail@bromann.dev>",
6
6
  "homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-logger",
@@ -19,9 +19,9 @@
19
19
  },
20
20
  "./package.json": "./package.json"
21
21
  },
22
- "typeScriptVersion": "6.0.3",
22
+ "typeScriptVersion": "3.8.3",
23
23
  "engines": {
24
- "node": ">=22.19.0"
24
+ "node": ">=18.20.0"
25
25
  },
26
26
  "repository": {
27
27
  "type": "git",
@@ -46,5 +46,5 @@
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "ce13bea839fb037eceda429dbf94cd387b7c3584"
49
+ "gitHead": "dbf0f497130676040ce4212d9cf6459adfe16c42"
50
50
  }
package/AGENTS.md DELETED
@@ -1,14 +0,0 @@
1
- # @wdio/logger
2
-
3
- `src/utils.ts` owns masking-pattern parsing and replacement.
4
- `src/index.ts` owns the Node logger: levels, the log file, console formatting, and `progress`.
5
- `src/browser.ts` is the browser shim. Do not assert Node file or masking behavior there.
6
-
7
- ## Tests
8
-
9
- - Assert logger output (file writes and console arguments). Do not spy on `Set.prototype` or other internals of the log cache.
10
- - Apply every matcher. `expect.stringMatching(...)` by itself never fails.
11
- - A trailing-newline test must use a pattern that consumes the newline. `[^ ]*` does not, so it stays green if newline restoration is removed.
12
- - `mask` receives a string from the logger. Do not keep a non-string branch alive for tests.
13
- - Unsafe patterns rejected by `safe-regex2` need a parser test. Safe examples do not reach that gate.
14
- - Ordinary lines go to the log file only. Integration plugin-not-found errors are the exception written to both the file and the terminal.