mirror of
https://github.com/vector-im/element-web.git
synced 2026-03-29 01:01:48 +01:00
28 lines
1.6 KiB
Diff
28 lines
1.6 KiB
Diff
diff --git a/out/node-module-collector/moduleManager.js b/out/node-module-collector/moduleManager.js
|
|
index f483d9387a3270afc884b8478f19dd2825477a04..a718d92825b4813bc27eb10775a70d8e0731fcf7 100644
|
|
--- a/out/node-module-collector/moduleManager.js
|
|
+++ b/out/node-module-collector/moduleManager.js
|
|
@@ -5,6 +5,7 @@ const builder_util_1 = require("builder-util");
|
|
const fs = require("fs-extra");
|
|
const path = require("path");
|
|
const semver = require("semver");
|
|
+const searchModule = require("../electron/search-module");
|
|
var LogMessageByKey;
|
|
(function (LogMessageByKey) {
|
|
LogMessageByKey["PKG_DUPLICATE_REF"] = "duplicate dependency references";
|
|
@@ -115,8 +116,12 @@ class ModuleManager {
|
|
return { packageDir: path.dirname(direct), packageJson: json };
|
|
}
|
|
}
|
|
- // 2) upward hoisted search, then 3) downward non-hoisted search
|
|
- return (await this.upwardSearch(parentDir, pkgName, requiredRange)) || (await this.downwardSearch(parentDir, pkgName, requiredRange)) || null;
|
|
+ // 2) upward hoisted search, then 3) downward non-hoisted search, then 4) downward from workspace root
|
|
+ const workspaceRoot = await searchModule.getProjectRootPath(parentDir);
|
|
+ return (await this.upwardSearch(parentDir, pkgName, requiredRange)) ||
|
|
+ (await this.downwardSearch(parentDir, pkgName, requiredRange)) ||
|
|
+ (await this.downwardSearch(workspaceRoot, pkgName, requiredRange)) ||
|
|
+ null;
|
|
}
|
|
semverSatisfies(found, range) {
|
|
if ((0, builder_util_1.isEmptyOrSpaces)(range) || range === "*") {
|