@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/CHANGELOG.md +14 -0
- package/dist/cjs/commands/bump.js +20 -35
- package/dist/cjs/commands/change.js +21 -38
- package/dist/cjs/commands/index.js +23 -22
- package/dist/cjs/commands/pre.js +14 -28
- package/dist/cjs/commands/release.js +31 -53
- package/dist/cjs/commands/releaseNote.js +33 -66
- package/dist/cjs/commands/status.js +13 -28
- package/dist/cjs/index.js +37 -67
- package/dist/cjs/locale/en.js +7 -25
- package/dist/cjs/locale/index.js +18 -28
- package/dist/cjs/locale/zh.js +7 -25
- package/dist/cjs/utils/changeset.js +13 -36
- package/dist/cjs/utils/index.js +18 -17
- package/dist/esm/commands/bump.js +5 -5
- package/dist/esm/commands/change.js +9 -16
- package/dist/esm/commands/pre.js +6 -5
- package/dist/esm/commands/release.js +10 -17
- package/dist/esm/commands/releaseNote.js +10 -29
- package/dist/esm/commands/status.js +5 -5
- package/dist/esm/index.js +10 -38
- package/dist/esm/locale/en.js +1 -4
- package/dist/esm/locale/index.js +5 -5
- package/dist/esm/locale/zh.js +1 -4
- package/dist/esm/utils/changeset.js +2 -6
- package/package.json +11 -7
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
|
-
|
|
5
|
+
export default () => ({
|
|
6
6
|
name: "@modern-js/plugin-changeset",
|
|
7
7
|
setup: () => {
|
|
8
|
-
i18n.changeLanguage({
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
};
|
package/dist/esm/locale/en.js
CHANGED
package/dist/esm/locale/index.js
CHANGED
|
@@ -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", {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
5
|
+
const localeKeys = i18n.init("en", {
|
|
6
|
+
zh: ZH_LOCALE,
|
|
7
|
+
en: EN_LOCALE
|
|
8
|
+
});
|
|
9
|
+
export { i18n, localeKeys };
|
package/dist/esm/locale/zh.js
CHANGED
|
@@ -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":
|
|
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.
|
|
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.
|
|
51
|
-
"@modern-js/utils": "2.
|
|
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.
|
|
59
|
-
"@scripts/build": "2.
|
|
60
|
-
"@scripts/jest-config": "2.
|
|
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": {
|