@modern-js/utils 3.9.0 → 3.9.2

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 (40) hide show
  1. package/dist/cjs/cli/applyOptionsChain.js +1 -1
  2. package/dist/cjs/cli/get/config.js +1 -1
  3. package/dist/cjs/cli/get/data.js +1 -1
  4. package/dist/cjs/cli/require.js +2 -2
  5. package/dist/compiled/browserslist/index.js +37 -35
  6. package/dist/compiled/commander/index.js +2 -3
  7. package/dist/compiled/debug/index.js +1 -1
  8. package/dist/compiled/execa/index.js +8 -6
  9. package/dist/compiled/fs-extra/index.js +39 -35
  10. package/dist/compiled/glob/index.js +17 -15
  11. package/dist/compiled/inquirer/index.js +29 -25
  12. package/dist/compiled/js-yaml/index.js +17 -15
  13. package/dist/compiled/js-yaml/index.mjs +17 -15
  14. package/dist/compiled/minimist/index.js +1 -2
  15. package/dist/compiled/ora/index.js +17 -15
  16. package/dist/compiled/semver/index.js +12 -13
  17. package/dist/compiled/signale/index.js +3 -3
  18. package/dist/compiled/upath/index.js +15 -11
  19. package/dist/compiled/webpack-chain/index.js +5 -3
  20. package/dist/esm/cli/applyOptionsChain.mjs +1 -1
  21. package/dist/esm/cli/get/config.mjs +1 -1
  22. package/dist/esm/cli/get/data.mjs +1 -1
  23. package/dist/esm/cli/require.mjs +1 -1
  24. package/dist/esm/compiled.mjs +1 -1
  25. package/dist/esm-node/cli/applyOptionsChain.mjs +1 -1
  26. package/dist/esm-node/cli/get/config.mjs +1 -1
  27. package/dist/esm-node/cli/get/data.mjs +1 -1
  28. package/dist/esm-node/cli/require.mjs +1 -1
  29. package/dist/types/cli/common.d.ts +1 -1
  30. package/dist/types/cli/constants.d.ts +1 -1
  31. package/dist/types/cli/get/index.d.ts +2 -2
  32. package/dist/types/cli/index.d.ts +24 -24
  33. package/dist/types/cli/is/index.d.ts +4 -4
  34. package/dist/types/cli/watch.d.ts +1 -1
  35. package/dist/types/compiled.d.ts +27 -27
  36. package/dist/types/index.d.ts +3 -3
  37. package/dist/types/universal/index.d.ts +1 -1
  38. package/package.json +4 -4
  39. package/rslib.config.mts +5 -4
  40. /package/dist/esm/{rslib-runtime.mjs → rslib-runtime~1.mjs} +0 -0
@@ -5434,7 +5434,7 @@
5434
5434
  return t.confidence - e.confidence;
5435
5435
  });
5436
5436
  if (t && true === t.returnAllMatches) return u;
5437
- return u.length > 0 ? u[0].name : null;
5437
+ else return u.length > 0 ? u[0].name : null;
5438
5438
  };
5439
5439
  e.exports.detectFile = function(e, t, r) {
5440
5440
  if ("function" == typeof t) {
@@ -6196,8 +6196,7 @@
6196
6196
  if ("object" == typeof p) {
6197
6197
  o = p;
6198
6198
  continue;
6199
- }
6200
- if ("number" == typeof p) d = p;
6199
+ } else if ("number" == typeof p) d = p;
6201
6200
  else if (void 0 == p) {
6202
6201
  p = o[c];
6203
6202
  if (void 0 !== p) {
@@ -9366,13 +9365,14 @@
9366
9365
  }
9367
9366
  this._hadControl = true;
9368
9367
  return this.emit("data", e);
9368
+ } else {
9369
+ if (this._prompt && this._hadControl && 0 === e.indexOf(this._prompt)) {
9370
+ this._hadControl = false;
9371
+ this.emit("data", this._prompt);
9372
+ e = e.substr(this._prompt.length);
9373
+ }
9374
+ e = e.toString().replace(/./g, this.replace);
9369
9375
  }
9370
- if (this._prompt && this._hadControl && 0 === e.indexOf(this._prompt)) {
9371
- this._hadControl = false;
9372
- this.emit("data", this._prompt);
9373
- e = e.substr(this._prompt.length);
9374
- }
9375
- e = e.toString().replace(/./g, this.replace);
9376
9376
  }
