@modern-js/plugin-changeset 2.14.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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # @modern-js/plugin-changeset
2
2
 
3
+ ## 2.16.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 4e876ab: chore: package.json include the monorepo-relative directory
8
+
9
+ chore: 在 package.json 中声明 monorepo 的子路径
10
+
11
+ - Updated dependencies [5954330]
12
+ - Updated dependencies [7596520]
13
+ - Updated dependencies [4e876ab]
14
+ - @modern-js/utils@2.16.0
15
+ - @modern-js/plugin-i18n@2.16.0
16
+
17
+ ## 2.15.0
18
+
19
+ ### Patch Changes
20
+
21
+ - @modern-js/plugin-i18n@2.15.0
22
+ - @modern-js/utils@2.15.0
23
+
3
24
  ## 2.14.0
4
25
 
5
26
  ### Patch Changes
@@ -1,29 +1,18 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var bump_exports = {};
19
- __export(bump_exports, {
20
- bump: () => bump
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "bump", {
6
+ enumerable: true,
7
+ get: () => bump
21
8
  });
22
- module.exports = __toCommonJS(bump_exports);
23
- var import_utils = require("../utils");
9
+ const _utils = require("../utils");
24
10
  async function bump(options) {
25
11
  const { snapshot, canary, preid, ignore } = options;
26
- const params = [import_utils.CHANGESET_PATH, "version"];
12
+ const params = [
13
+ _utils.CHANGESET_PATH,
14
+ "version"
15
+ ];
27
16
  if (snapshot) {
28
17
  params.push("--snapshot");
29
18
  if (typeof snapshot === "string") {
@@ -37,31 +26,27 @@ async function bump(options) {
37
26
  });
38
27
  }
39
28
  if (canary) {
40
- await (0, import_utils.execaWithStreamLog)(process.execPath, [
41
- import_utils.CHANGESET_PATH,
29
+ await (0, _utils.execaWithStreamLog)(process.execPath, [
30
+ _utils.CHANGESET_PATH,
42
31
  "pre",
43
32
  "enter",
44
33
  preid || "next"
45
34
  ]);
46
35
  try {
47
- await (0, import_utils.execaWithStreamLog)(process.execPath, params);
48
- await (0, import_utils.execaWithStreamLog)(process.execPath, [
49
- import_utils.CHANGESET_PATH,
36
+ await (0, _utils.execaWithStreamLog)(process.execPath, params);
37
+ await (0, _utils.execaWithStreamLog)(process.execPath, [
38
+ _utils.CHANGESET_PATH,
50
39
  "pre",
51
40
  "exit"
52
41
  ]);
53
42
  } catch (e) {
54
- await (0, import_utils.execaWithStreamLog)(process.execPath, [
55
- import_utils.CHANGESET_PATH,
43
+ await (0, _utils.execaWithStreamLog)(process.execPath, [
44
+ _utils.CHANGESET_PATH,
56
45
  "pre",
57
46
  "exit"
58
47
  ]);
59
48
  }
60
49
  } else {
61
- await (0, import_utils.execaWithStreamLog)(process.execPath, params);
50
+ await (0, _utils.execaWithStreamLog)(process.execPath, params);
62
51
  }
63
52
  }
64
- // Annotate the CommonJS export names for ESM import in node:
65
- 0 && (module.exports = {
66
- bump
67
- });
@@ -1,53 +1,36 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var change_exports = {};
19
- __export(change_exports, {
20
- change: () => change
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "change", {
6
+ enumerable: true,
7
+ get: () => change
21
8
  });
22
- module.exports = __toCommonJS(change_exports);
23
- var import_utils = require("@modern-js/utils");
24
- var import_utils2 = require("../utils");
25
- var import_locale = require("../locale");
9
+ const _utils = require("@modern-js/utils");
10
+ const _utils1 = require("../utils");
11
+ const _locale = require("../locale");
26
12
  async function change(options) {
27
13
  const appDir = process.cwd();
28
- if ((0, import_utils.isMonorepo)(appDir)) {
29
- const packages = (0, import_utils.getMonorepoPackages)(appDir);
14
+ if ((0, _utils.isMonorepo)(appDir)) {
15
+ const packages = (0, _utils.getMonorepoPackages)(appDir);
30
16
  if (packages.length === 0) {
31
- const packageManager = await (0, import_utils.getPackageManager)(appDir);
32
- import_utils.logger.warn(
33
- import_locale.i18n.t(import_locale.localeKeys.command.change.no_packages, {
34
- packageManager: packageManager === "yarn" ? "yarn" : `${packageManager} run`
35
- })
36
- );
17
+ const packageManager = await (0, _utils.getPackageManager)(appDir);
18
+ _utils.logger.warn(_locale.i18n.t(_locale.localeKeys.command.change.no_packages, {
19
+ packageManager: packageManager === "yarn" ? "yarn" : `${packageManager} run`
20
+ }));
37
21
  return;
38
22
  }
39
23
  }
40
24
  const { empty, open } = options;
41
- const params = [import_utils2.CHANGESET_PATH, "add"];
25
+ const params = [
26
+ _utils1.CHANGESET_PATH,
27
+ "add"
28
+ ];
42
29
  if (empty) {
43
30
  params.push("--empty");
44
31
  }
45
32
  if (open) {
46
33
  params.push("--open");
47
34
  }
48
- await (0, import_utils2.execaWithStreamLog)(process.execPath, params);
35
+ await (0, _utils1.execaWithStreamLog)(process.execPath, params);
49
36
  }
50
- // Annotate the CommonJS export names for ESM import in node:
51
- 0 && (module.exports = {
52
- change
53
- });
@@ -1,22 +1,23 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var commands_exports = {};
16
- module.exports = __toCommonJS(commands_exports);
17
- __reExport(commands_exports, require("./change"), module.exports);
18
- __reExport(commands_exports, require("./bump"), module.exports);
19
- __reExport(commands_exports, require("./pre"), module.exports);
20
- __reExport(commands_exports, require("./release"), module.exports);
21
- __reExport(commands_exports, require("./status"), module.exports);
22
- __reExport(commands_exports, require("./releaseNote"), module.exports);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ _export_star(require("./change"), exports);
6
+ _export_star(require("./bump"), exports);
7
+ _export_star(require("./pre"), exports);
8
+ _export_star(require("./release"), exports);
9
+ _export_star(require("./status"), exports);
10
+ _export_star(require("./releaseNote"), exports);
11
+ function _export_star(from, to) {
12
+ Object.keys(from).forEach(function(k) {
13
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
14
+ Object.defineProperty(to, k, {
15
+ enumerable: true,
16
+ get: function() {
17
+ return from[k];
18
+ }
19
+ });
20
+ }
21
+ });
22
+ return from;
23
+ }
@@ -1,34 +1,20 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var pre_exports = {};
19
- __export(pre_exports, {
20
- pre: () => pre
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "pre", {
6
+ enumerable: true,
7
+ get: () => pre
21
8
  });
22
- module.exports = __toCommonJS(pre_exports);
23
- var import_utils = require("../utils");
9
+ const _utils = require("../utils");
24
10
  async function pre(type, tag = "next") {
25
- const params = [import_utils.CHANGESET_PATH, "pre", type];
11
+ const params = [
12
+ _utils.CHANGESET_PATH,
13
+ "pre",
14
+ type
15
+ ];
26
16
  if (type === "enter") {
27
17
  params.push(tag);
28
18
  }
29
- await (0, import_utils.execaWithStreamLog)(process.execPath, params);
19
+ await (0, _utils.execaWithStreamLog)(process.execPath, params);
30
20
  }
31
- // Annotate the CommonJS export names for ESM import in node:
32
- 0 && (module.exports = {
33
- pre
34
- });
@@ -1,43 +1,26 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
- var release_exports = {};
29
- __export(release_exports, {
30
- release: () => release
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "release", {
6
+ enumerable: true,
7
+ get: () => release
31
8
  });
32
- module.exports = __toCommonJS(release_exports);
33
- var import_path = __toESM(require("path"));
34
- var import_utils = require("@modern-js/utils");
35
- var import_git = require("@changesets/git");
36
- var import_utils2 = require("../utils");
9
+ const _path = /* @__PURE__ */ _interop_require_default(require("path"));
10
+ const _utils = require("@modern-js/utils");
11
+ const _git = require("@changesets/git");
12
+ const _utils1 = require("../utils");
13
+ function _interop_require_default(obj) {
14
+ return obj && obj.__esModule ? obj : {
15
+ default: obj
16
+ };
17
+ }
37
18
  async function release(options) {
38
19
  const appDir = process.cwd();
39
- const packageManager = await (0, import_utils.getPackageManager)(process.cwd());
40
- const params = ["publish"];
20
+ const packageManager = await (0, _utils.getPackageManager)(process.cwd());
21
+ const params = [
22
+ "publish"
23
+ ];
41
24
  const { tag, otp, ignoreScripts, gitChecks } = options;
42
25
  if (tag) {
43
26
  params.push("--tag");
@@ -47,13 +30,16 @@ async function release(options) {
47
30
  params.push("--otp");
48
31
  params.push(otp);
49
32
  }
50
- if (!(0, import_utils.isMonorepo)(appDir) || packageManager === "yarn" || packageManager === "npm") {
51
- await (0, import_utils2.execaWithStreamLog)(process.execPath, [import_utils2.CHANGESET_PATH, ...params]);
33
+ if (!(0, _utils.isMonorepo)(appDir) || packageManager === "yarn" || packageManager === "npm") {
34
+ await (0, _utils1.execaWithStreamLog)(process.execPath, [
35
+ _utils1.CHANGESET_PATH,
36
+ ...params
37
+ ]);
52
38
  return;
53
39
  }
54
40
  params.push("-r");
55
41
  params.push("--filter");
56
- const pnpmVersion = await (0, import_utils.getPnpmVersion)();
42
+ const pnpmVersion = await (0, _utils.getPnpmVersion)();
57
43
  if (pnpmVersion.startsWith("6")) {
58
44
  params.push("./packages/");
59
45
  } else {
@@ -66,17 +52,9 @@ async function release(options) {
66
52
  if (!gitChecks) {
67
53
  params.push("--no-git-checks");
68
54
  }
69
- await (0, import_utils2.execaWithStreamLog)(packageManager, params);
70
- const pnpmPublishSummaryFile = import_path.default.join(appDir, "pnpm-publish-summary.json");
71
- const publishInfo = await import_utils.fs.readJSON(pnpmPublishSummaryFile, "utf-8");
72
- await Promise.all(
73
- (publishInfo.publishedPackages || []).map(
74
- (pkg) => (0, import_git.tag)(`${pkg.name}@${pkg.version}`, appDir)
75
- )
76
- );
77
- await import_utils.fs.remove(pnpmPublishSummaryFile);
55
+ await (0, _utils1.execaWithStreamLog)(packageManager, params);
56
+ const pnpmPublishSummaryFile = _path.default.join(appDir, "pnpm-publish-summary.json");
57
+ const publishInfo = await _utils.fs.readJSON(pnpmPublishSummaryFile, "utf-8");
58
+ await Promise.all((publishInfo.publishedPackages || []).map((pkg) => (0, _git.tag)(`${pkg.name}@${pkg.version}`, appDir)));
59
+ await _utils.fs.remove(pnpmPublishSummaryFile);
78
60
  }
79
- // Annotate the CommonJS export names for ESM import in node:
80
- 0 && (module.exports = {
81
- release
82
- });
@@ -1,41 +1,28 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
8
6
  for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
- var releaseNote_exports = {};
29
- __export(releaseNote_exports, {
30
- genReleaseNote: () => genReleaseNote,
7
+ Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: all[name]
10
+ });
11
+ }
12
+ _export(exports, {
31
13
  getReleaseInfo: () => getReleaseInfo,
32
- getReleaseNoteLine: () => getReleaseNoteLine
14
+ getReleaseNoteLine: () => getReleaseNoteLine,
15
+ genReleaseNote: () => genReleaseNote
33
16
  });
34
- module.exports = __toCommonJS(releaseNote_exports);
35
- var import_path = __toESM(require("path"));
36
- var import_resolve_from = __toESM(require("resolve-from"));
37
- var import_utils = require("@modern-js/utils");
38
- var import_read = __toESM(require("@changesets/read"));
17
+ const _path = /* @__PURE__ */ _interop_require_default(require("path"));
18
+ const _resolvefrom = /* @__PURE__ */ _interop_require_default(require("resolve-from"));
19
+ const _utils = require("@modern-js/utils");
20
+ const _read = /* @__PURE__ */ _interop_require_default(require("@changesets/read"));
21
+ function _interop_require_default(obj) {
22
+ return obj && obj.__esModule ? obj : {
23
+ default: obj
24
+ };
25
+ }
39
26
  function getReleaseInfo(commit, commitObj) {
40
27
  const commitRegex = /(.*)\(#(\d*)\)/;
41
28
  const [, message, author] = commit.split("--");
@@ -66,15 +53,12 @@ function formatSummary(summary, pullRequestId) {
66
53
  return returnVal;
67
54
  }
68
55
  function getReleaseNoteLine(commit, customReleaseNoteFunction) {
69
- if (customReleaseNoteFunction == null ? void 0 : customReleaseNoteFunction.getReleaseNoteLine) {
56
+ if (customReleaseNoteFunction === null || customReleaseNoteFunction === void 0 ? void 0 : customReleaseNoteFunction.getReleaseNoteLine) {
70
57
  return customReleaseNoteFunction.getReleaseNoteLine(commit);
71
58
  }
72
59
  const { repository, pullRequestId, summary } = commit;
73
60
  if (pullRequestId && repository) {
74
- return `- [#${pullRequestId}](https://github.com/${repository}/pull/${pullRequestId}) ${formatSummary(
75
- summary,
76
- pullRequestId
77
- )}
61
+ return `- [#${pullRequestId}](https://github.com/${repository}/pull/${pullRequestId}) ${formatSummary(summary, pullRequestId)}
78
62
  `;
79
63
  }
80
64
  if (pullRequestId) {
@@ -90,12 +74,12 @@ async function genReleaseNote(options) {
90
74
  let repository = repo;
91
75
  let customReleaseNoteFunction;
92
76
  if (!repo) {
93
- const pkg = await import_utils.fs.readJSON(import_path.default.join(cwd, "package.json"));
77
+ const pkg = await _utils.fs.readJSON(_path.default.join(cwd, "package.json"));
94
78
  ({ repository } = pkg);
95
79
  }
96
80
  if (custom) {
97
81
  let possibleReleaseNoteFunc;
98
- const releasenotePath = (0, import_resolve_from.default)(cwd, custom);
82
+ const releasenotePath = (0, _resolvefrom.default)(cwd, custom);
99
83
  possibleReleaseNoteFunc = require(releasenotePath);
100
84
  if (possibleReleaseNoteFunc.default) {
101
85
  possibleReleaseNoteFunc = possibleReleaseNoteFunc.default;
@@ -106,7 +90,7 @@ async function genReleaseNote(options) {
106
90
  throw new Error("Could not resolve release note generation functions");
107
91
  }
108
92
  }
109
- const changesets = await (0, import_read.default)(cwd);
93
+ const changesets = await (0, _read.default)(cwd);
110
94
  if (changesets.length === 0) {
111
95
  console.warn("No unreleased changesets found.");
112
96
  return "";
@@ -114,7 +98,7 @@ async function genReleaseNote(options) {
114
98
  const features = [];
115
99
  const bugFix = [];
116
100
  for (const changeset of changesets) {
117
- const { stdout } = await (0, import_utils.execa)("git", [
101
+ const { stdout } = await (0, _utils.execa)("git", [
118
102
  "log",
119
103
  "--pretty=format:%h--%s--%an",
120
104
  `.changeset/${changeset.id}.md`
@@ -127,11 +111,8 @@ async function genReleaseNote(options) {
127
111
  message: (message || changeset.summary).trim(),
128
112
  summary: changeset.summary
129
113
  };
130
- if (customReleaseNoteFunction == null ? void 0 : customReleaseNoteFunction.getReleaseInfo) {
131
- commitObj = await customReleaseNoteFunction.getReleaseInfo(
132
- stdout,
133
- commitObj
134
- );
114
+ if (customReleaseNoteFunction === null || customReleaseNoteFunction === void 0 ? void 0 : customReleaseNoteFunction.getReleaseInfo) {
115
+ commitObj = await customReleaseNoteFunction.getReleaseInfo(stdout, commitObj);
135
116
  } else {
136
117
  commitObj = getReleaseInfo(stdout, commitObj);
137
118
  }
@@ -142,37 +123,23 @@ async function genReleaseNote(options) {
142
123
  }
143
124
  }
144
125
  if (!features.length && !bugFix.length) {
145
- console.warn(
146
- "no release note found, you can run `pnpm run add` to add changeset"
147
- );
126
+ console.warn("no release note found, you can run `pnpm run add` to add changeset");
148
127
  }
149
128
  let result = "";
150
129
  if (features.length) {
151
130
  result += "## Features:\n";
152
131
  for (const commit of features) {
153
- const releaseNote = await getReleaseNoteLine(
154
- commit,
155
- customReleaseNoteFunction
156
- );
132
+ const releaseNote = await getReleaseNoteLine(commit, customReleaseNoteFunction);
157
133
  result += releaseNote;
158
134
  }
159
135
  }
160
136
  if (bugFix.length) {
161
137
  result += "## Bug Fix:\n";
162
138
  for (const commit of bugFix) {
163
- const releaseNote = await getReleaseNoteLine(
164
- commit,
165
- customReleaseNoteFunction
166
- );
139
+ const releaseNote = await getReleaseNoteLine(commit, customReleaseNoteFunction);
167
140
  result += releaseNote;
168
141
  }
169
142
  }
170
143
  console.info(result);
171
144
  return result;
172
145
  }
173
- // Annotate the CommonJS export names for ESM import in node:
174
- 0 && (module.exports = {
175
- genReleaseNote,
176
- getReleaseInfo,
177
- getReleaseNoteLine
178
- });
@@ -1,28 +1,17 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var status_exports = {};
19
- __export(status_exports, {
20
- status: () => status
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "status", {
6
+ enumerable: true,
7
+ get: () => status
21
8
  });
22
- module.exports = __toCommonJS(status_exports);
23
- var import_utils = require("../utils");
9
+ const _utils = require("../utils");
24
10
  async function status(options) {
25
- const params = [import_utils.CHANGESET_PATH, "status"];
11
+ const params = [
12
+ _utils.CHANGESET_PATH,
13
+ "status"
14
+ ];
26
15
  const { verbose, output, since } = options;
27
16
  if (verbose) {
28
17
  params.push("--verbose");
@@ -35,9 +24,5 @@ async function status(options) {
35
24
  params.push("--since");
36
25
  params.push(since);
37
26
  }
38
- await (0, import_utils.execaWithStreamLog)(process.execPath, params);
27
+ await (0, _utils.execaWithStreamLog)(process.execPath, params);
39
28
  }
40
- // Annotate the CommonJS export names for ESM import in node:
41
- 0 && (module.exports = {
42
- status
43
- });