Skip to content

Commit 1620d6e

Browse files
authored
Use a different lerna command to accurately find changed packages (#1509)
* remove skipped packages * [AUTOMATED]: Prettier Code Styling * manually point to the latest release tag * use a different lerna command to accurately find changed packages * [AUTOMATED]: Prettier Code Styling * remove skip logic
1 parent 0c313d2 commit 1620d6e

File tree

3 files changed

+4
-34
lines changed

3 files changed

+4
-34
lines changed

scripts/release/cli.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,6 @@ const { argv } = require('yargs');
137137
);
138138
versions = await prompt(versionUpdates);
139139

140-
/**
141-
* Remove the skipped packages
142-
*/
143-
Object.keys(versions).forEach(name => {
144-
if (versions[name] === 'skip') {
145-
delete versions[name];
146-
}
147-
});
148-
149140
/**
150141
* Verify that the versions selected are correct
151142
*/

scripts/release/utils/inquirer.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -105,30 +105,6 @@ exports.packageVersionUpdate = async (package, releaseType) => {
105105
];
106106
}
107107

108-
/**
109-
* Skip a pacakage
110-
*
111-
* Reason:
112-
* Lerna doesn't work well with merge commits and may mark a package as changed
113-
* even though it's not changed except for the version bump from the last release.
114-
* https://github.com/lerna/lerna/issues/1377
115-
*
116-
* Background:
117-
* We introduced a release branch as a staging area for the next release
118-
* while development continues in the master branch. Eventually we publish the packages from
119-
* the release branch and make the version bumps in package.json and tags. It creats a merge
120-
* commit in the master branch when we merge the release branch back.
121-
*
122-
* Only skip a package if you are sure Lerna listed the package in mistake.
123-
* If you skipped a package, it won't show up in the candidate list going forward
124-
* unless additional changes are made in this package.
125-
*
126-
*/
127-
choices.push({
128-
name: chalk`Skip`,
129-
value: 'skip'
130-
});
131-
132108
/**
133109
* Create prompts
134110
*/

scripts/release/utils/lerna.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ function getLernaUpdateJson() {
2525
try {
2626
if (cache) return cache;
2727

28-
const result = await exec('lerna updated --json', {
28+
let { stdout: lastTag } = await exec('git describe --tags --abbrev=0');
29+
lastTag = lastTag.trim();
30+
31+
const result = await exec(`lerna ls --since ${lastTag} --json`, {
2932
env: npmRunPath.env(),
3033
cwd: root
3134
});

0 commit comments

Comments
 (0)