9377
9377
  this.emit("data", e);
9378
9378
  };
@@ -14825,7 +14825,7 @@
14825
14825
  return t(r, e, o, n);
14826
14826
  })(i.innerFrom(e(r, o)));
14827
14827
  }, r);
14828
- if ("number" == typeof t) r = t;
14828
+ else if ("number" == typeof t) r = t;
14829
14829
  return o.operate(function(t, n) {
14830
14830
  return u.mergeInternals(t, n, e, r);
14831
14831
  });
@@ -15084,7 +15084,7 @@
15084
15084
  for(var i = 0; i < r; i++){
15085
15085
  var o = null == n ? void 0 : n[e[i]];
15086
15086
  if (void 0 === o) return;
15087
- n = o;
15087
+ else n = o;
15088
15088
  }
15089
15089
  return n;
15090
15090
  });
@@ -17367,7 +17367,7 @@
17367
17367
  this.pending = false;
17368
17368
  var r = this._execute(e, t);
17369
17369
  if (r) return r;
17370
- if (false === this.pending && null != this.id) this.id = this.recycleAsyncId(this.scheduler, this.id, null);
17370
+ else if (false === this.pending && null != this.id) this.id = this.recycleAsyncId(this.scheduler, this.id, null);
17371
17371
  };
17372
17372
  AsyncAction.prototype._execute = function(e, t) {
17373
17373
  var r = false;
@@ -17619,11 +17619,13 @@
17619
17619
  VirtualAction.prototype.schedule = function(t, r) {
17620
17620
  if (void 0 === r) r = 0;
17621
17621
  if (!Number.isFinite(r)) return o.Subscription.EMPTY;
17622
- if (!this.id) return e.prototype.schedule.call(this, t, r);
17623
- this.active = false;
17624
- var n = new VirtualAction(this.scheduler, this.work);
17625
- this.add(n);
17626
- return n.schedule(t, r);
17622
+ else {
17623
+ if (!this.id) return e.prototype.schedule.call(this, t, r);
17624
+ this.active = false;
17625
+ var n = new VirtualAction(this.scheduler, this.work);
17626
+ this.add(n);
17627
+ return n.schedule(t, r);
17628
+ }
17627
17629
  };
17628
17630
  VirtualAction.prototype.requestAsyncId = function(e, t, r) {
17629
17631
  if (void 0 === r) r = 0;
@@ -17643,8 +17645,8 @@
17643
17645
  if (e.delay === t.delay) if (e.index === t.index) return 0;
17644
17646
  else if (e.index > t.index) return 1;
17645
17647
  else return -1;
17646
- if (e.delay > t.delay) return 1;
17647
- return -1;
17648
+ else if (e.delay > t.delay) return 1;
17649
+ else return -1;
17648
17650
  };
17649
17651
  return VirtualAction;
17650
17652
  }(i.AsyncAction);
@@ -19666,11 +19668,13 @@
19666
19668
  var b = n.emit;
19667
19669
  var y = function(e, t) {
19668
19670
  if (!("exit" === e && processOk(global.process))) return b.apply(this, arguments);
19669
- if (void 0 !== t) n.exitCode = t;
19670
- var r = b.apply(this, arguments);
19671
- l("exit", n.exitCode, null);
19672
- l("afterexit", n.exitCode, null);
19673
- return r;
19671
+ else {
19672
+ if (void 0 !== t) n.exitCode = t;
19673
+ var r = b.apply(this, arguments);
19674
+ l("exit", n.exitCode, null);
19675
+ l("afterexit", n.exitCode, null);
19676
+ return r;
19677
+ }
19674
19678
  };
