@modern-js/utils 3.1.2 → 3.1.3

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.
@@ -1026,7 +1026,7 @@
1026
1026
  if (Array.isArray(n)) return n;
1027
1027
  else if ("object" == typeof n) {
1028
1028
  if (!n.defaults) n.defaults = [];
1029
- return pickEnv(n, e, s);
1029
+ return pickEnv(n, e);
1030
1030
  }
1031
1031
  }
1032
1032
  throw new o("`" + s + "` config exports not an array of queries or an object of envs");
@@ -594,7 +594,7 @@
594
594
  const flat = (t)=>{
595
595
  for(let s = 0; s < t.length; s++){
596
596
  let r = t[s];
597
- Array.isArray(r) ? flat(r, e) : void 0 !== r && e.push(r);
597
+ Array.isArray(r) ? flat(r) : void 0 !== r && e.push(r);
598
598
  }
599
599
  return e;
600
600
  };
@@ -40,7 +40,7 @@
40
40
  const r = e.emit;
41
41
  e.emit = function(t, o) {
42
42
  if ("exit" === t) {
43
- const t = verifyENOENT(o, n, "spawn");
43
+ const t = verifyENOENT(o, n);
44
44
  if (t) return r.call(e, "error", t);
45
45
  }
46
46
  return r.apply(e, arguments);
@@ -1239,7 +1239,7 @@
1239
1239
  const flat = (t)=>{
1240
1240
  for(let r = 0; r < t.length; r++){
1241
1241
  let n = t[r];
1242
- Array.isArray(n) ? flat(n, e) : void 0 !== n && e.push(n);
1242
+ Array.isArray(n) ? flat(n) : void 0 !== n && e.push(n);
1243
1243
  }
1244
1244
  return e;
1245
1245
  };
@@ -317,7 +317,7 @@
317
317
  case R:
318
318
  return ">" + blockHeader(t, e.indent) + dropEndingNewline(indentString(foldString(t, l), o));
319
319
  case q:
320
- return '"' + escapeString(t, l) + '"';
320
+ return '"' + escapeString(t) + '"';
321
321
  default:
322
322
  throw new n("impossible error: invalid scalar style");
323
323
  }
@@ -816,7 +816,7 @@
816
816
  case false:
817
817
  return "false";
818
818
  }
819
- if ("string" == typeof e) return quoteString(e, false);
819
+ if ("string" == typeof e) return quoteString(e);
820
820
  if ("number" == typeof e) return String(e);
821
821
  if ("object" == typeof e) return Array.isArray(e) ? serializeArray(e) : serializeObject(e);
822
822
  }
@@ -903,10 +903,10 @@
903
903
  return A;
904
904
  }
905
905
  function serializeKey(u) {
906
- if (0 === u.length) return quoteString(u, true);
906
+ if (0 === u.length) return quoteString(u);
907
907
  const D = String.fromCodePoint(u.codePointAt(0));
908
- if (!r.isIdStartChar(D)) return quoteString(u, true);
909
- for(let e = D.length; e < u.length; e++)if (!r.isIdContinueChar(String.fromCodePoint(u.codePointAt(e)))) return quoteString(u, true);
908
+ if (!r.isIdStartChar(D)) return quoteString(u);
909
+ for(let e = D.length; e < u.length; e++)if (!r.isIdContinueChar(String.fromCodePoint(u.codePointAt(e)))) return quoteString(u);
910
910
  return u;
911
911
  }
912
912
  function serializeArray(u) {
@@ -355,7 +355,7 @@
355
355
  const r = s(210);
356
356
  const objectToString = (e, t, s, n)=>{
357
357
  if ("function" == typeof Buffer && Buffer.isBuffer(e)) return `Buffer.from(${s(e.toString("base64"))}, 'base64')`;
358
- if ("object" == typeof global && e === global) return globalToString(e, t, s, n);
358
+ if ("object" == typeof global && e === global) return globalToString(e, t, s);
359
359
  const i = o[Object.prototype.toString.call(e)];
360
360
  return i ? i(e, t, s, n) : void 0;
361
361
  };
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.1.2",
18
+ "version": "3.1.3",
19
19
  "types": "./dist/types/index.d.ts",
20
20
  "main": "./dist/cjs/index.js",
21
21
  "module": "./dist/esm/index.mjs",
@@ -142,13 +142,13 @@
142
142
  "rslog": "^1.3.2"
143
143
  },
144
144
  "devDependencies": {
145
- "@rslib/core": "0.20.3",
145
+ "@rslib/core": "0.21.0",
146
146
  "@types/node": "^20",
147
- "happy-dom": "^20.8.4",
147
+ "happy-dom": "^20.8.9",
148
148
  "typescript": "^5",
149
149
  "@modern-js/rslib": "2.68.10",
150
- "@scripts/rstest-config": "2.66.0",
151
- "@modern-js/types": "3.1.2"
150
+ "@modern-js/types": "3.1.3",
151
+ "@scripts/rstest-config": "2.66.0"
152
152
  },
153
153
  "peerDependencies": {
154
154
  "react": "^19.2.4",