@modern-js/plugin-changeset 2.15.0 → 2.16.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/dist/esm/index.js CHANGED
@@ -2,54 +2,26 @@ import { getLocaleLanguage } from "@modern-js/plugin-i18n/language-detector";
2
2
  import { change, bump, pre, release, status, genReleaseNote } from "./commands";
3
3
  import { i18n, localeKeys } from "./locale";
4
4
  export * from "./commands";
5
- var src_default = () => ({
5
+ export default () => ({
6
6
  name: "@modern-js/plugin-changeset",
7
7
  setup: () => {
8
- i18n.changeLanguage({ locale: getLocaleLanguage() });
8
+ i18n.changeLanguage({
9
+ locale: getLocaleLanguage()
10
+ });
9
11
  return {
10
12
  commands({ program }) {
11
13
  program.command("change").description(i18n.t(localeKeys.command.change.describe)).option("--empty", i18n.t(localeKeys.command.change.empty), false).option("--open", i18n.t(localeKeys.command.change.open), false).action((options) => change(options));
12
- program.command("bump").description(i18n.t(localeKeys.command.bump.describe)).option("--canary", i18n.t(localeKeys.command.bump.canary), false).option(
13
- "--ignore <package>",
14
- i18n.t(localeKeys.command.bump.ignore),
15
- (val, memo) => {
16
- memo.push(val);
17
- return memo;
18
- },
19
- []
20
- ).option(
21
- "--preid <tag>",
22
- i18n.t(localeKeys.command.bump.preid),
23
- "next"
24
- ).option(
25
- "--snapshot [snapshot]",
26
- i18n.t(localeKeys.command.bump.snapshot),
27
- false
28
- ).action((options) => bump(options));
14
+ program.command("bump").description(i18n.t(localeKeys.command.bump.describe)).option("--canary", i18n.t(localeKeys.command.bump.canary), false).option("--ignore <package>", i18n.t(localeKeys.command.bump.ignore), (val, memo) => {
15
+ memo.push(val);
16
+ return memo;
17
+ }, []).option("--preid <tag>", i18n.t(localeKeys.command.bump.preid), "next").option("--snapshot [snapshot]", i18n.t(localeKeys.command.bump.snapshot), false).action((options) => bump(options));
29
18
  program.command("pre <enter|exit> [tag]").description(i18n.t(localeKeys.command.pre.describe)).action((type, tag) => pre(type, tag));
30
- program.command("release").description(i18n.t(localeKeys.command.release.describe)).option("--tag <tag>", i18n.t(localeKeys.command.release.tag), "").option("--otp <token>", i18n.t(localeKeys.command.release.otp), "").option(
31
- "--ignore-scripts",
32
- i18n.t(localeKeys.command.release.ignore_scripts),
33
- ""
34
- ).option(
35
- "--no-git-checks",
36
- i18n.t(localeKeys.command.release.no_git_checks),
37
- ""
38
- ).action((options) => release(options));
19
+ program.command("release").description(i18n.t(localeKeys.command.release.describe)).option("--tag <tag>", i18n.t(localeKeys.command.release.tag), "").option("--otp <token>", i18n.t(localeKeys.command.release.otp), "").option("--ignore-scripts", i18n.t(localeKeys.command.release.ignore_scripts), "").option("--no-git-checks", i18n.t(localeKeys.command.release.no_git_checks), "").action((options) => release(options));
39
20
  program.command("change-status").description(i18n.t(localeKeys.command.status.describe)).option("--verbose", i18n.t(localeKeys.command.status.verbose)).option("--output <file>", i18n.t(localeKeys.command.status.output)).option("--since <ref>", i18n.t(localeKeys.command.status.since)).action((options) => status(options));
40
- program.command("gen-release-note").description(i18n.t(localeKeys.command.gen_release_note.describe)).option(
41
- "--repo <repo>",
42
- i18n.t(localeKeys.command.gen_release_note.repo)
43
- ).option(
44
- "--custom <custom>",
45
- i18n.t(localeKeys.command.gen_release_note.custom)
46
- ).action(async (options) => {
21
+ program.command("gen-release-note").description(i18n.t(localeKeys.command.gen_release_note.describe)).option("--repo <repo>", i18n.t(localeKeys.command.gen_release_note.repo)).option("--custom <custom>", i18n.t(localeKeys.command.gen_release_note.custom)).action(async (options) => {
47
22
  await genReleaseNote(options);
48
23
  });
49
24
  }
50
25
  };
51
26
  }
52
27
  });
53
- export {
54
- src_default as default
55
- };
@@ -1,4 +1,4 @@
1
- const EN_LOCALE = {
1
+ export const EN_LOCALE = {
2
2
  command: {
3
3
  change: {
4
4
  describe: "create changeset",
@@ -36,6 +36,3 @@ const EN_LOCALE = {
36
36
  }
37
37
  }
38
38
  };
39
- export {
40
- EN_LOCALE
41
- };
@@ -2,8 +2,8 @@ import { I18n } from "@modern-js/plugin-i18n";
2
2
  import { ZH_LOCALE } from "./zh";
3
3
  import { EN_LOCALE } from "./en";
4
4
  const i18n = new I18n();
5
- const localeKeys = i18n.init("en", { zh: ZH_LOCALE, en: EN_LOCALE });
6
- export {
7
- i18n,
8
- localeKeys
9
- };
5
+ const localeKeys = i18n.init("en", {
6
+ zh: ZH_LOCALE,
7
+ en: EN_LOCALE
8
+ });
9
+ export { i18n, localeKeys };
@@ -1,4 +1,4 @@
1
- const ZH_LOCALE = {
1
+ export const ZH_LOCALE = {
2
2
  command: {
3
3
  change: {
4
4
  describe: "创建变更集",
@@ -36,6 +36,3 @@ const ZH_LOCALE = {
36
36
  }
37
37
  }
38
38
  };
39
- export {
40
- ZH_LOCALE
41
- };
@@ -1,6 +1,6 @@
1
1
  import { execa } from "@modern-js/utils";
2
- const CHANGESET_PATH = require.resolve("@changesets/cli");
3
- function execaWithStreamLog(command, args) {
2
+ export const CHANGESET_PATH = require.resolve("@changesets/cli");
3
+ export function execaWithStreamLog(command, args) {
4
4
  const promise = execa(command, args, {
5
5
  stdin: "inherit",
6
6
  stdout: "inherit",
@@ -8,7 +8,3 @@ function execaWithStreamLog(command, args) {
8
8
  });
9
9
  return promise;
10
10
  }
11
- export {
12
- CHANGESET_PATH,
13
- execaWithStreamLog
14
- };
package/package.json CHANGED
@@ -3,7 +3,11 @@
3
3
  "description": "A Progressive React Framework for modern web development.",
4
4
  "homepage": "https://modernjs.dev",
5
5
  "bugs": "https://github.com/web-infra-dev/modern.js/issues",
6
- "repository": "web-infra-dev/modern.js",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/web-infra-dev/modern.js",
9
+ "directory": "packages/cli/plugin-changeset"
10
+ },
7
11
  "license": "MIT",
8
12
  "keywords": [
9
13
  "react",
@@ -11,7 +15,7 @@
11
15
  "modern",
12
16
  "modern.js"
13
17
  ],
14
- "version": "2.15.0",
18
+ "version": "2.16.0",
15
19
  "jsnext:source": "./src/index.ts",
16
20
  "types": "./dist/types/index.d.ts",
17
21
  "main": "./dist/cjs/index.js",
@@ -47,17 +51,17 @@
47
51
  "@changesets/git": "^1.3.2",
48
52
  "@changesets/read": "^0.5.5",
49
53
  "resolve-from": "^5.0.0",
50
- "@modern-js/plugin-i18n": "2.15.0",
51
- "@modern-js/utils": "2.15.0"
54
+ "@modern-js/plugin-i18n": "2.16.0",
55
+ "@modern-js/utils": "2.16.0"
52
56
  },
53
57
  "devDependencies": {
54
58
  "@types/jest": "^29",
55
59
  "@types/node": "^14",
56
60
  "typescript": "^4",
57
61
  "jest": "^29",
58
- "@modern-js/core": "2.15.0",
59
- "@scripts/build": "2.15.0",
60
- "@scripts/jest-config": "2.15.0"
62
+ "@modern-js/core": "2.16.0",
63
+ "@scripts/build": "2.16.0",
64
+ "@scripts/jest-config": "2.16.0"
61
65
  },
62
66
  "sideEffects": false,
63
67
  "publishConfig": {