19675
19679
  } else e.exports = function() {
19676
19680
  return function() {};
@@ -19736,7 +19740,7 @@
19736
19740
  while(u.length && !s.paused){
19737
19741
  var e = u.shift();
19738
19742
  if (null === e) return s.emit("end");
19739
- s.emit("data", e);
19743
+ else s.emit("data", e);
19740
19744
  }
19741
19745
  }
19742
19746
  s.queue = s.push = function(e) {
@@ -47,7 +47,7 @@
47
47
  }
48
48
  function toArray(e) {
49
49
  if (Array.isArray(e)) return e;
50
- if (isNothing(e)) return [];
50
+ else if (isNothing(e)) return [];
51
51
  return [
52
52
  e
53
53
  ];
@@ -855,12 +855,13 @@
855
855
  l = true;
856
856
  d = e.input.charCodeAt(e.position);
857
857
  continue;
858
+ } else {
859
+ e.position = o;
860
+ e.line = s;
861
+ e.lineStart = c;
862
+ e.lineIndent = u;
863
+ break;
858
864
  }
859
- e.position = o;
860
- e.line = s;
861
- e.lineStart = c;
862
- e.lineIndent = u;
863
- break;
864
865
  }
865
866
  if (l) {
866
867
  captureSegment(e, a, o, false);
@@ -889,9 +890,11 @@
889
890
  captureSegment(e, i, e.position, true);
890
891
  r = e.input.charCodeAt(++e.position);
891
892
  if (39 !== r) return true;
892
- i = e.position;
893
- e.position++;
894
- n = e.position;
893
+ else {
894
+ i = e.position;
895
+ e.position++;
896
+ n = e.position;
897
+ }
895
898
  } else if (is_EOL(r)) {
896
899
  captureSegment(e, i, n, true);
897
900
  writeFoldedLines(e, skipSeparationSpace(e, false, t));
@@ -970,8 +973,7 @@
970
973
  e.kind = h ? "mapping" : "sequence";
971
974
  e.result = l;
972
975
  return true;
973
- }
974
- if (r) {
976
+ } else if (r) {
975
977
  if (44 === y) throwError(e, "expected the node content, but found ','");
976
978
  } else throwError(e, "missed comma between flow collection entries");
977
979
  v = g = w = null;
@@ -1403,7 +1405,7 @@
1403
1405
  return;
1404
1406
  }
1405
1407
  if (!(e.position < e.length - 1)) return;
1406
- throwError(e, "end of the stream or a document separator is expected");
1408
+ else throwError(e, "end of the stream or a document separator is expected");
1407
1409
  }
1408
1410
  function loadDocuments(e, t) {
1409
1411
  e = String(e);
@@ -1438,7 +1440,7 @@
1438
1440
  function load(e, t) {
1439
1441
  var r = loadDocuments(e, t);
1440
1442
  if (0 === r.length) return;
1441
- if (1 === r.length) return r[0];
1443
+ else if (1 === r.length) return r[0];
1442
1444
  throw new n("expected a single document in the stream, but found more");
1443
1445
  }
1444
1446
  e.exports.loadAll = loadAll;
@@ -1786,7 +1788,7 @@
1786
1788
  r = "-" === t[0] ? -1 : 1;
1787
1789
  if ("+-".indexOf(t[0]) >= 0) t = t.slice(1);
1788
1790
  if (".inf" === t) return 1 === r ? 1 / 0 : -1 / 0;
1789
- if (".nan" === t) return 0 / 0;
1791
+ else if (".nan" === t) return 0 / 0;
1790
1792
  return r * parseFloat(t, 10);
1791
1793
  }
1792
1794
  var o = /^[-+]?[0-9]+e/;
@@ -2030,7 +2032,7 @@
2030
2032
  else s = true;
2031
2033
  if (!s) return false;
2032
2034
  if (-1 !== t.indexOf(l)) return false;
2033
- t.push(l);
2035
+ else t.push(l);
2034
2036
  }
2035
2037
  return true;
2036
2038
  }
@@ -38,7 +38,7 @@ function isObject(e) {
38
38
  }
