@midscene/shared 0.14.2 → 0.14.3-beta-20250409031306.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.
package/dist/es/logger.js CHANGED
@@ -43,7 +43,10 @@ function writeLogToFile(topic, message) {
43
43
  function getDebug(topic) {
44
44
  return (...args) => {
45
45
  const message = args.map(
46
- (arg) => typeof arg === "object" ? JSON.stringify(arg) : String(arg)
46
+ (arg) => typeof arg === "object" ? JSON.stringify(
47
+ arg,
48
+ (key, value) => typeof value === "bigint" ? `${value.toString()}n` : value
49
+ ) : String(arg)
47
50
  ).join(" ");
48
51
  if (isNodeEnv) {
49
52
  writeLogToFile(topic, message);
@@ -79,7 +79,10 @@ function writeLogToFile(topic, message) {
79
79
  function getDebug(topic) {
80
80
  return (...args) => {
81
81
  const message = args.map(
82
- (arg) => typeof arg === "object" ? JSON.stringify(arg) : String(arg)
82
+ (arg) => typeof arg === "object" ? JSON.stringify(
83
+ arg,
84
+ (key, value) => typeof value === "bigint" ? `${value.toString()}n` : value
85
+ ) : String(arg)
83
86
  ).join(" ");
84
87
  if (isNodeEnv) {
85
88
  writeLogToFile(topic, message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/shared",
3
- "version": "0.14.2",
3
+ "version": "0.14.3-beta-20250409031306.0",
4
4
  "repository": "https://github.com/web-infra-dev/midscene",
5
5
  "homepage": "https://midscenejs.com/",
6
6
  "types": "./dist/types/index.d.ts",
package/src/logger.ts CHANGED
@@ -34,7 +34,11 @@ export function getDebug(topic: string): DebugFunction {
34
34
  return (...args: unknown[]): void => {
35
35
  const message = args
36
36
  .map((arg) =>
37
- typeof arg === 'object' ? JSON.stringify(arg) : String(arg),
37
+ typeof arg === 'object'
38
+ ? JSON.stringify(arg, (key, value) =>
39
+ typeof value === 'bigint' ? `${value.toString()}n` : value,
40
+ )
41
+ : String(arg),
38
42
  )
39
43
  .join(' ');
40
44