@modern-js/monorepo-tools 2.0.1 → 2.1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @modern-js/monorepo-tools
2
2
 
3
+ ## 2.1.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 2ad9642: feat: new command support --lang params
8
+
9
+ feat: new 命令支持 --lang 参数
10
+
11
+ - 6562578: chore: optimize the capitalization of plugin names
12
+
13
+ chore: 规范引用插件时的命名格式,统一使用 camelCase 代替 PascalCase
14
+
15
+ - Updated dependencies [837620c]
16
+ - Updated dependencies [bafa52e]
17
+ - Updated dependencies [8a9482c]
18
+ - @modern-js/utils@2.1.0
19
+ - @modern-js/core@2.1.0
20
+ - @modern-js/plugin-changeset@2.1.0
21
+ - @modern-js/plugin-i18n@2.1.0
22
+ - @modern-js/plugin-lint@2.1.0
23
+ - @modern-js/new-action@2.1.0
24
+ - @modern-js/upgrade@2.1.0
25
+ - @modern-js/plugin@2.1.0
26
+
27
+ ## 2.0.2
28
+
29
+ ### Patch Changes
30
+
31
+ - @modern-js/new-action@2.0.2
32
+ - @modern-js/core@2.0.2
33
+ - @modern-js/utils@2.0.2
34
+ - @modern-js/plugin-changeset@2.0.2
35
+ - @modern-js/plugin-i18n@2.0.2
36
+ - @modern-js/plugin-lint@2.0.2
37
+ - @modern-js/plugin@2.0.2
38
+ - @modern-js/upgrade@2.0.2
39
+
3
40
  ## 2.0.1
4
41
 
5
42
  ### Patch Changes
@@ -48,8 +48,8 @@ const newCli = (program, locale) => {
48
48
  return memo;
49
49
  },
50
50
  []
51
- ).option("--dist-tag <tag>", i18n.t(localeKeys.command.new.distTag)).option("--registry", i18n.t(localeKeys.command.new.registry)).action((options) => __async(void 0, null, function* () {
52
- yield MonorepoNewAction(__spreadProps(__spreadValues({}, options), { locale }));
51
+ ).option("--lang <lang>", i18n.t(localeKeys.command.new.lang)).option("--dist-tag <tag>", i18n.t(localeKeys.command.new.distTag)).option("--registry", i18n.t(localeKeys.command.new.registry)).action((options) => __async(void 0, null, function* () {
52
+ yield MonorepoNewAction(__spreadProps(__spreadValues({}, options), { locale: options.lang || locale }));
53
53
  }));
54
54
  };
55
55
  export {
@@ -1,5 +1,5 @@
1
- import ChangesetPlugin from "@modern-js/plugin-changeset";
2
- import LintPlugin from "@modern-js/plugin-lint";
1
+ import changesetPlugin from "@modern-js/plugin-changeset";
2
+ import lintPlugin from "@modern-js/plugin-lint";
3
3
  import { Import } from "@modern-js/utils";
4
4
  import { i18n } from "./locale";
5
5
  import { newCli, deployCli, clearCli } from "./cli";
@@ -11,7 +11,7 @@ const upgradeModel = Import.lazy(
11
11
  );
12
12
  var src_default = () => ({
13
13
  name: "@modern-js/monorepo-tools",
14
- usePlugins: [ChangesetPlugin(), LintPlugin()],
14
+ usePlugins: [changesetPlugin(), lintPlugin()],
15
15
  registerHook: hooks,
16
16
  setup: (api) => {
17
17
  const locale = getLocaleLanguage();
@@ -6,7 +6,8 @@ const EN_LOCALE = {
6
6
  config: "set default generator config(json string)",
7
7
  plugin: "use generator plugin to create new sub-solution project or customize Modern.js sub-solution project",
8
8
  distTag: `use specified tag version for it's generator`,
9
- registry: "set npm registry url to run npm command"
9
+ registry: "set npm registry url to run npm command",
10
+ lang: "set new command language(en or zh)"
10
11
  }
11
12
  }
12
13
  };
@@ -6,7 +6,8 @@ const ZH_LOCALE = {
6
6
  config: "生成器运行默认配置(JSON 字符串)",
7
7
  plugin: "使用生成器插件创建新的工程方案子项目或定制化 Modern.js 工程方案子项目",
8
8
  distTag: "生成器使用特殊的 npm Tag 版本",
9
- registry: "生成器运行过程中定制 npm Registry"
9
+ registry: "生成器运行过程中定制 npm Registry",
10
+ lang: "设置 new 命令执行语言(zh 或者 en)"
10
11
  }
11
12
  }
12
13
  };
@@ -68,8 +68,8 @@ const newCli = (program, locale) => {
68
68
  return memo;
69
69
  },
70
70
  []
71
- ).option("--dist-tag <tag>", import_locale.i18n.t(import_locale.localeKeys.command.new.distTag)).option("--registry", import_locale.i18n.t(import_locale.localeKeys.command.new.registry)).action((options) => __async(void 0, null, function* () {
72
- yield (0, import_new_action.MonorepoNewAction)(__spreadProps(__spreadValues({}, options), { locale }));
71
+ ).option("--lang <lang>", import_locale.i18n.t(import_locale.localeKeys.command.new.lang)).option("--dist-tag <tag>", import_locale.i18n.t(import_locale.localeKeys.command.new.distTag)).option("--registry", import_locale.i18n.t(import_locale.localeKeys.command.new.registry)).action((options) => __async(void 0, null, function* () {
72
+ yield (0, import_new_action.MonorepoNewAction)(__spreadProps(__spreadValues({}, options), { locale: options.lang || locale }));
73
73
  }));
74
74
  };
75
75
  // Annotate the CommonJS export names for ESM import in node:
@@ -28,7 +28,8 @@ const EN_LOCALE = {
28
28
  config: "set default generator config(json string)",
29
29
  plugin: "use generator plugin to create new sub-solution project or customize Modern.js sub-solution project",
30
30
  distTag: `use specified tag version for it's generator`,
31
- registry: "set npm registry url to run npm command"
31
+ registry: "set npm registry url to run npm command",
32
+ lang: "set new command language(en or zh)"
32
33
  }
33
34
  }
