@modern-js/plugin-changeset 2.0.0-beta.3 → 2.0.0-beta.6

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,68 @@
1
1
  # @modern-js/plugin-changeset
2
2
 
3
+ ## 2.0.0-beta.6
4
+
5
+ ### Major Changes
6
+
7
+ - dda38c9c3e: chore: v2
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [7879e8f711]
12
+ - Updated dependencies [6aca875011]
13
+ - Updated dependencies [2e6031955e]
14
+ - Updated dependencies [7b7d12cf8f]
15
+ - Updated dependencies [7efeed4]
16
+ - Updated dependencies [92f0eade39]
17
+ - Updated dependencies [edd1cfb1af]
18
+ - Updated dependencies [cc971eabfc]
19
+ - Updated dependencies [5b9049f2e9]
20
+ - Updated dependencies [92004d1906]
21
+ - Updated dependencies [b8bbe036c7]
22
+ - Updated dependencies [d5a31df781]
23
+ - Updated dependencies [dda38c9c3e]
24
+ - Updated dependencies [3bbea92b2a]
25
+ - Updated dependencies [b710adb843]
26
+ - Updated dependencies [ea7cf06257]
27
+ - Updated dependencies [bbe4c4ab64]
28
+ - Updated dependencies [e4558a0bc4]
29
+ - Updated dependencies [abf3421a75]
30
+ - Updated dependencies [543be9558e]
31
+ - Updated dependencies [14b712da84]
32
+ - @modern-js/utils@2.0.0-beta.6
33
+ - @modern-js/plugin-i18n@2.0.0-beta.6
34
+
35
+ ## 2.0.0-beta.4
36
+
37
+ ### Major Changes
38
+
39
+ - dda38c9c3e: chore: v2
40
+
41
+ ### Patch Changes
42
+
43
+ - Updated dependencies [7879e8f]
44
+ - Updated dependencies [6aca875]
45
+ - Updated dependencies [2e6031955e]
46
+ - Updated dependencies [7b7d12c]
47
+ - Updated dependencies [92f0eade39]
48
+ - Updated dependencies [edd1cfb1af]
49
+ - Updated dependencies [cc971eabfc]
50
+ - Updated dependencies [5b9049f2e9]
51
+ - Updated dependencies [92004d1906]
52
+ - Updated dependencies [b8bbe036c7]
53
+ - Updated dependencies [d5a31df781]
54
+ - Updated dependencies [dda38c9c3e]
55
+ - Updated dependencies [3bbea92b2a]
56
+ - Updated dependencies [b710adb843]
57
+ - Updated dependencies [ea7cf06]
58
+ - Updated dependencies [bbe4c4a]
59
+ - Updated dependencies [e4558a0]
60
+ - Updated dependencies [abf3421a75]
61
+ - Updated dependencies [543be9558e]
62
+ - Updated dependencies [14b712da84]
63
+ - @modern-js/utils@2.0.0-beta.4
64
+ - @modern-js/plugin-i18n@2.0.0-beta.4
65
+
3
66
  ## 2.0.0-beta.3
4
67
 
5
68
  ### Major Changes
@@ -1,33 +1,66 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
1
21
  import { CHANGESET_PATH, execaWithStreamLog } from "../utils";
