nx 20.0.12 → 20.0.13
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 +11 -11
- package/src/command-line/release/utils/git.js +25 -2
- package/src/core/graph/main.js +1 -1
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/project-graph/plugins/internal-api.d.ts +0 -4
- package/src/project-graph/plugins/internal-api.js +1 -6
- package/src/project-graph/plugins/isolation/messaging.d.ts +1 -5
- package/src/project-graph/plugins/isolation/plugin-pool.js +0 -22
- package/src/project-graph/plugins/isolation/plugin-worker.js +16 -15
- package/src/utils/assert-workspace-validity.js +4 -0
- package/src/utils/find-matching-projects.js +2 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "20.0.
|
3
|
+
"version": "20.0.13",
|
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": {
|
@@ -80,16 +80,16 @@
|
|
80
80
|
}
|
81
81
|
},
|
82
82
|
"optionalDependencies": {
|
83
|
-
"@nx/nx-darwin-x64": "20.0.
|
84
|
-
"@nx/nx-darwin-arm64": "20.0.
|
85
|
-
"@nx/nx-linux-x64-gnu": "20.0.
|
86
|
-
"@nx/nx-linux-x64-musl": "20.0.
|
87
|
-
"@nx/nx-win32-x64-msvc": "20.0.
|
88
|
-
"@nx/nx-linux-arm64-gnu": "20.0.
|
89
|
-
"@nx/nx-linux-arm64-musl": "20.0.
|
90
|
-
"@nx/nx-linux-arm-gnueabihf": "20.0.
|
91
|
-
"@nx/nx-win32-arm64-msvc": "20.0.
|
92
|
-
"@nx/nx-freebsd-x64": "20.0.
|
83
|
+
"@nx/nx-darwin-x64": "20.0.13",
|
84
|
+
"@nx/nx-darwin-arm64": "20.0.13",
|
85
|
+
"@nx/nx-linux-x64-gnu": "20.0.13",
|
86
|
+
"@nx/nx-linux-x64-musl": "20.0.13",
|
87
|
+
"@nx/nx-win32-x64-msvc": "20.0.13",
|
88
|
+
"@nx/nx-linux-arm64-gnu": "20.0.13",
|
89
|
+
"@nx/nx-linux-arm64-musl": "20.0.13",
|
90
|
+
"@nx/nx-linux-arm-gnueabihf": "20.0.13",
|
91
|
+
"@nx/nx-win32-arm64-msvc": "20.0.13",
|
92
|
+
"@nx/nx-freebsd-x64": "20.0.13"
|
93
93
|
},
|
94
94
|
"nx-migrations": {
|
95
95
|
"migrations": "./migrations.json",
|
@@ -15,6 +15,7 @@ exports.getFirstGitCommit = getFirstGitCommit;
|
|
15
15
|
* Special thanks to changelogen for the original inspiration for many of these utilities:
|
16
16
|
* https://github.com/unjs/changelogen
|
17
17
|
*/
|
18
|
+
const node_path_1 = require("node:path");
|
18
19
|
const utils_1 = require("../../../tasks-runner/utils");
|
19
20
|
const workspace_root_1 = require("../../../utils/workspace-root");
|
20
21
|
const exec_command_1 = require("./exec-command");
|
@@ -86,13 +87,19 @@ async function getGitDiff(from, to = 'HEAD') {
|
|
86
87
|
// Use a unique enough separator that we can be relatively certain will not occur within the commit message itself
|
87
88
|
const separator = '§§§';
|
88
89
|
// https://git-scm.com/docs/pretty-formats
|
89
|
-
const
|
90
|
+
const args = [
|
90
91
|
'--no-pager',
|
91
92
|
'log',
|
92
93
|
range,
|
93
94
|
`--pretty="----%n%s${separator}%h${separator}%an${separator}%ae%n%b"`,
|
94
95
|
'--name-status',
|
95
|
-
]
|
96
|
+
];
|
97
|
+
// Support cases where the nx workspace root is located at a nested path within the git repo
|
98
|
+
const relativePath = await getGitRootRelativePath();
|
99
|
+
if (relativePath) {
|
100
|
+
args.push(`--relative=${relativePath}`);
|
101
|
+
}
|
102
|
+
const r = await (0, exec_command_1.execCommand)('git', args);
|
96
103
|
return r
|
97
104
|
.split('----\n')
|
98
105
|
.splice(1)
|
@@ -405,3 +412,19 @@ async function getFirstGitCommit() {
|
|
405
412
|
throw new Error(`Unable to find first commit in git history`);
|
406
413
|
}
|
407
414
|
}
|
415
|
+
async function getGitRoot() {
|
416
|
+
try {
|
417
|
+
return (await (0, exec_command_1.execCommand)('git', ['rev-parse', '--show-toplevel'])).trim();
|
418
|
+
}
|
419
|
+
catch (e) {
|
420
|
+
throw new Error('Unable to find git root');
|
421
|
+
}
|
422
|
+
}
|
423
|
+
let gitRootRelativePath;
|
424
|
+
async function getGitRootRelativePath() {
|
425
|
+
if (!gitRootRelativePath) {
|
426
|
+
const gitRoot = await getGitRoot();
|
427
|
+
gitRootRelativePath = (0, node_path_1.relative)(gitRoot, workspace_root_1.workspaceRoot);
|
428
|
+
}
|
429
|
+
return gitRootRelativePath;
|
430
|
+
}
|