39
39
  function toArray(e) {
40
40
  if (Array.isArray(e)) return e;
41
- if (isNothing(e)) return [];
41
+ else if (isNothing(e)) return [];
42
42
  return [
43
43
  e
44
44
  ];
@@ -493,7 +493,7 @@ function constructYamlFloat(e) {
493
493
  r = "-" === t[0] ? -1 : 1;
494
494
  if ("+-".indexOf(t[0]) >= 0) t = t.slice(1);
495
495
  if (".inf" === t) return 1 === r ? 1 / 0 : -1 / 0;
496
- if (".nan" === t) return 0 / 0;
496
+ else if (".nan" === t) return 0 / 0;
497
497
  return r * parseFloat(t, 10);
498
498
  }
499
499
  var E = /^[-+]?[0-9]+e/;
@@ -686,7 +686,7 @@ function resolveYamlOmap(e) {
686
686
  else o = true;
687
687
  if (!o) return false;
688
688
  if (-1 !== t.indexOf(a)) return false;
689
- t.push(a);
689
+ else t.push(a);
690
690
  }
691
691
  return true;
692
692
  }
@@ -1023,12 +1023,13 @@ function readPlainScalar(e, t, r) {
1023
1023
  l = true;
1024
1024
  d = e.input.charCodeAt(e.position);
1025
1025
  continue;
1026
+ } else {
1027
+ e.position = o;
1028
+ e.line = s;
1029
+ e.lineStart = c;
1030
+ e.lineIndent = u;
1031
+ break;
1026
1032
  }
1027
- e.position = o;
1028
- e.line = s;
1029
- e.lineStart = c;
1030
- e.lineIndent = u;
1031
- break;
1032
1033
  }
1033
1034
  if (l) {
1034
1035
  captureSegment(e, a, o, false);
@@ -1057,9 +1058,11 @@ function readSingleQuotedScalar(e, t) {
1057
1058
  captureSegment(e, i, e.position, true);
1058
1059
  r = e.input.charCodeAt(++e.position);
1059
1060
  if (39 !== r) return true;
1060
- i = e.position;
1061
- e.position++;
1062
- n = e.position;
1061
+ else {
1062
+ i = e.position;
1063
+ e.position++;
1064
+ n = e.position;
1065
+ }
1063
1066
  } else if (is_EOL(r)) {
1064
1067
  captureSegment(e, i, n, true);
1065
1068
  writeFoldedLines(e, skipSeparationSpace(e, false, t));
@@ -1138,8 +1141,7 @@ function readFlowCollection(e, t) {
1138
1141
  e.kind = d ? "mapping" : "sequence";
1139
1142
  e.result = l;
1140
1143
  return true;
1141
- }
1142
- if (r) {
1144
+ } else if (r) {
1143
1145
  if (44 === w) throwError(e, "expected the node content, but found ','");
1144
1146
  } else throwError(e, "missed comma between flow collection entries");
1145
1147
  g = m = v = null;
@@ -1571,7 +1573,7 @@ function readDocument(e) {
1571
1573
  return;
1572
1574
  }
1573
1575
  if (!(e.position < e.length - 1)) return;
1574
- throwError(e, "end of the stream or a document separator is expected");
1576
+ else throwError(e, "end of the stream or a document separator is expected");
1575
1577
  }
1576
1578
  function loadDocuments(e, t) {
1577
1579
  e = String(e);
@@ -1606,7 +1608,7 @@ function loadAll$1(e, t, r) {
1606
1608
  function load$1(e, t) {
1607
1609
  var r = loadDocuments(e, t);
1608
1610
  if (0 === r.length) return;
1609
- if (1 === r.length) return r[0];
1611
+ else if (1 === r.length) return r[0];
1610
1612
  throw new c("expected a single document in the stream, but found more");
1611
1613
  }
1612
1614
  var ne = loadAll$1;
@@ -124,8 +124,7 @@
124
124
  setArg(b[g], f.slice(g + 2), f);
125
125
  _ = true;
126
126
  break;
127
- }
128
- setArg(b[g], r.strings[b[g]] ? "" : true, f);
127
+ } else setArg(b[g], r.strings[b[g]] ? "" : true, f);
129
128
  }
130
129
  var l = f.slice(-1)[0];
