File tree Expand file tree Collapse file tree
packages/js/src/executors/release-publish Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -224,14 +224,10 @@ Please update the local dependency on "${depName}" to be a valid semantic versio
224224 windowsHide : true ,
225225 } ) ;
226226
227- // `npm view`/`bun info` can exit 0 with empty stdout when the package
228- // exists in the registry but has no published versions or dist-tags yet
229- // (observed with GitHub Packages). Treat empty output the same as the
230- // package not existing yet and continue to the publish step, rather than
231- // letting `JSON.parse('')` throw "Unexpected end of JSON input" and get
232- // surfaced as an unexpected dist-tag failure. See nrwl/nx#36358.
233- const resultStr = result . toString ( ) . trim ( ) ;
234- const resultJson = resultStr ? JSON . parse ( resultStr ) : { } ;
227+ // `npm view`/`bun info` can exit 0 with empty stdout when the package exists in the registry but has
228+ // no published versions or dist-tags yet (e.g. GitHub packages). Treat empty output the samme as
229+ // package not existing yet and continue to the publish step.
230+ const resultJson = JSON . parse ( result . toString ( ) . trim ( ) || '{}' ) ;
235231 const distTags = resultJson [ 'dist-tags' ] || { } ;
236232 if ( distTags [ tag ] === currentVersion ) {
237233 console . warn (
You can’t perform that action at this time.
0 commit comments