nx 20.7.0-canary.20250321-cad4d26 → 20.7.0-canary.20250322-1c238c0
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/native/nx.wasm32-wasi.wasm +0 -0
- package/src/tasks-runner/batch/batch-messages.d.ts +2 -0
- package/src/tasks-runner/batch/run-batch.js +2 -3
- package/src/tasks-runner/forked-process-task-runner.d.ts +2 -1
- package/src/tasks-runner/forked-process-task-runner.js +2 -1
- package/src/tasks-runner/task-orchestrator.js +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "20.7.0-canary.
|
3
|
+
"version": "20.7.0-canary.20250322-1c238c0",
|
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.7.0-canary.
|
86
|
-
"@nx/nx-darwin-x64": "20.7.0-canary.
|
87
|
-
"@nx/nx-freebsd-x64": "20.7.0-canary.
|
88
|
-
"@nx/nx-linux-arm-gnueabihf": "20.7.0-canary.
|
89
|
-
"@nx/nx-linux-arm64-gnu": "20.7.0-canary.
|
90
|
-
"@nx/nx-linux-arm64-musl": "20.7.0-canary.
|
91
|
-
"@nx/nx-linux-x64-gnu": "20.7.0-canary.
|
92
|
-
"@nx/nx-linux-x64-musl": "20.7.0-canary.
|
93
|
-
"@nx/nx-win32-arm64-msvc": "20.7.0-canary.
|
94
|
-
"@nx/nx-win32-x64-msvc": "20.7.0-canary.
|
85
|
+
"@nx/nx-darwin-arm64": "20.7.0-canary.20250322-1c238c0",
|
86
|
+
"@nx/nx-darwin-x64": "20.7.0-canary.20250322-1c238c0",
|
87
|
+
"@nx/nx-freebsd-x64": "20.7.0-canary.20250322-1c238c0",
|
88
|
+
"@nx/nx-linux-arm-gnueabihf": "20.7.0-canary.20250322-1c238c0",
|
89
|
+
"@nx/nx-linux-arm64-gnu": "20.7.0-canary.20250322-1c238c0",
|
90
|
+
"@nx/nx-linux-arm64-musl": "20.7.0-canary.20250322-1c238c0",
|
91
|
+
"@nx/nx-linux-x64-gnu": "20.7.0-canary.20250322-1c238c0",
|
92
|
+
"@nx/nx-linux-x64-musl": "20.7.0-canary.20250322-1c238c0",
|
93
|
+
"@nx/nx-win32-arm64-msvc": "20.7.0-canary.20250322-1c238c0",
|
94
|
+
"@nx/nx-win32-x64-msvc": "20.7.0-canary.20250322-1c238c0"
|
95
95
|
},
|
96
96
|
"nx-migrations": {
|
97
97
|
"migrations": "./migrations.json",
|
Binary file
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { TaskResult } from '../../config/misc-interfaces';
|
2
2
|
import type { TaskGraph } from '../../config/task-graph';
|
3
|
+
import type { ProjectGraph } from '../../config/project-graph';
|
3
4
|
export declare enum BatchMessageType {
|
4
5
|
RunTasks = 0,
|
5
6
|
CompleteTask = 1,
|
@@ -18,6 +19,7 @@ export interface BatchTaskResult {
|
|
18
19
|
export interface RunTasksMessage {
|
19
20
|
type: BatchMessageType.RunTasks;
|
20
21
|
executorName: string;
|
22
|
+
projectGraph: ProjectGraph;
|
21
23
|
batchTaskGraph: TaskGraph;
|
22
24
|
fullTaskGraph: TaskGraph;
|
23
25
|
}
|
@@ -11,9 +11,8 @@ function getBatchExecutor(executorName, projects) {
|
|
11
11
|
const [nodeModule, exportName] = executorName.split(':');
|
12
12
|
return (0, executor_utils_1.getExecutorInformation)(nodeModule, exportName, workspace_root_1.workspaceRoot, projects);
|
13
13
|
}
|
14
|
-
async function runTasks(executorName, batchTaskGraph, fullTaskGraph) {
|
14
|
+
async function runTasks(executorName, projectGraph, batchTaskGraph, fullTaskGraph) {
|
15
15
|
const input = {};
|
16
|
-
const projectGraph = await (0, project_graph_1.createProjectGraphAsync)();
|
17
16
|
const projectsConfigurations = (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph);
|
18
17
|
const nxJsonConfiguration = (0, configuration_1.readNxJson)();
|
19
18
|
const batchExecutor = getBatchExecutor(executorName, projectsConfigurations.projects);
|
@@ -66,7 +65,7 @@ async function runTasks(executorName, batchTaskGraph, fullTaskGraph) {
|
|
66
65
|
process.on('message', async (message) => {
|
67
66
|
switch (message.type) {
|
68
67
|
case batch_messages_1.BatchMessageType.RunTasks: {
|
69
|
-
const results = await runTasks(message.executorName, message.batchTaskGraph, message.fullTaskGraph);
|
68
|
+
const results = await runTasks(message.executorName, message.projectGraph, message.batchTaskGraph, message.fullTaskGraph);
|
70
69
|
process.send({
|
71
70
|
type: batch_messages_1.BatchMessageType.CompleteBatchExecution,
|
72
71
|
results,
|
@@ -2,6 +2,7 @@ import { DefaultTasksRunnerOptions } from './default-tasks-runner';
|
|
2
2
|
import { Batch } from './tasks-schedule';
|
3
3
|
import { BatchResults } from './batch/batch-messages';
|
4
4
|
import { Task, TaskGraph } from '../config/task-graph';
|
5
|
+
import { ProjectGraph } from '../config/project-graph';
|
5
6
|
export declare class ForkedProcessTaskRunner {
|
6
7
|
private readonly options;
|
7
8
|
cliPath: string;
|
@@ -10,7 +11,7 @@ export declare class ForkedProcessTaskRunner {
|
|
10
11
|
private pseudoTerminal;
|
11
12
|
constructor(options: DefaultTasksRunnerOptions);
|
12
13
|
init(): Promise<void>;
|
13
|
-
forkProcessForBatch({ executorName, taskGraph: batchTaskGraph }: Batch, fullTaskGraph: TaskGraph, env: NodeJS.ProcessEnv): Promise<BatchResults>;
|
14
|
+
forkProcessForBatch({ executorName, taskGraph: batchTaskGraph }: Batch, projectGraph: ProjectGraph, fullTaskGraph: TaskGraph, env: NodeJS.ProcessEnv): Promise<BatchResults>;
|
14
15
|
forkProcessLegacy(task: Task, { temporaryOutputPath, streamOutput, pipeOutput, taskGraph, env, }: {
|
15
16
|
temporaryOutputPath: string;
|
16
17
|
streamOutput: boolean;
|
@@ -31,7 +31,7 @@ class ForkedProcessTaskRunner {
|
|
31
31
|
this.setupProcessEventListeners();
|
32
32
|
}
|
33
33
|
// TODO: vsavkin delegate terminal output printing
|
34
|
-
forkProcessForBatch({ executorName, taskGraph: batchTaskGraph }, fullTaskGraph, env) {
|
34
|
+
forkProcessForBatch({ executorName, taskGraph: batchTaskGraph }, projectGraph, fullTaskGraph, env) {
|
35
35
|
return new Promise((res, rej) => {
|
36
36
|
try {
|
37
37
|
const count = Object.keys(batchTaskGraph.tasks).length;
|
@@ -83,6 +83,7 @@ class ForkedProcessTaskRunner {
|
|
83
83
|
p.send({
|
84
84
|
type: batch_messages_1.BatchMessageType.RunTasks,
|
85
85
|
executorName,
|
86
|
+
projectGraph,
|
86
87
|
batchTaskGraph,
|
87
88
|
fullTaskGraph,
|
88
89
|
});
|
@@ -182,7 +182,7 @@ class TaskOrchestrator {
|
|
182
182
|
}
|
183
183
|
async runBatch(batch, env) {
|
184
184
|
try {
|
185
|
-
const results = await this.forkedProcessTaskRunner.forkProcessForBatch(batch, this.taskGraph, env);
|
185
|
+
const results = await this.forkedProcessTaskRunner.forkProcessForBatch(batch, this.projectGraph, this.taskGraph, env);
|
186
186
|
const batchResultEntries = Object.entries(results);
|
187
187
|
return batchResultEntries.map(([taskId, result]) => ({
|
188
188
|
...result,
|