File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,15 @@ const { argv } = require('yargs');
137
137
) ;
138
138
versions = await prompt ( versionUpdates ) ;
139
139
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
+
140
149
/**
141
150
* Verify that the versions selected are correct
142
151
*/
Original file line number Diff line number Diff line change @@ -105,6 +105,30 @@ exports.packageVersionUpdate = async (package, releaseType) => {
105
105
] ;
106
106
}
107
107
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
+
108
132
/**
109
133
* Create prompts
110
134
*/
You can’t perform that action at this time.
0 commit comments