131
130
  if (!_ && "-" !== l) if (!e[a + 1] || /^(-|--)[^-]/.test(e[a + 1]) || r.bools[l] || (n[l] ? aliasIsBoolean(l) : false)) if (e[a + 1] && /^(true|false)$/.test(e[a + 1])) {
@@ -145,7 +145,7 @@
145
145
  t = void 0;
146
146
  }
147
147
  if ("function" == typeof e || Array.isArray(e)) throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');
148
- if ("number" == typeof e) e = i.from([
148
+ else if ("number" == typeof e) e = i.from([
149
149
  e
150
150
  ]);
151
151
  else if ("string" == typeof e) e = i.from(e, r);
@@ -797,7 +797,7 @@
797
797
  if (!i) i = Error;
798
798
  function getMessage(e, t, i) {
799
799
  if ("string" == typeof r) return r;
800
- return r(e, t, i);
800
+ else return r(e, t, i);
801
801
  }
802
802
  class NodeError extends i {
803
803
  constructor(e, t, r){
@@ -810,12 +810,12 @@
810
810
  }
811
811
  function oneOf(e, t) {
812
812
  if (!Array.isArray(e)) return `of ${t} ${String(e)}`;
813
- {
813
+ else {
814
814
  const r = e.length;
815
815
  e = e.map((e)=>String(e));
816
816
  if (r > 2) return `one of ${t} ${e.slice(0, r - 1).join(", ")}, or ` + e[r - 1];
817
- if (2 === r) return `one of ${t} ${e[0]} or ${e[1]}`;
818
- return `of ${t} ${e[0]}`;
817
+ else if (2 === r) return `one of ${t} ${e[0]} or ${e[1]}`;
818
+ else return `of ${t} ${e[0]}`;
819
819
  }
820
820
  }
821
821
  function startsWith(e, t, r) {
@@ -828,7 +828,7 @@
828
828
  function includes(e, t, r) {
829
829
  if ("number" != typeof r) r = 0;
830
830
  if (r + t.length > e.length) return false;
831
- return -1 !== e.indexOf(t, r);
831
+ else return -1 !== e.indexOf(t, r);
832
832
  }
833
833
  createErrorType("ERR_INVALID_OPT_VALUE", function(e, t) {
834
834
  return 'The value "' + t + '" is invalid for option "' + e + '"';
@@ -1514,7 +1514,7 @@
1514
1514
  u("wrapped data");
1515
1515
  if (r.decoder) n = r.decoder.write(n);
1516
1516
  if (r.objectMode && null == n) return;
1517
- if (!r.objectMode && (!n || !n.length)) return;
1517
+ else if (!r.objectMode && (!n || !n.length)) return;
1518
1518
  var s = t.push(n);
1519
1519
  if (!s) {
1520
1520
  i = true;
@@ -3005,11 +3005,13 @@
3005
3005
  var g = i.emit;
3006
3006
  var y = function(e, t) {
3007
3007
  if (!("exit" === e && processOk(global.process))) return g.apply(this, arguments);
3008
- if (void 0 !== t) i.exitCode = t;
3009
- var r = g.apply(this, arguments);
3010
- u("exit", i.exitCode, null);
3011
- u("afterexit", i.exitCode, null);
3012
- return r;
3008
+ else {
3009
+ if (void 0 !== t) i.exitCode = t;
3010
+ var r = g.apply(this, arguments);
3011
+ u("exit", i.exitCode, null);
3012
+ u("afterexit", i.exitCode, null);
3013
+ return r;
3014
+ }
3013
3015
  };
3014
3016
  } else e.exports = function() {
3015
3017
  return function() {};
@@ -3131,9 +3133,9 @@
3131
3133
  };
3132
3134
  function utf8CheckByte(e) {
3133
3135
  if (e <= 127) return 0;
3134
- if (e >> 5 === 6) return 2;
3135
- if (e >> 4 === 14) return 3;
3136
- if (e >> 3 === 30) return 4;
3136
+ else if (e >> 5 === 6) return 2;
3137
+ else if (e >> 4 === 14) return 3;
3138
+ else if (e >> 3 === 30) return 4;
3137
3139
  return e >> 6 === 2 ? -1 : -2;
3138
3140
  }
3139
3141
  function utf8CheckIncomplete(e, t, r) {
@@ -247,7 +247,7 @@
247
247
  }
248
248
  constructor(e, t){
249
249
  t = n(t);
250
- if (e instanceof Comparator) if (!!t.loose === e.loose) return e;
250
+ if (e instanceof Comparator) if (e.loose === !!t.loose) return e;
251
251
  else e = e.value;
252
252
  e = e.trim().split(/\s+/).join(" ");
253
253
  a("comparator", e, t);
@@ -285,8 +285,7 @@
285
285
  if ("" === this.operator) {
286
286
  if ("" === this.value) return true;
287
287
  return new c(e.value, t).test(this.value);
288
- }
289
- if ("" === e.operator) {
288
+ } else if ("" === e.operator) {
290
289
  if ("" === e.value) return true;
291
290
  return new c(this.value, t).test(e.semver);
292
291
  }
@@ -313,7 +312,7 @@
313
312
  class Range {
314
313
  constructor(e, t){
315
314
  t = i(t);
316
- if (e instanceof Range) if (!!t.loose === e.loose && !!t.includePrerelease === e.includePrerelease) return e;
315
+ if (e instanceof Range) if (e.loose === !!t.loose && e.includePrerelease === !!t.includePrerelease) return e;
317
316
  else return new Range(e.raw, t);
318
317
  if (e instanceof o) {
319
318
  this.raw = e.value;
@@ -562,7 +561,7 @@
562
561
  class SemVer {
563
562
  constructor(e, t){
564
563
  t = a(t);
565
- if (e instanceof SemVer) if (!!t.loose === e.loose && !!t.includePrerelease === e.includePrerelease) return e;
564
+ if (e instanceof SemVer) if (e.loose === !!t.loose && e.includePrerelease === !!t.includePrerelease) return e;
566
565
  else e = e.version;
567
566
  else if ("string" != typeof e) throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);
568
567
  if (e.length > n) throw new TypeError(`version is longer than ${n} characters`);
@@ -614,16 +613,16 @@
614
613
  comparePre(e) {
615
614
  if (!(e instanceof SemVer)) e = new SemVer(e, this.options);
616
615
  if (this.prerelease.length && !e.prerelease.length) return -1;
617
- if (!this.prerelease.length && e.prerelease.length) return 1;
618
- if (!this.prerelease.length && !e.prerelease.length) return 0;
616
+ else if (!this.prerelease.length && e.prerelease.length) return 1;
617
+ else if (!this.prerelease.length && !e.prerelease.length) return 0;
619
618
  let t = 0;
620
619
  do {
621
620
  const r = this.prerelease[t];
622
621
  const n = e.prerelease[t];
623
622
  s("prerelease compare", t, r, n);
624
623
  if (void 0 === r && void 0 === n) return 0;
625
- if (void 0 === n) return 1;
626
- if (void 0 === r) return -1;
624
+ else if (void 0 === n) return 1;
625
+ else if (void 0 === r) return -1;
627
626
  else if (r === n) continue;
628
627
  else return h(r, n);
629
628
  }while (++t);
@@ -636,8 +635,8 @@
636
635
  const n = e.build[t];
637
636
  s("prerelease compare", t, r, n);
638
637
  if (void 0 === r && void 0 === n) return 0;
639
- if (void 0 === n) return 1;
640
- if (void 0 === r) return -1;
638
+ else if (void 0 === n) return 1;
639
+ else if (void 0 === r) return -1;
641
640
  else if (r === n) continue;
642
641
  else return h(r, n);
643
642
  }while (++t);
@@ -1344,7 +1343,7 @@
1344
1343
  });
1345
1344
  if (o.operator === v || o.operator === $) return false;
1346
1345
  if ((!l.operator || l.operator === v) && E(e, l.semver)) return false;
1347
- if (l.operator === $ && m(e, l.semver)) return false;
1346
+ else if (l.operator === $ && m(e, l.semver)) return false;
1348
1347
  }
1349
1348
  return true;
1350
1349
  };
@@ -1430,7 +1429,7 @@
1430
1429
  if (n && c) {
1431
1430
  u = l(n.semver, c.semver, r);
1432
1431
  if (u > 0) return null;
1433
- if (0 === u && (">=" !== n.operator || "<=" !== c.operator)) return null;
1432
+ else if (0 === u && (">=" !== n.operator || "<=" !== c.operator)) return null;
1434
1433
  }
1435
1434
  for (const e of s){
1436
1435
  if (n && !o(e, String(n), r)) return null;
@@ -257,7 +257,7 @@
257
257
  cwd: r
258
258
  });
259
259
  if (e) return n.join(r, e);
260
- if (r === s) return null;
260
+ else if (r === s) return null;
261
261
  r = n.dirname(r);
262
262
  }
263
263
  };
@@ -535,7 +535,7 @@
535
535
  });
536
536
  function ReadStream(e, t) {
537
537
  if (this instanceof ReadStream) return f.apply(this, arguments), this;
538
- return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
538
+ else return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
539
539
  }
540
540
  function ReadStream$open() {
541
541
  var e = this;
@@ -552,7 +552,7 @@
552
552
  }
553
553
  function WriteStream(e, t) {
554
554
  if (this instanceof WriteStream) return u.apply(this, arguments), this;
555
- return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
555
+ else return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
556
556
  }
557
557
  function WriteStream$open() {
558
558
  var e = this;
@@ -28,11 +28,11 @@
28
28
  t = 1 <= arguments.length ? x.call(arguments, 0) : [];
29
29
  t = t.map(function(e) {
30
30
  if (f(e)) return p(e);
31
- return e;
31
+ else return e;
32
32
  });
33
33
  r = o[e].apply(o, t);
34
34
  if (f(r)) return p(r);
35
- return r;
35
+ else return r;
36
36
  };
37
37
  }(c);
38
38
  else _[c] = h;
@@ -52,7 +52,7 @@
52
52
  normalizeTrim: function(e) {
53
53
  e = _.normalizeSafe(e);
54
54
  if (e.endsWith("/")) return e.slice(0, +(e.length - 2) + 1 || 9e9);
55
- return e;
55
+ else return e;
56
56
  },
57
57
  joinSafe: function() {
58
58
  var e, t, r;
@@ -68,21 +68,25 @@
68
68
  },
69
69
  addExt: function(e, t) {
70
70
  if (!t) return e;
71
- if ("." !== t[0]) t = "." + t;
72
- return e + (e.endsWith(t) ? "" : t);
71
+ else {
72
+ if ("." !== t[0]) t = "." + t;
73
+ return e + (e.endsWith(t) ? "" : t);
74
+ }
73
75
  },
74
76
  trimExt: function(e, t, r) {
75
77
  var n;
76
78
  if (null == r) r = 7;
77
79
  n = _.extname(e);
78
80
  if (l(n, t, r)) return e.slice(0, +(e.length - n.length - 1) + 1 || 9e9);
79
- return e;
81
+ else return e;
80
82
  },
81
83
  removeExt: function(e, t) {
82
84
  if (!t) return e;
83
- t = "." === t[0] ? t : "." + t;
84
- if (_.extname(e) === t) return _.trimExt(e, [], t.length);
85
- return e;
85
+ else {
86
+ t = "." === t[0] ? t : "." + t;
87
+ if (_.extname(e) === t) return _.trimExt(e, [], t.length);
88
+ else return e;
89
+ }
86
90
  },
87
91
  changeExt: function(e, t, r, n) {
88
92
  if (null == n) n = 7;
@@ -93,7 +97,7 @@
93
97
  if (null == n) n = 7;
94
98
  i = _.extname(e);
95
99
  if (l(i, r, n)) return e;
96
- return _.addExt(e, t);
100
+ else return _.addExt(e, t);
97
101
  }
98
102
  };
99
103
  l = function(e, t, r) {
@@ -105,7 +109,7 @@
105
109
  for(s in u)if (m.call(u, s)) {
106
110
  i = u[s];
107
111
  if (void 0 !== _[s]) throw new Error("path." + s + " already exists.");
108
- _[s] = i;
112
+ else _[s] = i;
109
113
  }
110
114
  },
111
115
  17: (e)=>{
@@ -55,9 +55,11 @@
55
55
  };
56
56
  var o = n === i;
57
57
  if (!o) return cloneIfNecessary(t, s);
58
- if (!n) return mergeObject(e, t, s);
59
- var u = r.arrayMerge || defaultArrayMerge;
60
- return u(e, t, s);
58
+ else {
59
+ if (!n) return mergeObject(e, t, s);
60
+ var u = r.arrayMerge || defaultArrayMerge;
61
+ return u(e, t, s);
62
+ }
61
63
  }
