@modern-js/upgrade-generator 3.1.38 → 3.2.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.
Files changed (2) hide show
  1. package/dist/index.js +71 -55
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -100501,7 +100501,7 @@ var require_js_yaml2 = __commonJS({
100501
100501
  var require_debug2 = __commonJS({
100502
100502
  "../../../toolkit/utils/dist/compiled/debug/index.js"(exports, module2) {
100503
100503
  (() => {
100504
- var e = { 20: (e2, t2, r2) => {
100504
+ var e = { 434: (e2, t2, r2) => {
100505
100505
  t2.formatArgs = formatArgs;
100506
100506
  t2.save = save;
100507
100507
  t2.load = load;
@@ -100575,7 +100575,7 @@ var require_debug2 = __commonJS({
100575
100575
  } catch (e3) {
100576
100576
  }
100577
100577
  }
100578
- e2.exports = r2(530)(t2);
100578
+ e2.exports = r2(290)(t2);
100579
100579
  const { formatters: s } = e2.exports;
100580
100580
  s.j = function(e3) {
100581
100581
  try {
@@ -100584,7 +100584,7 @@ var require_debug2 = __commonJS({
100584
100584
  return "[UnexpectedJSONParseError]: " + e4.message;
100585
100585
  }
100586
100586
  };
100587
- }, 530: (e2, t2, r2) => {
100587
+ }, 290: (e2, t2, r2) => {
100588
100588
  function setup(e3) {
100589
100589
  createDebug.debug = createDebug;
100590
100590
  createDebug.default = createDebug;
@@ -100734,13 +100734,13 @@ var require_debug2 = __commonJS({
100734
100734
  return createDebug;
100735
100735
  }
100736
100736
  e2.exports = setup;
100737
- }, 731: (e2, t2, r2) => {
100737
+ }, 372: (e2, t2, r2) => {
100738
100738
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
100739
- e2.exports = r2(20);
100739
+ e2.exports = r2(434);
100740
100740
  } else {
100741
- e2.exports = r2(689);
100741
+ e2.exports = r2(970);
100742
100742
  }
100743
- }, 689: (e2, t2, r2) => {
100743
+ }, 970: (e2, t2, r2) => {
100744
100744
  const s = r2(224);
100745
100745
  const n = r2(837);
100746
100746
  t2.init = init;
@@ -100753,7 +100753,7 @@ var require_debug2 = __commonJS({
100753
100753
  }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
100754
100754
  t2.colors = [6, 2, 3, 4, 5, 1];
100755
100755
  try {
100756
- const e3 = r2(242);
100756
+ const e3 = r2(332);
100757
100757
  if (e3 && (e3.stderr || e3).level >= 2) {
100758
100758
  t2.colors = [20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68, 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134, 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 214, 215, 220, 221];
100759
100759
  }
@@ -100815,7 +100815,7 @@ var require_debug2 = __commonJS({
100815
100815
  e3.inspectOpts[r3[s2]] = t2.inspectOpts[r3[s2]];
100816
100816
  }
100817
100817
  }
100818
- e2.exports = r2(530)(t2);
100818
+ e2.exports = r2(290)(t2);
100819
100819
  const { formatters: o } = e2.exports;
100820
100820
  o.o = function(e3) {
100821
100821
  this.inspectOpts.colors = this.useColors;
@@ -100825,13 +100825,14 @@ var require_debug2 = __commonJS({
100825
100825
  this.inspectOpts.colors = this.useColors;
100826
100826
  return n.inspect(e3, this.inspectOpts);
100827
100827
  };
100828
- }, 975: (e2) => {
100828
+ }, 419: (e2) => {
100829
100829
  "use strict";
100830
- e2.exports = (e3, t2 = process.argv) => {
100830
+ e2.exports = (e3, t2) => {
100831
+ t2 = t2 || process.argv;
100831
100832
  const r2 = e3.startsWith("-") ? "" : e3.length === 1 ? "-" : "--";
100832
100833
  const s = t2.indexOf(r2 + e3);
100833
100834
  const n = t2.indexOf("--");
100834
- return s !== -1 && (n === -1 || s < n);
100835
+ return s !== -1 && (n === -1 ? true : s < n);
100835
100836
  };
100836
100837
  }, 367: (e2) => {
100837
100838
  var t2 = 1e3;
@@ -100940,26 +100941,19 @@ var require_debug2 = __commonJS({
100940
100941
  var n2 = t3 >= r3 * 1.5;
100941
100942
  return Math.round(e3 / r3) + " " + s2 + (n2 ? "s" : "");
100942
100943
  }
100943
- }, 242: (e2, t2, r2) => {
100944
+ }, 332: (e2, t2, r2) => {
100944
100945
  "use strict";
100945
100946
  const s = r2(37);
100946
- const n = r2(224);
100947
- const o = r2(975);
100948
- const { env: a } = process;
100949
- let c;
100950
- if (o("no-color") || o("no-colors") || o("color=false") || o("color=never")) {
100951
- c = 0;
100952
- } else if (o("color") || o("colors") || o("color=true") || o("color=always")) {
100953
- c = 1;
100947
+ const n = r2(419);
100948
+ const o = process.env;
100949
+ let a;
100950
+ if (n("no-color") || n("no-colors") || n("color=false")) {
100951
+ a = false;
100952
+ } else if (n("color") || n("colors") || n("color=true") || n("color=always")) {
100953
+ a = true;
100954
100954
  }
100955
- if ("FORCE_COLOR" in a) {
100956
- if (a.FORCE_COLOR === "true") {
100957
- c = 1;
100958
- } else if (a.FORCE_COLOR === "false") {
100959
- c = 0;
100960
- } else {
100961
- c = a.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(a.FORCE_COLOR, 10), 3);
100962
- }
100955
+ if ("FORCE_COLOR" in o) {
100956
+ a = o.FORCE_COLOR.length === 0 || parseInt(o.FORCE_COLOR, 10) !== 0;
100963
100957
  }
100964
100958
  function translateLevel(e3) {
100965
100959
  if (e3 === 0) {
@@ -100967,67 +100961,67 @@ var require_debug2 = __commonJS({
100967
100961
  }
100968
100962
  return { level: e3, hasBasic: true, has256: e3 >= 2, has16m: e3 >= 3 };
100969
100963
  }
100970
- function supportsColor(e3, t3) {
100971
- if (c === 0) {
100964
+ function supportsColor(e3) {
100965
+ if (a === false) {
100972
100966
  return 0;
100973
100967
  }
100974
- if (o("color=16m") || o("color=full") || o("color=truecolor")) {
100968
+ if (n("color=16m") || n("color=full") || n("color=truecolor")) {
100975
100969
  return 3;
100976
100970
  }
100977
- if (o("color=256")) {
100971
+ if (n("color=256")) {
100978
100972
  return 2;
100979
100973
  }
100980
- if (e3 && !t3 && c === void 0) {
100974
+ if (e3 && !e3.isTTY && a !== true) {
100981
100975
  return 0;
100982
100976
  }
100983
- const r3 = c || 0;
100984
- if (a.TERM === "dumb") {
100985
- return r3;
100986
- }
100977
+ const t3 = a ? 1 : 0;
100987
100978
  if (process.platform === "win32") {
100988
100979
  const e4 = s.release().split(".");
100989
- if (Number(e4[0]) >= 10 && Number(e4[2]) >= 10586) {
100980
+ if (Number(process.versions.node.split(".")[0]) >= 8 && Number(e4[0]) >= 10 && Number(e4[2]) >= 10586) {
100990
100981
  return Number(e4[2]) >= 14931 ? 3 : 2;
100991
100982
  }
100992
100983
  return 1;
100993
100984
  }
100994
- if ("CI" in a) {
100995
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((e4) => e4 in a) || a.CI_NAME === "codeship") {
100985
+ if ("CI" in o) {
100986
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((e4) => e4 in o) || o.CI_NAME === "codeship") {
100996
100987
  return 1;
100997
100988
  }
100998
- return r3;
100989
+ return t3;
100999
100990
  }
101000
- if ("TEAMCITY_VERSION" in a) {
101001
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION) ? 1 : 0;
100991
+ if ("TEAMCITY_VERSION" in o) {
100992
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(o.TEAMCITY_VERSION) ? 1 : 0;
101002
100993
  }
101003
- if (a.COLORTERM === "truecolor") {
100994
+ if (o.COLORTERM === "truecolor") {
101004
100995
  return 3;
101005
100996
  }
101006
- if ("TERM_PROGRAM" in a) {
101007
- const e4 = parseInt((a.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
101008
- switch (a.TERM_PROGRAM) {
100997
+ if ("TERM_PROGRAM" in o) {
100998
+ const e4 = parseInt((o.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
100999
+ switch (o.TERM_PROGRAM) {
101009
101000
  case "iTerm.app":
101010
101001
  return e4 >= 3 ? 3 : 2;
101011
101002
  case "Apple_Terminal":
101012
101003
  return 2;
101013
101004
  }
101014
101005
  }
101015
- if (/-256(color)?$/i.test(a.TERM)) {
101006
+ if (/-256(color)?$/i.test(o.TERM)) {
101016
101007
  return 2;
101017
101008
  }
101018
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)) {
101009
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(o.TERM)) {
101019
101010
  return 1;
101020
101011
  }
101021
- if ("COLORTERM" in a) {
101012
+ if ("COLORTERM" in o) {
101022
101013
  return 1;
101023
101014
  }
101024
- return r3;
101015
+ if (o.TERM === "dumb") {
101016
+ return t3;
101017
+ }
101018
+ return t3;
101025
101019
  }
101026
101020
  function getSupportLevel(e3) {
101027
- const t3 = supportsColor(e3, e3 && e3.isTTY);
101021
+ const t3 = supportsColor(e3);
101028
101022
  return translateLevel(t3);
101029
101023
  }
101030
- e2.exports = { supportsColor: getSupportLevel, stdout: translateLevel(supportsColor(true, n.isatty(1))), stderr: translateLevel(supportsColor(true, n.isatty(2))) };
101024
+ e2.exports = { supportsColor: getSupportLevel, stdout: getSupportLevel(process.stdout), stderr: getSupportLevel(process.stderr) };
101031
101025
  }, 37: (e2) => {
101032
101026
  "use strict";
101033
101027
  e2.exports = require("os");
@@ -101057,7 +101051,7 @@ var require_debug2 = __commonJS({
101057
101051
  }
101058
101052
  if (typeof __nccwpck_require__ !== "undefined")
101059
101053
  __nccwpck_require__.ab = __dirname + "/";
101060
- var r = __nccwpck_require__(731);
101054
+ var r = __nccwpck_require__(372);
101061
101055
  module2.exports = r;
101062
101056
  })();
101063
101057
  }
@@ -118895,6 +118889,27 @@ var require_watch2 = __commonJS({
118895
118889
  }
118896
118890
  });
118897
118891
 
118892
+ // ../../../toolkit/utils/dist/cjs/cli/config.js
118893
+ var require_config6 = __commonJS({
118894
+ "../../../toolkit/utils/dist/cjs/cli/config.js"(exports) {
118895
+ "use strict";
118896
+ Object.defineProperty(exports, "__esModule", {
118897
+ value: true
118898
+ });
118899
+ Object.defineProperty(exports, "isOverriddenConfigKey", {
118900
+ enumerable: true,
118901
+ get: function() {
118902
+ return isOverriddenConfigKey;
118903
+ }
118904
+ });
118905
+ var isOverriddenConfigKey = (key) => [
118906
+ "removeConsole",
118907
+ "enableInlineScripts",
118908
+ "enableInlineStyles"
118909
+ ].includes(key);
118910
+ }
118911
+ });
118912
+
118898
118913
  // ../../../toolkit/utils/dist/cjs/cli/index.js
118899
118914
  var require_cli2 = __commonJS({
118900
118915
  "../../../toolkit/utils/dist/cjs/cli/index.js"(exports) {
@@ -118922,6 +118937,7 @@ var require_cli2 = __commonJS({
118922
118937
  _export_star._(require_require2(), exports);
118923
118938
  _export_star._(require_runtimeExports2(), exports);
118924
118939
  _export_star._(require_watch2(), exports);
118940
+ _export_star._(require_config6(), exports);
118925
118941
  }
118926
118942
  });
118927
118943
 
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "3.1.38",
18
+ "version": "3.2.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "main": "./dist/index.js",
21
21
  "files": [
@@ -30,11 +30,11 @@
30
30
  "@types/node": "^14",
31
31
  "jest": "^29",
32
32
  "typescript": "^5",
33
- "@scripts/build": "2.33.0",
34
- "@scripts/jest-config": "2.33.0",
35
- "@modern-js/generator-utils": "3.1.38",
36
- "@modern-js/plugin-i18n": "2.33.0",
37
- "@modern-js/generator-common": "3.1.38"
33
+ "@modern-js/generator-utils": "3.2.0",
34
+ "@scripts/jest-config": "2.34.0",
35
+ "@modern-js/plugin-i18n": "2.34.0",
36
+ "@scripts/build": "2.34.0",
37
+ "@modern-js/generator-common": "3.2.0"
38
38
  },
39
39
  "sideEffects": false,
40
40
  "publishConfig": {