nx 20.4.0-canary.20250110-cbfc6fe → 20.4.0-canary.20250111-bbbfd9f
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.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "20.4.0-canary.
|
3
|
+
"version": "20.4.0-canary.20250111-bbbfd9f",
|
4
4
|
"private": false,
|
5
5
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
6
6
|
"repository": {
|
@@ -82,16 +82,16 @@
|
|
82
82
|
}
|
83
83
|
},
|
84
84
|
"optionalDependencies": {
|
85
|
-
"@nx/nx-darwin-arm64": "20.4.0-canary.
|
86
|
-
"@nx/nx-darwin-x64": "20.4.0-canary.
|
87
|
-
"@nx/nx-freebsd-x64": "20.4.0-canary.
|
88
|
-
"@nx/nx-linux-arm-gnueabihf": "20.4.0-canary.
|
89
|
-
"@nx/nx-linux-arm64-gnu": "20.4.0-canary.
|
90
|
-
"@nx/nx-linux-arm64-musl": "20.4.0-canary.
|
91
|
-
"@nx/nx-linux-x64-gnu": "20.4.0-canary.
|
92
|
-
"@nx/nx-linux-x64-musl": "20.4.0-canary.
|
93
|
-
"@nx/nx-win32-arm64-msvc": "20.4.0-canary.
|
94
|
-
"@nx/nx-win32-x64-msvc": "20.4.0-canary.
|
85
|
+
"@nx/nx-darwin-arm64": "20.4.0-canary.20250111-bbbfd9f",
|
86
|
+
"@nx/nx-darwin-x64": "20.4.0-canary.20250111-bbbfd9f",
|
87
|
+
"@nx/nx-freebsd-x64": "20.4.0-canary.20250111-bbbfd9f",
|
88
|
+
"@nx/nx-linux-arm-gnueabihf": "20.4.0-canary.20250111-bbbfd9f",
|
89
|
+
"@nx/nx-linux-arm64-gnu": "20.4.0-canary.20250111-bbbfd9f",
|
90
|
+
"@nx/nx-linux-arm64-musl": "20.4.0-canary.20250111-bbbfd9f",
|
91
|
+
"@nx/nx-linux-x64-gnu": "20.4.0-canary.20250111-bbbfd9f",
|
92
|
+
"@nx/nx-linux-x64-musl": "20.4.0-canary.20250111-bbbfd9f",
|
93
|
+
"@nx/nx-win32-arm64-msvc": "20.4.0-canary.20250111-bbbfd9f",
|
94
|
+
"@nx/nx-win32-x64-msvc": "20.4.0-canary.20250111-bbbfd9f"
|
95
95
|
},
|
96
96
|
"nx-migrations": {
|
97
97
|
"migrations": "./migrations.json",
|
Binary file
|
@@ -191,7 +191,10 @@ class TargetProjectLocator {
|
|
191
191
|
}
|
192
192
|
findDependencyInWorkspaceProjects(dep) {
|
193
193
|
this.packageEntryPointsToProjectMap ??= (0, packages_1.getPackageEntryPointsToProjectMap)(this.nodes);
|
194
|
-
return this.packageEntryPointsToProjectMap[dep]?.name ??
|
194
|
+
return (this.packageEntryPointsToProjectMap[dep]?.name ??
|
195
|
+
// if the package exports do not include ".", look for subpath exports
|
196
|
+
Object.entries(this.packageEntryPointsToProjectMap).find(([entryPoint]) => dep.startsWith(`${entryPoint}/`))?.[1]?.name ??
|
197
|
+
null);
|
195
198
|
}
|
196
199
|
resolveImportWithTypescript(normalizedImportExpr, filePath) {
|
197
200
|
let resolvedModule;
|
@@ -10,14 +10,28 @@ function getPackageEntryPointsToProjectMap(projects) {
|
|
10
10
|
continue;
|
11
11
|
}
|
12
12
|
const { packageName, packageExports } = metadata.js;
|
13
|
-
if (!packageExports ||
|
13
|
+
if (!packageExports ||
|
14
|
+
typeof packageExports === 'string' ||
|
15
|
+
!Object.keys(packageExports).length) {
|
14
16
|
// no `exports` or it points to a file, which would be the equivalent of
|
15
17
|
// an '.' export, in which case the package name is the entry point
|
16
18
|
result[packageName] = project;
|
17
19
|
}
|
18
20
|
else {
|
19
21
|
for (const entryPoint of Object.keys(packageExports)) {
|
20
|
-
|
22
|
+
// if entrypoint begins with '.', it is a relative subpath export
|
23
|
+
// otherwise, it is a conditional export
|
24
|
+
// https://nodejs.org/api/packages.html#conditional-exports
|
25
|
+
if (entryPoint.startsWith('.')) {
|
26
|
+
result[(0, posix_1.join)(packageName, entryPoint)] = project;
|
27
|
+
}
|
28
|
+
else {
|
29
|
+
result[packageName] = project;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
// if there was no '.' entrypoint, ensure the package name is matched with the project
|
33
|
+
if (!result[packageName]) {
|
34
|
+
result[packageName] = project;
|
21
35
|
}
|
22
36
|
}
|
23
37
|
}
|