34
35
  };
@@ -28,7 +28,8 @@ const ZH_LOCALE = {
28
28
  config: "生成器运行默认配置(JSON 字符串)",
29
29
  plugin: "使用生成器插件创建新的工程方案子项目或定制化 Modern.js 工程方案子项目",
30
30
  distTag: "生成器使用特殊的 npm Tag 版本",
31
- registry: "生成器运行过程中定制 npm Registry"
31
+ registry: "生成器运行过程中定制 npm Registry",
32
+ lang: "设置 new 命令执行语言(zh 或者 en)"
32
33
  }
33
34
  }
34
35
  };
@@ -7,6 +7,7 @@ export declare const EN_LOCALE: {
7
7
  plugin: string;
8
8
  distTag: string;
9
9
  registry: string;
10
+ lang: string;
10
11
  };
11
12
  };
12
13
  };
@@ -9,6 +9,7 @@ declare const localeKeys: {
9
9
  plugin: string;
10
10
  distTag: string;
11
11
  registry: string;
12
+ lang: string;
12
13
  };
13
14
  };
14
15
  } | {
@@ -20,6 +21,7 @@ declare const localeKeys: {
20
21
  plugin: string;
21
22
  distTag: string;
22
23
  registry: string;
24
+ lang: string;
23
25
  };
24
26
  };
25
27
  };
@@ -7,6 +7,7 @@ export declare const ZH_LOCALE: {
7
7
  plugin: string;
8
8
  distTag: string;
9
9
  registry: string;
10
+ lang: string;
10
11
  };
11
12
  };
12
13
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.1",
14
+ "version": "2.1.0",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -39,14 +39,14 @@
39
39
  "anymatch": "^3.1.2",
40
40
  "md5": "^2.3.0",
41
41
  "p-map": "^4.0.0",
42
- "@modern-js/core": "2.0.1",
43
- "@modern-js/new-action": "2.0.1",
44
- "@modern-js/upgrade": "2.0.1",
45
- "@modern-js/plugin": "2.0.1",
46
- "@modern-js/plugin-changeset": "2.0.1",
47
- "@modern-js/plugin-i18n": "2.0.1",
48
- "@modern-js/plugin-lint": "2.0.1",
49
- "@modern-js/utils": "2.0.1"
42
+ "@modern-js/core": "2.1.0",
43
+ "@modern-js/new-action": "2.1.0",
44
+ "@modern-js/upgrade": "2.1.0",
45
+ "@modern-js/plugin": "2.1.0",
46
+ "@modern-js/plugin-changeset": "2.1.0",
47
+ "@modern-js/plugin-i18n": "2.1.0",
48
+ "@modern-js/plugin-lint": "2.1.0",
49
+ "@modern-js/utils": "2.1.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/jest": "^27",
@@ -54,8 +54,8 @@
54
54
  "@types/node": "^14",
55
55
  "jest": "^27",
56
56
  "typescript": "^4",
57
- "@scripts/build": "2.0.1",
58
- "@scripts/jest-config": "2.0.1"
57
+ "@scripts/build": "2.1.0",
58
+ "@scripts/jest-config": "2.1.0"
59
59
  },
60
60
  "sideEffects": false,
61
61
  "publishConfig": {