Skip to content

Commit

Permalink
fix(libnpmexec): fix bug not install latest pkg (#4929)
Browse files Browse the repository at this point in the history
* fix(libnpmexec): fix bug not install latest pkg

* chore: simplify code

Co-authored-by: Jordan Harband <ljharb@gmail.com>

Co-authored-by: Jordan Harband <ljharb@gmail.com>
  • Loading branch information
jihunleekr and ljharb committed Jun 1, 2022
1 parent 646b6b5 commit fcc72dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion workspaces/libnpmexec/lib/index.js
Expand Up @@ -166,7 +166,7 @@ const exec = async (opts) => {
const add = manis
.filter(mani => !mani[_localManifest])
.filter(filterMissingPackagesFromInstallDir)
.map(mani => mani._from)
.map(mani => mani._id || mani._from)
.sort((a, b) => a.localeCompare(b, 'en'))

// no need to install if already present
Expand Down
2 changes: 1 addition & 1 deletion workspaces/libnpmexec/test/index.js
Expand Up @@ -657,7 +657,7 @@ t.test('no prompt if CI, multiple packages', async t => {
warn (title, msg) {
t.equal(title, 'exec', 'should warn exec title')
const expected = 'The following packages were not found and will be ' +
'installed: @ruyadorno/create-index, @ruyadorno/create-test'
'installed: @ruyadorno/create-index@1.0.0, @ruyadorno/create-test@1.0.0'
t.equal(msg, expected, 'should warn installing pkg')
},
},
Expand Down

0 comments on commit fcc72dd

Please sign in to comment.