File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,31 @@ Object {
170170` ) ;
171171 } ) ;
172172
173+ it ( "updates command.publish.githubRelease to command.version.createRelease" , async ( ) => {
174+ const cwd = await initFixture ( "basic" ) ;
175+
176+ await fs . writeJSON ( path . resolve ( cwd , "lerna.json" ) , {
177+ command : {
178+ publish : {
179+ githubRelease : true ,
180+ } ,
181+ } ,
182+ version : "1.0.0" ,
183+ } ) ;
184+
185+ const project = new Project ( cwd ) ;
186+
187+ expect ( project . config ) . toEqual ( {
188+ command : {
189+ publish : { } ,
190+ version : {
191+ createRelease : "github" ,
192+ } ,
193+ } ,
194+ version : "1.0.0" ,
195+ } ) ;
196+ } ) ;
197+
173198 it ( "throws an error when extend target is unresolvable" , async ( ) => {
174199 const cwd = await initFixture ( "extends-unresolved" ) ;
175200
Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ const path = require("path");
77module . exports = compose (
88 // add new predicates HERE
99 remap ( "command.version.githubRelease" , "command.version.createRelease" , {
10+ toValue : value => value && "github" ,
11+ } ) ,
12+ remap ( "command.publish.githubRelease" , "command.version.createRelease" , {
1013 alsoRoot : true ,
1114 toValue : value => value && "github" ,
1215 } ) ,
You can’t perform that action at this time.
0 commit comments