| 1 |
diff --git a/index.js b/index.js |
| 2 |
index 67b997073..6e2912e9e 100644 |
| 3 |
--- a/index.js |
| 4 |
+++ b/index.js |
| 5 |
@@ -209,6 +209,11 @@ class Package { |
| 6 |
if (resolved.registry || resolved.type === "directory") { |
| 7 |
// a version (1.2.3) OR range (^1.2.3) OR directory (file:../foo-pkg) |
| 8 |
depCollection[depName] = `${savePrefix}${depVersion}`; |
| 9 |
+ |
| 10 |
+ // https://github.com/lerna/lerna/pull/2450 |
| 11 |
+ if (resolved.explicitWorkspace) { |
| 12 |
+ depCollection[depName] = `workspace:${depCollection[depName]}`; |
| 13 |
+ } |
| 14 |
} else if (resolved.gitCommittish) { |
| 15 |
// a git url with matching committish (#v1.2.3 or #1.2.3) |
| 16 |
const [tagPrefix] = /^\D*/.exec(resolved.gitCommittish); |