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.
@@ -1,41 +1,41 @@
1
1
  {
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
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
- "additionalProperties": false,
40
- "required": []
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,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AmB,CAA8B;gBAGtC,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,yBAAyB;IAGxC,IAAI;IAkBJ,iBAAiB;IAMvB,QAAQ;IASR,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE;IAW1B,oBAAoB;;;;IAOpB,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) {