* chore: use yarn 2 * chore: remove redundant yarn locks * chore: remove publishEslintPkg * chore: remove redundant make bootstrap * Update .yarnrc.yml Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com> * chore: use workspace protocol for eslint packages in the root Co-Authored-By: merceyz <merceyz@users.noreply.github.com> * chore: pin caniuse-lite versions Testcases in packages/babel-preset-env/test/fixtures/debug/browserslists-defaults-not-ie depends on specific caniuse-lite versions. We pinned the version here so we don't have to deal with fixture different in e2e-tests where all deps will be updated and tested. * chore: resolve yarn install warnings * chore: update yarn cache path on circle/travis * chore: add yarn deduplicate plugin * chore: deduplicate lock files * chore: move devDependencies to leaf packages * chore: remove @yarnpkg/plugin-constraints * chore: remove unused dedupe options * test: fix unwanted self reference * chore: remove output-file-sync dependency * chore: update browserify to 16.5.2 Co-authored-by: Kristoffer K. <merceyz@users.noreply.github.com>
25 lines
1.1 KiB
Diff
25 lines
1.1 KiB
Diff
diff --git a/index.js b/index.js
|
|
index f860af4d2..27c4ce21d 100644
|
|
--- a/index.js
|
|
+++ b/index.js
|
|
@@ -57,8 +57,18 @@ class PackageGraph extends Map {
|
|
// Yarn decided to ignore https://github.com/npm/npm/pull/15900 and implemented "link:"
|
|
// As they apparently have no intention of being compatible, we have to do it for them.
|
|
// @see https://github.com/yarnpkg/yarn/issues/4212
|
|
- const spec = graphDependencies[depName].replace(/^link:/, "file:");
|
|
+ let spec = graphDependencies[depName].replace(/^link:/, "file:");
|
|
+
|
|
+ // npa doesn't support the explicit workspace: protocol, supported by
|
|
+ // pnpm and Yarn.
|
|
+ // https://github.com/lerna/lerna/pull/2450
|
|
+ const explicitWorkspace = /^workspace:/.test(spec);
|
|
+ if (explicitWorkspace) {
|
|
+ spec = spec.replace(/^workspace:/, "");
|
|
+ }
|
|
+
|
|
const resolved = npa.resolve(depName, spec, currentNode.location);
|
|
+ resolved.explicitWorkspace = explicitWorkspace;
|
|
|
|
if (!depNode) {
|
|
// it's an external dependency, store the resolution and bail
|