@@ -10,28 +10,26 @@ const since = process.env.GITHUB_ACTION
1010 } `
1111 : "" ;
1212
13- const lernaList = JSON . parse (
14- execSync ( "lerna list --json" , { stdio : [ "ignore" , "pipe" , "ignore" ] } ) . toString ( ) ,
15- ) ;
13+ const lernaList = JSON . parse ( execSync ( "lerna list --json --loglevel error" ) ) ;
1614
1715const ref = process . env . GITHUB_SHA ?? "HEAD" ;
1816const shortSHA = execSync ( `git rev-parse --short ${ ref } ` ) . toString ( ) . trim ( ) ;
1917
2018const scopedLernaList = JSON . parse (
2119 execSync (
22- `lerna list --json --no-private --toposort --include-dependents ${
20+ `lerna list --json --no-private --toposort --loglevel error -- include-dependents ${
2321 packagePatternFromRef ? `--scope='{,*/}${ packagePatternFromRef } '` : since
2422 } `,
25- { stdio : [ "ignore" , "pipe" , "ignore" ] } ,
26- ) . toString ( ) ,
23+ ) ,
2724) ;
2825
29- const packagesFromRef = packagePatternFromRef && JSON . parse (
30- execSync (
31- `lerna list --json --no-private --scope='{,*/}${ packagePatternFromRef } '` ,
32- { stdio : [ "ignore" , "pipe" , "ignore" ] } ,
33- ) . toString ( ) ,
34- ) ;
26+ const packagesFromRef =
27+ packagePatternFromRef &&
28+ JSON . parse (
29+ execSync (
30+ `lerna list --json --no-private --loglevel error --scope='{,*/}${ packagePatternFromRef } '` ,
31+ ) ,
32+ ) ;
3533if ( packagePatternFromRef && packagesFromRef . length !== 1 ) {
3634 throw new Error ( `Lerna didn't find ${ packageFromRef } in this workspace` ) ;
3735}
@@ -40,11 +38,11 @@ const packageFromRef = packagesFromRef?.[0].name;
4038const lernaScopes = scopedLernaList . map ( ( { name } ) => [ "--scope" , name ] ) . flat ( ) ;
4139
4240module . exports = {
43- taggedRelease : packageFromRef ? {
41+ taggedRelease : packageFromRef && {
4442 name : packageFromRef ,
4543 version : versionFromRef ,
4644 tag : prereleaseFromRef ? "next" : "latest" ,
47- } : undefined ,
45+ } ,
4846 lernaList,
4947 scopedLernaList,
5048 shortSHA,
0 commit comments