Skip to content

Commit fcc72dd

Browse files
jihunleekrljharb
andauthored
fix(libnpmexec): fix bug not install latest pkg (#4929)
* fix(libnpmexec): fix bug not install latest pkg * chore: simplify code Co-authored-by: Jordan Harband <[email protected]> Co-authored-by: Jordan Harband <[email protected]>
1 parent 646b6b5 commit fcc72dd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

workspaces/libnpmexec/lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ const exec = async (opts) => {
166166
const add = manis
167167
.filter(mani => !mani[_localManifest])
168168
.filter(filterMissingPackagesFromInstallDir)
169-
.map(mani => mani._from)
169+
.map(mani => mani._id || mani._from)
170170
.sort((a, b) => a.localeCompare(b, 'en'))
171171

172172
// no need to install if already present

workspaces/libnpmexec/test/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ t.test('no prompt if CI, multiple packages', async t => {
657657
warn (title, msg) {
658658
t.equal(title, 'exec', 'should warn exec title')
659659
const expected = 'The following packages were not found and will be ' +
660-
'installed: @ruyadorno/create-index, @ruyadorno/create-test'
660+
'installed: @ruyadorno/create-index@1.0.0, @ruyadorno/create-test@1.0.0'
661661
t.equal(msg, expected, 'should warn installing pkg')
662662
},
663663
},

0 commit comments

Comments
 (0)