nx 22.1.0-canary.20251111-647d751 → 22.1.0-rc.0
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/executors.json +16 -16
- package/generators.json +13 -13
- package/migrations.json +143 -143
- package/package.json +14 -11
- package/presets/npm.json +4 -4
- package/schemas/nx-schema.json +1285 -1285
- package/schemas/project-schema.json +359 -359
- package/schemas/workspace-schema.json +165 -165
- package/src/ai/set-up-ai-agents/schema.json +31 -31
- package/src/command-line/configure-ai-agents/configure-ai-agents.d.ts.map +1 -1
- package/src/command-line/configure-ai-agents/configure-ai-agents.js +3 -1
- package/src/command-line/init/init-v2.d.ts +1 -1
- package/src/command-line/init/init-v2.d.ts.map +1 -1
- package/src/command-line/init/init-v2.js +29 -1
- package/src/command-line/migrate/migrate.d.ts.map +1 -1
- package/src/command-line/migrate/migrate.js +2 -1
- package/src/core/graph/styles.css +2 -2
- package/src/executors/noop/schema.json +8 -8
- package/src/executors/run-commands/schema.json +187 -187
- package/src/executors/run-script/schema.json +25 -25
- package/src/native/index.d.ts +0 -10
- package/src/native/nx.wasi-browser.js +53 -45
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +38 -38
- package/src/tasks-runner/tasks-schedule.d.ts.map +1 -1
- package/src/tasks-runner/tasks-schedule.js +10 -3
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
"installationSource": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"description": "Name of Nx Cloud installation invoker (ex. user, add-nx-to-monorepo, create-nx-workspace, nx-upgrade",
|
|
17
|
-
"default": "user"
|
|
18
|
-
},
|
|
19
|
-
"hideFormatLogs": {
|
|
20
|
-
"type": "boolean",
|
|
21
|
-
"description": "Hide formatting logs",
|
|
22
|
-
"x-priority": "internal"
|
|
23
|
-
},
|
|
24
|
-
"generateToken": {
|
|
25
|
-
"type": "boolean",
|
|
26
|
-
"description": "Explicitly asks for a token to be created, do not override existing tokens from Nx Cloud"
|
|
27
|
-
},
|
|
28
|
-
"github": {
|
|
29
|
-
"type": "boolean",
|
|
30
|
-
"description": "If the user will be using GitHub as their git hosting provider",
|
|
31
|
-
"default": false
|
|
32
|
-
},
|
|
33
|
-
"directory": {
|
|
34
|
-
"type": "string",
|
|
35
|
-
"description": "The directory where the workspace is located",
|
|
36
|
-
"x-priority": "internal"
|
|
37
|
-
}
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"id": "NxCloudInit",
|
|
4
|
+
"title": "Add Nx Cloud Configuration to the workspace",
|
|
5
|
+
"description": "Connect a workspace to Nx Cloud.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"cli": "nx",
|
|
8
|
+
"properties": {
|
|
9
|
+
"analytics": {
|
|
10
|
+
"type": "boolean",
|
|
11
|
+
"description": "Anonymously store hashed machine ID for task runs",
|
|
12
|
+
"default": false
|
|
38
13
|
},
|
|
39
|
-
"
|
|
40
|
-
|
|
14
|
+
"installationSource": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Name of Nx Cloud installation invoker (ex. user, add-nx-to-monorepo, create-nx-workspace, nx-upgrade",
|
|
17
|
+
"default": "user"
|
|
18
|
+
},
|
|
19
|
+
"hideFormatLogs": {
|
|
20
|
+
"type": "boolean",
|
|
21
|
+
"description": "Hide formatting logs",
|
|
22
|
+
"x-priority": "internal"
|
|
23
|
+
},
|
|
24
|
+
"generateToken": {
|
|
25
|
+
"type": "boolean",
|
|
26
|
+
"description": "Explicitly asks for a token to be created, do not override existing tokens from Nx Cloud"
|
|
27
|
+
},
|
|
28
|
+
"github": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"description": "If the user will be using GitHub as their git hosting provider",
|
|
31
|
+
"default": false
|
|
32
|
+
},
|
|
33
|
+
"directory": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "The directory where the workspace is located",
|
|
36
|
+
"x-priority": "internal"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"required": []
|
|
41
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks-schedule.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/tasks-schedule.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAKvD,MAAM,WAAW,KAAK;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,qBAAa,aAAa;IAetB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAhB1B,OAAO,CAAC,qBAAqB,CAAkB;IAC/C,OAAO,CAAC,eAAe,CAAwC;IAC/D,OAAO,CAAC,mBAAmB,CAA8B;IACzD,OAAO,CAAC,WAAW,CAAwC;IAE3D,OAAO,CAAC,gBAAgB,CAAe;IACvC,OAAO,CAAC,cAAc,CAAgB;IACtC,OAAO,CAAC,YAAY,CAAqB;IACzC,OAAO,CAAC,cAAc,CAAqB;IAC3C,OAAO,CAAC,8BAA8B,CAAqB;IAC3D,OAAO,CAAC,oBAAoB,CAA8B;IAC1D,OAAO,CAAC,mBAAmB,CAA8B;gBAGtC,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,yBAAyB;IAGxC,IAAI;IAkBJ,iBAAiB;IAMvB,QAAQ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QAAQ;IAQR,SAAS,IAAI,KAAK;IAMlB,kBAAkB,IAAI,IAAI,EAAE;YAUrB,aAAa;YAWb,YAAY;YAkDZ,eAAe;IAkB7B,OAAO,CAAC,aAAa;YAUP,qBAAqB;IA+DnC,OAAO,CAAC,uBAAuB;IAc/B,OAAO,CAAC,cAAc;IAiCf,uBAAuB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAGzD"}
|
|
@@ -128,7 +128,7 @@ class TasksSchedule {
|
|
|
128
128
|
for (const root of this.notScheduledTaskGraph.roots) {
|
|
129
129
|
const rootTask = this.notScheduledTaskGraph.tasks[root];
|
|
130
130
|
const executorName = (0, utils_1.getExecutorNameForTask)(rootTask, this.projectGraph);
|
|
131
|
-
await this.processTaskForBatches(batchMap, rootTask, executorName, true);
|
|
131
|
+
await this.processTaskForBatches(batchMap, rootTask, executorName, true, new Set());
|
|
132
132
|
}
|
|
133
133
|
for (const [executorName, taskGraph] of Object.entries(batchMap)) {
|
|
134
134
|
this.scheduleBatch({ executorName, taskGraph });
|
|
@@ -139,7 +139,11 @@ class TasksSchedule {
|
|
|
139
139
|
this.notScheduledTaskGraph = (0, utils_1.removeTasksFromTaskGraph)(this.notScheduledTaskGraph, Object.keys(taskGraph.tasks));
|
|
140
140
|
this.scheduledBatches.push({ executorName, taskGraph });
|
|
141
141
|
}
|
|
142
|
-
async processTaskForBatches(batches, task, rootExecutorName, isRoot) {
|
|
142
|
+
async processTaskForBatches(batches, task, rootExecutorName, isRoot, visitedInBatch) {
|
|
143
|
+
// Skip if already processed in this batch - prevents redundant traversals
|
|
144
|
+
if (visitedInBatch.has(task.id)) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
143
147
|
if (!this.canBatchTaskBeScheduled(task, batches[rootExecutorName])) {
|
|
144
148
|
return;
|
|
145
149
|
}
|
|
@@ -151,6 +155,9 @@ class TasksSchedule {
|
|
|
151
155
|
if (!batchImplementationFactory) {
|
|
152
156
|
return;
|
|
153
157
|
}
|
|
158
|
+
// Mark as visited only after all checks pass and we're actually adding to batch
|
|
159
|
+
// This ensures tasks can be added if they pass checks from any path
|
|
160
|
+
visitedInBatch.add(task.id);
|
|
154
161
|
const batch = (batches[rootExecutorName] =
|
|
155
162
|
batches[rootExecutorName] ??
|
|
156
163
|
{
|
|
@@ -169,7 +176,7 @@ class TasksSchedule {
|
|
|
169
176
|
}
|
|
170
177
|
for (const dep of this.reverseTaskDeps[task.id]) {
|
|
171
178
|
const depTask = this.taskGraph.tasks[dep];
|
|
172
|
-
await this.processTaskForBatches(batches, depTask, rootExecutorName, false);
|
|
179
|
+
await this.processTaskForBatches(batches, depTask, rootExecutorName, false, visitedInBatch);
|
|
173
180
|
}
|
|
174
181
|
}
|
|
175
182
|
canBatchTaskBeScheduled(task, batchTaskGraph) {
|