@nx/devkit 23.2.0-beta.3 → 23.2.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -442,7 +442,11 @@ function ensurePackage(pkgOrTree, requiredVersionOrPackage, maybeRequiredVersion
|
|
|
442
442
|
return packageMapCache.get(pkg);
|
|
443
443
|
}
|
|
444
444
|
try {
|
|
445
|
-
|
|
445
|
+
// The workspace comes first so its installed version wins; `__dirname`
|
|
446
|
+
// keeps the old behaviour as a fallback. A bare `require` would only
|
|
447
|
+
// resolve from wherever `@nx/devkit` sits, which in a monorepo can be a
|
|
448
|
+
// different copy of the package than the workspace depends on.
|
|
449
|
+
return require(require.resolve(pkg, { paths: [devkit_exports_1.workspaceRoot, __dirname] }));
|
|
446
450
|
}
|
|
447
451
|
catch (e) {
|
|
448
452
|
if (e.code === 'ERR_REQUIRE_ESM') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/devkit",
|
|
3
|
-
"version": "23.2.0-beta.
|
|
3
|
+
"version": "23.2.0-beta.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"jest": "30.3.0",
|
|
62
|
-
"nx": "23.2.0-beta.
|
|
62
|
+
"nx": "23.2.0-beta.4"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"nx": ">= 22 <= 24 || ^23.0.0-0"
|