2
- export async function bump(options) {
3
- const {
4
- snapshot,
5
- canary,
6
- preid,
7
- ignore
8
- } = options;
9
- const params = [CHANGESET_PATH, 'version'];
10
- if (snapshot) {
11
- params.push('--snapshot');
12
- if (typeof snapshot === 'string') {
13
- params.push(snapshot);
22
+ function bump(options) {
23
+ return __async(this, null, function* () {
24
+ const { snapshot, canary, preid, ignore } = options;
25
+ const params = [CHANGESET_PATH, "version"];
26
+ if (snapshot) {
27
+ params.push("--snapshot");
28
+ if (typeof snapshot === "string") {
29
+ params.push(snapshot);
30
+ }
14
31
  }
15
- }
16
- if (ignore) {
17
- ignore.forEach(pkg => {
18
- params.push('--ignore');
19
- params.push(pkg);
20
- });
21
- }
22
- if (canary) {
23
- await execaWithStreamLog(process.execPath, [CHANGESET_PATH, 'pre', 'enter', preid || 'next']);
24
- try {
25
- await execaWithStreamLog(process.execPath, params);
26
- await execaWithStreamLog(process.execPath, [CHANGESET_PATH, 'pre', 'exit']);
27
- } catch (e) {
28
- await execaWithStreamLog(process.execPath, [CHANGESET_PATH, 'pre', 'exit']);
32
+ if (ignore) {
33
+ ignore.forEach((pkg) => {
34
+ params.push("--ignore");
35
+ params.push(pkg);
36
+ });
29
37
  }
30
- } else {
31
- await execaWithStreamLog(process.execPath, params);
32
- }
33
- }
38
+ if (canary) {
39
+ yield execaWithStreamLog(process.execPath, [
40
+ CHANGESET_PATH,
41
+ "pre",
42
+ "enter",
43
+ preid || "next"
44
+ ]);
45
+ try {
46
+ yield execaWithStreamLog(process.execPath, params);
47
+ yield execaWithStreamLog(process.execPath, [
48
+ CHANGESET_PATH,
49
+ "pre",
50
+ "exit"
51
+ ]);
52
+ } catch (e) {
53
+ yield execaWithStreamLog(process.execPath, [
54
+ CHANGESET_PATH,
55
+ "pre",
56
+ "exit"
57
+ ]);
58
+ }
59
+ } else {
60
+ yield execaWithStreamLog(process.execPath, params);
61
+ }
62
+ });
63
+ }
64
+ export {
65
+ bump
66
+ };
@@ -1,28 +1,57 @@
1
- import { isMonorepo, getMonorepoPackages, getPackageManager, logger } from '@modern-js/utils';
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import {
22
+ isMonorepo,
23
+ getMonorepoPackages,
24
+ getPackageManager,
25
+ logger
26
+ } from "@modern-js/utils";
2
27
  import { CHANGESET_PATH, execaWithStreamLog } from "../utils";
3
28
  import { i18n, localeKeys } from "../locale";
4
- export async function change(options) {
5
- const appDir = process.cwd();
6
- if (isMonorepo(appDir)) {
7
- const packages = getMonorepoPackages(appDir);
8
- if (packages.length === 0) {
9
- const packageManager = await getPackageManager(appDir);
10
- logger.warn(i18n.t(localeKeys.command.change.no_packages, {
11
- packageManager: packageManager === 'yarn' ? 'yarn' : `${packageManager} run`
12
- }));
13
- return;
29
+ function change(options) {
30
+ return __async(this, null, function* () {
31
+ const appDir = process.cwd();
32
+ if (isMonorepo(appDir)) {
33
+ const packages = getMonorepoPackages(appDir);
34
+ if (packages.length === 0) {
35
+ const packageManager = yield getPackageManager(appDir);
36
+ logger.warn(
37
+ i18n.t(localeKeys.command.change.no_packages, {
38
+ packageManager: packageManager === "yarn" ? "yarn" : `${packageManager} run`
39
+ })
40
+ );
41
+ return;
42
+ }
14
43
  }
15
- }
16
- const {
17
- empty,
18
- open
19
- } = options;
20
- const params = [CHANGESET_PATH, 'add'];
21
- if (empty) {
22
- params.push('--empty');
23
- }
24
- if (open) {
25
- params.push('--open');
26
- }
27
- await execaWithStreamLog(process.execPath, params);
28
- }
44
+ const { empty, open } = options;
45
+ const params = [CHANGESET_PATH, "add"];
46
+ if (empty) {
47
+ params.push("--empty");
48
+ }
49
+ if (open) {
50
+ params.push("--open");
51
+ }
52
+ yield execaWithStreamLog(process.execPath, params);
53
+ });
54
+ }
55
+ export {
56
+ change
57
+ };
@@ -3,4 +3,4 @@ export * from "./bump";
3
3
  export * from "./pre";
4
4
  export * from "./release";
5
5
  export * from "./status";
6
- export * from "./release-note";
6
+ export * from "./release-note";
@@ -1,8 +1,33 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
1
21
  import { CHANGESET_PATH, execaWithStreamLog } from "../utils";
2
- export async function pre(type, tag = 'next') {
3
- const params = [CHANGESET_PATH, 'pre', type];
4
- if (type === 'enter') {
5
- params.push(tag);
6
- }
7
- await execaWithStreamLog(process.execPath, params);
8
- }
22
+ function pre(type, tag = "next") {
23
+ return __async(this, null, function* () {
24
+ const params = [CHANGESET_PATH, "pre", type];
25
+ if (type === "enter") {
26
+ params.push(tag);
27
+ }
28
+ yield execaWithStreamLog(process.execPath, params);
29
+ });
30
+ }
31
+ export {
32
+ pre
33
+ };
@@ -1,10 +1,30 @@
1
- import path from 'path';
2
- import resolveFrom from 'resolve-from';
3
- import { fs, execa } from '@modern-js/utils';
4
- import readChangesets from '@changesets/read';
5
- export function getReleaseInfo(commit, commitObj) {
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import path from "path";
22
+ import resolveFrom from "resolve-from";
23
+ import { fs, execa } from "@modern-js/utils";
24
+ import readChangesets from "@changesets/read";
25
+ function getReleaseInfo(commit, commitObj) {
6
26
  const commitRegex = /(.*)\(#(\d*)\)/;
7
- const [, message, author] = commit.split('--');
27
+ const [, message, author] = commit.split("--");
8
28
  commitObj.author = author;
9
29
  if ((message || commitObj.summary).match(commitRegex)) {
10
30
  const [, messageShort, pullRequestId] = (message || commitObj.summary).match(commitRegex);
@@ -14,109 +34,129 @@ export function getReleaseInfo(commit, commitObj) {
14
34
  return commitObj;
15
35
  }
16
36
  function formatSummary(summary, pullRequestId) {
17
- const [firstLine, ...futureLines] = summary.split('\n').map(l => l.trimRight());
37
+ const [firstLine, ...futureLines] = summary.split("\n").map((l) => l.trimRight());
18
38
  let returnVal = firstLine;
19
39
  if (futureLines.length > 0) {
20
40
  if (pullRequestId) {
21
- returnVal = `\n\n ${returnVal}`;
41
+ returnVal = `
42
+
43
+ ${returnVal}`;
22
44
  } else {
23
- returnVal = `\n ${returnVal}`;
45
+ returnVal = `
46
+ ${returnVal}`;
24
47
  }
25
- returnVal += `\n\n ${futureLines.filter(l => Boolean(l)).map(l => l).join('\n\n')}`;
48
+ returnVal += `
49
+
50
+ ${futureLines.filter((l) => Boolean(l)).map((l) => l).join("\n\n")}`;
26
51
  }
27
52
  return returnVal;
28
53
  }
29
- export function getReleaseNoteLine(commit, customReleaseNoteFunction) {
30
- if (customReleaseNoteFunction !== null && customReleaseNoteFunction !== void 0 && customReleaseNoteFunction.getReleaseNoteLine) {
54
+ function getReleaseNoteLine(commit, customReleaseNoteFunction) {
55
+ if (customReleaseNoteFunction == null ? void 0 : customReleaseNoteFunction.getReleaseNoteLine) {
31
56
  return customReleaseNoteFunction.getReleaseNoteLine(commit);
32
57
  }
33
- const {
34
- repository,
35
- pullRequestId,
36
- summary
37
- } = commit;
58
+ const { repository, pullRequestId, summary } = commit;
38
59
  if (pullRequestId && repository) {
39
- return `- [#${pullRequestId}](https://github.com/${repository}/pull/${pullRequestId}) ${formatSummary(summary, pullRequestId)}\n`;
60
+ return `- [#${pullRequestId}](https://github.com/${repository}/pull/${pullRequestId}) ${formatSummary(
61
+ summary,
62
+ pullRequestId
63
+ )}
64
+ `;
40
65
  }
41
66
  if (pullRequestId) {
42
- return `#${pullRequestId} ${formatSummary(summary, pullRequestId)}\n`;
67
+ return `#${pullRequestId} ${formatSummary(summary, pullRequestId)}
68
+ `;
43
69
  }
44
- return `${formatSummary(summary, pullRequestId)}\n`;
70
+ return `${formatSummary(summary, pullRequestId)}
71
+ `;
45
72
  }
46
- export async function genReleaseNote(options) {
47
- const cwd = process.cwd();
48
- const {
49
- repo,
50
- custom
51
- } = options;
52
- let repository = repo;
53
- let customReleaseNoteFunction;
54
- if (!repo) {
55
- const pkg = await fs.readJSON(path.join(cwd, 'package.json'));
56
- ({
57
- repository
58
- } = pkg);
59
- }
60
- if (custom) {
61
- let possibleReleaseNoteFunc;
62
- const releasenotePath = resolveFrom(cwd, custom);
63
- possibleReleaseNoteFunc = require(releasenotePath);
64
- if (possibleReleaseNoteFunc.default) {
65
- possibleReleaseNoteFunc = possibleReleaseNoteFunc.default;
73
+ function genReleaseNote(options) {
74
+ return __async(this, null, function* () {
75
+ const cwd = process.cwd();
76
+ const { repo, custom } = options;
77
+ let repository = repo;
78
+ let customReleaseNoteFunction;
79
+ if (!repo) {
80
+ const pkg = yield fs.readJSON(path.join(cwd, "package.json"));
81
+ ({ repository } = pkg);
66
82
  }
67
- if (typeof possibleReleaseNoteFunc.getReleaseInfo === 'function' && typeof possibleReleaseNoteFunc.getReleaseNoteLine === 'function') {
68
- customReleaseNoteFunction = possibleReleaseNoteFunc;
69
- } else {
70
- throw new Error('Could not resolve relesae note generation functions');
83
+ if (custom) {
84
+ let possibleReleaseNoteFunc;
85
+ const releasenotePath = resolveFrom(cwd, custom);
86
+ possibleReleaseNoteFunc = require(releasenotePath);
87
+ if (possibleReleaseNoteFunc.default) {
88
+ possibleReleaseNoteFunc = possibleReleaseNoteFunc.default;
89
+ }
90
+ if (typeof possibleReleaseNoteFunc.getReleaseInfo === "function" && typeof possibleReleaseNoteFunc.getReleaseNoteLine === "function") {
91
+ customReleaseNoteFunction = possibleReleaseNoteFunc;
92
+ } else {
93
+ throw new Error("Could not resolve relesae note generation functions");
94
+ }
71
95
  }
72
- }
73
- const changesets = await readChangesets(cwd);
74
- if (changesets.length === 0) {
75
- console.warn('No unreleased changesets found.');
76
- // eslint-disable-next-line no-process-exit
77
- process.exit(1);
78
- }
79
- const features = [];
80
- const bugFix = [];
81
- for (const changeset of changesets) {
82
- var _customReleaseNoteFun;
83
- const {
84
- stdout
85
- } = await execa('git', ['log', '--pretty=format:%h--%s--%an', `.changeset/${changeset.id}.md`]);
86
- const [id, message] = stdout.split('--');
87
- let commitObj = {
88
- id,
89
- type: (message || changeset.summary).startsWith('fix') ? 'fix' : 'feature',
90
- repository,
91
- message: (message || changeset.summary).trim(),
92
- summary: changeset.summary
93
- };
94
- if ((_customReleaseNoteFun = customReleaseNoteFunction) !== null && _customReleaseNoteFun !== void 0 && _customReleaseNoteFun.getReleaseInfo) {
95
- commitObj = await customReleaseNoteFunction.getReleaseInfo(stdout, commitObj);
96
- } else {
97
- commitObj = getReleaseInfo(stdout, commitObj);
96
+ const changesets = yield readChangesets(cwd);
97
+ if (changesets.length === 0) {
98
+ console.warn("No unreleased changesets found.");
99
+ process.exit(1);
98
100
  }
99
- if (commitObj.type === 'fix') {
100
- bugFix.push(commitObj);
101
- } else {
102
- features.push(commitObj);
101
+ const features = [];
102
+ const bugFix = [];
103
+ for (const changeset of changesets) {
104
+ const { stdout } = yield execa("git", [
105
+ "log",
106
+ "--pretty=format:%h--%s--%an",
107
+ `.changeset/${changeset.id}.md`
108
+ ]);
109
+ const [id, message] = stdout.split("--");
110
+ let commitObj = {
111
+ id,
112
+ type: (message || changeset.summary).startsWith("fix") ? "fix" : "feature",
113
+ repository,
114
+ message: (message || changeset.summary).trim(),
115
+ summary: changeset.summary
116
+ };
117
+ if (customReleaseNoteFunction == null ? void 0 : customReleaseNoteFunction.getReleaseInfo) {
118
+ commitObj = yield customReleaseNoteFunction.getReleaseInfo(
119
+ stdout,
120
+ commitObj
121
+ );
122
+ } else {
123
+ commitObj = getReleaseInfo(stdout, commitObj);
124
+ }
125
+ if (commitObj.type === "fix") {
126
+ bugFix.push(commitObj);
127
+ } else {
128
+ features.push(commitObj);
129
+ }
103
130
  }
104
- }
105
- if (!features.length && !bugFix.length) {
106
- console.warn('no release note found, you can run `pnpm run add` to add changeset');
107
- }
108
- if (features.length) {
109
- console.info('## Features:\n');
110
- for (const commit of features) {
111
- const releaseNote = await getReleaseNoteLine(commit, customReleaseNoteFunction);
112
- console.info(releaseNote);
131
+ if (!features.length && !bugFix.length) {
132
+ console.warn(
133
+ "no release note found, you can run `pnpm run add` to add changeset"
134
+ );
113
135
  }
114
- }
115
- if (bugFix.length) {
116
- console.info('## Bug Fix:\n');
117
- for (const commit of bugFix) {
118
- const relesaeNote = await getReleaseNoteLine(commit, customReleaseNoteFunction);
119
- console.info(relesaeNote);
136
+ if (features.length) {
137
+ console.info("## Features:\n");
138
+ for (const commit of features) {
139
+ const releaseNote = yield getReleaseNoteLine(
140
+ commit,
141
+ customReleaseNoteFunction
142
+ );
143
+ console.info(releaseNote);
144
+ }
120
145
  }
121
- }
122
- }
146
+ if (bugFix.length) {
147
+ console.info("## Bug Fix:\n");
148
+ for (const commit of bugFix) {
149
+ const relesaeNote = yield getReleaseNoteLine(
150
+ commit,
151
+ customReleaseNoteFunction
152
+ );
153
+ console.info(relesaeNote);
154
+ }
155
+ }
156
+ });
157
+ }
158
+ export {
159
+ genReleaseNote,
160
+ getReleaseInfo,
161
+ getReleaseNoteLine
162
+ };
@@ -1,47 +1,76 @@
1
- import path from 'path';
2
- import { getPackageManager, isMonorepo, fs, getPnpmVersion } from '@modern-js/utils';
3
- import { tag as gitTag } from '@changesets/git';
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import path from "path";
22
+ import {
23
+ getPackageManager,
24
+ isMonorepo,
25
+ fs,
26
+ getPnpmVersion
27
+ } from "@modern-js/utils";
28
+ import { tag as gitTag } from "@changesets/git";
4
29
  import { CHANGESET_PATH, execaWithStreamLog } from "../utils";
5
- export async function release(options) {
6
- const appDir = process.cwd();
7
- const packageManager = await getPackageManager(process.cwd());
8
- const params = ['publish'];
9
- const {
10
- tag,
11
- otp,
12
- ignoreScripts,
13
- gitChecks
14
- } = options;
15
- if (tag) {
16
- params.push('--tag');
17
- params.push(tag);
18
- }
19
- if (otp) {
20
- params.push('--otp');
21
- params.push(otp);
22
- }
23
- if (!isMonorepo(appDir) || packageManager === 'yarn' || packageManager === 'npm') {
24
- await execaWithStreamLog(process.execPath, [CHANGESET_PATH, ...params]);
25
- return;
26
- }
27
- params.push('-r');
28
- params.push('--filter');
29
- const pnpmVersion = await getPnpmVersion();
30
- if (pnpmVersion.startsWith('6')) {
31
- params.push('./packages/');
32
- } else {
33
- params.push('{./packages/**}');
34
- }
35
- params.push('--report-summary');
36
- if (ignoreScripts) {
37
- params.push('--ignore-scripts');
38
- }
39
- if (!gitChecks) {
40
- params.push('--no-git-checks');
41
- }
42
- await execaWithStreamLog(packageManager, params);
43
- const pnpmPublishSummaryFile = path.join(appDir, 'pnpm-publish-summary.json');
44
- const publishInfo = await fs.readJSON(pnpmPublishSummaryFile, 'utf-8');
45
- await Promise.all((publishInfo.publishedPackages || []).map(pkg => gitTag(`${pkg.name}@${pkg.version}`, appDir)));
46
- await fs.remove(pnpmPublishSummaryFile);
47
- }
30
+ function release(options) {
31
+ return __async(this, null, function* () {
32
+ const appDir = process.cwd();
33
+ const packageManager = yield getPackageManager(process.cwd());
34
+ const params = ["publish"];
35
+ const { tag, otp, ignoreScripts, gitChecks } = options;
36
+ if (tag) {
37
+ params.push("--tag");
38
+ params.push(tag);
39
+ }
40
+ if (otp) {
41
+ params.push("--otp");
42
+ params.push(otp);
43
+ }
44
+ if (!isMonorepo(appDir) || packageManager === "yarn" || packageManager === "npm") {
45
+ yield execaWithStreamLog(process.execPath, [CHANGESET_PATH, ...params]);
46
+ return;
47
+ }
48
+ params.push("-r");
49
+ params.push("--filter");
50
+ const pnpmVersion = yield getPnpmVersion();
51
+ if (pnpmVersion.startsWith("6")) {
52
+ params.push("./packages/");
53
+ } else {
54
+ params.push("{./packages/**}");
55
+ }
56
+ params.push("--report-summary");
57
+ if (ignoreScripts) {
58
+ params.push("--ignore-scripts");
59
+ }
60
+ if (!gitChecks) {
61
+ params.push("--no-git-checks");
62
+ }
63
+ yield execaWithStreamLog(packageManager, params);
64
+ const pnpmPublishSummaryFile = path.join(appDir, "pnpm-publish-summary.json");
65
+ const publishInfo = yield fs.readJSON(pnpmPublishSummaryFile, "utf-8");
66
+ yield Promise.all(
67
+ (publishInfo.publishedPackages || []).map(
68
+ (pkg) => gitTag(`${pkg.name}@${pkg.version}`, appDir)
69
+ )
70
+ );
71
+ yield fs.remove(pnpmPublishSummaryFile);
72
+ });
73
+ }
74
+ export {
75
+ release
76
+ };