Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

get correct resolved/version for remote packages #18799

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/shrinkwrap.js
Expand Up @@ -113,7 +113,7 @@ function shrinkwrapDeps (deps, top, tree, seen) {
if (child.fromBundle || child.isInLink) {
pkginfo.bundled = true
} else {
if (requested.registry) {
if (requested.registry || requested.type === 'remote') {
pkginfo.resolved = child.package._resolved
}
// no integrity for git deps as integirty hashes are based on the
Expand Down Expand Up @@ -153,7 +153,7 @@ function sortModules (modules) {
function childVersion (top, child, req) {
if (req.type === 'directory' || req.type === 'file') {
return 'file:' + unixFormatPath(path.relative(top.path, child.package._resolved || req.fetchSpec))
} else if (!req.registry && !child.fromBundle) {
} else if (req.type !== 'remote' && !req.registry && !child.fromBundle) {
return child.package._resolved || req.saveSpec || req.rawSpec
} else {
return child.package.version
Expand Down