@modern-js/upgrade 2.12.0 → 2.13.1

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 +4 -1
  2. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -45,6 +45,7 @@ __export(src_exports, {
45
45
  });
46
46
  module.exports = __toCommonJS(src_exports);
47
47
  var import_utils = require("@modern-js/utils");
48
+ var import_language_detector = require("@modern-js/plugin-i18n/language-detector");
48
49
 
49
50
  // src/upgrade.ts
50
51
  var import_codesmith = require("@modern-js/codesmith");
@@ -106,10 +107,12 @@ var EN_LOCALE = {
106
107
 
107
108
  // src/locale/index.ts
108
109
  var i18n = new import_plugin_i18n.I18n();
109
- var localeKeys = i18n.init("zh", { zh: ZH_LOCALE, en: EN_LOCALE });
110
+ var localeKeys = i18n.init("en", { zh: ZH_LOCALE, en: EN_LOCALE });
110
111
 
111
112
  // src/index.ts
112
113
  function defineCommand(program) {
114
+ const locale = (0, import_language_detector.getLocaleLanguage)();
115
+ i18n.changeLanguage({ locale });
113
116
  program.description(i18n.t(localeKeys.command.describe)).option("--dist-tag <distTag>", i18n.t(localeKeys.command.distTag), "").option("--registry <registry>", i18n.t(localeKeys.command.registry), "").option("-d,--debug", i18n.t(localeKeys.command.debug), false).option("--cwd <cwd>", i18n.t(localeKeys.command.cwd), "").action(upgradeAction);
114
117
  }
115
118
  function src_default() {
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.12.0",
14
+ "version": "2.13.1",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/index.d.ts",
17
17
  "main": "./dist/index.js",
@@ -33,9 +33,9 @@
33
33
  }
34
34
  },
35
35
  "dependencies": {
36
- "@modern-js/codesmith": "2.0.5",
37
- "@modern-js/plugin-i18n": "2.12.0",
38
- "@modern-js/utils": "2.12.0"
36
+ "@modern-js/codesmith": "2.1.0",
37
+ "@modern-js/plugin-i18n": "2.13.1",
38
+ "@modern-js/utils": "2.13.1"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@babel/runtime": "^7.18.0",
@@ -44,9 +44,9 @@
44
44
  "jest": "^29",
45
45
  "ts-node": "^10.1.0",
46
46
  "typescript": "^4",
47
- "@modern-js/upgrade-generator": "3.1.2",
48
- "@scripts/build": "2.12.0",
49
- "@scripts/jest-config": "2.12.0"
47
+ "@modern-js/upgrade-generator": "3.1.4",
48
+ "@scripts/build": "2.13.1",
49
+ "@scripts/jest-config": "2.13.1"
50
50
  },
51
51
  "sideEffects": false,
52
52
  "publishConfig": {