From 8134093af3c6d2b0dda1b27b8279c97df83ed864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20W=C3=BCrbach?= Date: Mon, 17 Dec 2018 14:50:57 +0100 Subject: [PATCH] Handle git branch references correctly --- lib/shrinkwrap.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/shrinkwrap.js b/lib/shrinkwrap.js index 90a4426523cab..dbb12b5bd4fba 100644 --- a/lib/shrinkwrap.js +++ b/lib/shrinkwrap.js @@ -167,6 +167,8 @@ function childVersion (top, child, req) { function childRequested (top, child, requested) { if (requested.type === 'directory' || requested.type === 'file') { return 'file:' + unixFormatPath(path.relative(top.path, child.package._resolved || requested.fetchSpec)) + } else if (requested.type === 'git' && child.package._from) { + return child.package._from } else if (!isRegistry(requested) && !child.fromBundle) { return child.package._resolved || requested.saveSpec || requested.rawSpec } else if (requested.type === 'tag') {