62
64
  deepmerge.all = function(e, t) {
63
65
  if (!Array.isArray(e) || e.length < 2) throw new Error("first argument should be an array with at least two elements");
@@ -3,7 +3,7 @@ import { logger } from "./logger.mjs";
3
3
  function applyOptionsChain(defaults, options, utils, mergeFn = Object.assign) {
4
4
  if (!options) return defaults;
5
5
  if (isPlainObject(options)) return mergeFn(defaults, options);
6
- if (isFunction(options)) {
6
+ else if (isFunction(options)) {
7
7
  const ret = options(defaults, utils);
8
8
  if (ret) {
9
9
  if (!isPlainObject(ret)) logger.warn(`${options.name}: Function should mutate the config and return nothing, Or return a cloned or merged version of config object.`);
@@ -1,7 +1,7 @@
1
1
  import { isPlainObject } from "../is/index.mjs";
2
2
  const getEntryOptions = (name, isMainEntry, baseOptions, optionsByEntries, packageName)=>{
3
3
  if (!optionsByEntries) return baseOptions;
4
- {
4
+ else {
5
5
  let optionsByEntry = getOptionsByEntryName(name, optionsByEntries);
6
6
  if (void 0 === optionsByEntry && isMainEntry && packageName) optionsByEntry = getOptionsByEntryName(packageName, optionsByEntries);
7
7
  return void 0 !== optionsByEntry ? isPlainObject(optionsByEntry) && isPlainObject(baseOptions) ? {
@@ -36,7 +36,7 @@ function getInternalPlugins(appDirectory, internalPlugins = {}) {
36
36
  }).map((name)=>{
37
37
  const config = internalPlugins[name];
38
38
  if ('string' != typeof config) return config.path;
39
- return config;
39
+ else return config;
40
40
  })
41
41
  ];
42
42
  }
@@ -5,7 +5,7 @@ import { findExists } from "./fs.mjs";
5
5
  async function importPath(path, options) {
6
6
  const modulePath = isAbsolute(path) ? pathToFileURL(path).href : path;
7
7
  if ('development' !== process.env.NODE_ENV) return await import(modulePath, options);
8
- {
8
+ else {
9
9
  const timestamp = Date.now();
10
10
  return await import(`${modulePath}?t=${timestamp}`, options);
11
11
  }
@@ -1,6 +1,6 @@
1
1
  import { createRequire } from "node:module";
2
2
  import { Import } from "./import.mjs";
3
- import { __webpack_require__ } from "./rslib-runtime.mjs";
3
+ import { __webpack_require__ } from "./rslib-runtime~1.mjs";
4
4
  import signale from "../compiled/signale/index.js";
5
5
  const { Signale: Signale } = signale;
6
6
  const getNodeRequire = ()=>{
@@ -4,7 +4,7 @@ import { logger } from "./logger.mjs";
4
4
  function applyOptionsChain(defaults, options, utils, mergeFn = Object.assign) {
5
5
  if (!options) return defaults;
6
6
  if (isPlainObject(options)) return mergeFn(defaults, options);
7
- if (isFunction(options)) {
7
+ else if (isFunction(options)) {
8
8
  const ret = options(defaults, utils);
9
9
  if (ret) {
10
10
  if (!isPlainObject(ret)) logger.warn(`${options.name}: Function should mutate the config and return nothing, Or return a cloned or merged version of config object.`);