@@ -612,7 +612,7 @@ async function addOverrides(
612612 )
613613 }
614614 if ( spinner ) {
615- spinner . text = `Adding overrides${ workspaceName ? ` to ${ workspaceName } ` : '' } ...`
615+ spinner . text = `Adding overrides${ isWorkspace ? ` to ${ workspaceName } ` : '' } ...`
616616 }
617617 const depAliasMap = new Map < string , { id : string ; version : string } > ( )
618618 // Chunk package names to process them in parallel 3 at a time.
@@ -635,7 +635,9 @@ async function addOverrides(
635635 pkgSpec = `${ regSpecStartsLike } ^${ version } `
636636 depObj [ origPkgName ] = pkgSpec
637637 state . added . add ( regPkgName )
638- state . addedInWorkspaces . add ( workspaceName )
638+ if ( isWorkspace ) {
639+ state . addedInWorkspaces . add ( workspaceName )
640+ }
639641 }
640642 depAliasMap . set ( origPkgName , {
641643 id : pkgSpec ,
@@ -681,12 +683,11 @@ async function addOverrides(
681683 }
682684 if ( newSpec !== oldSpec ) {
683685 overrides [ origPkgName ] = newSpec
684- if ( overrideExists ) {
685- state . updated . add ( regPkgName )
686- state . updatedInWorkspaces . add ( workspaceName )
687- } else {
688- state . added . add ( regPkgName )
689- state . addedInWorkspaces . add ( workspaceName )
686+ const addedOrUpdated = overrideExists ? 'updated' : 'added'
687+ state [ addedOrUpdated ] . add ( regPkgName )
688+ if ( isWorkspace ) {
689+ const addedOrUpdatedIn = overrideExists ? 'updatedInWorkspaces' : 'addedInWorkspaces'
690+ state [ addedOrUpdatedIn ] . add ( workspaceName )
690691 }
691692 }
692693 }
0 commit comments