nx 20.0.0-beta.1 → 20.0.0-canary.20240924-3e1a879

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "20.0.0-beta.1",
3
+ "version": "20.0.0-canary.20240924-3e1a879",
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": {
@@ -68,7 +68,7 @@
68
68
  "yargs-parser": "21.1.1",
69
69
  "node-machine-id": "1.1.12",
70
70
  "ora": "5.3.0",
71
- "@nrwl/tao": "20.0.0-beta.1"
71
+ "@nrwl/tao": "20.0.0-canary.20240924-3e1a879"
72
72
  },
73
73
  "peerDependencies": {
74
74
  "@swc-node/register": "^1.8.0",
@@ -83,16 +83,16 @@
83
83
  }
84
84
  },
85
85
  "optionalDependencies": {
86
- "@nx/nx-darwin-x64": "20.0.0-beta.1",
87
- "@nx/nx-darwin-arm64": "20.0.0-beta.1",
88
- "@nx/nx-linux-x64-gnu": "20.0.0-beta.1",
89
- "@nx/nx-linux-x64-musl": "20.0.0-beta.1",
90
- "@nx/nx-win32-x64-msvc": "20.0.0-beta.1",
91
- "@nx/nx-linux-arm64-gnu": "20.0.0-beta.1",
92
- "@nx/nx-linux-arm64-musl": "20.0.0-beta.1",
93
- "@nx/nx-linux-arm-gnueabihf": "20.0.0-beta.1",
94
- "@nx/nx-win32-arm64-msvc": "20.0.0-beta.1",
95
- "@nx/nx-freebsd-x64": "20.0.0-beta.1"
86
+ "@nx/nx-darwin-x64": "20.0.0-canary.20240924-3e1a879",
87
+ "@nx/nx-darwin-arm64": "20.0.0-canary.20240924-3e1a879",
88
+ "@nx/nx-linux-x64-gnu": "20.0.0-canary.20240924-3e1a879",
89
+ "@nx/nx-linux-x64-musl": "20.0.0-canary.20240924-3e1a879",
90
+ "@nx/nx-win32-x64-msvc": "20.0.0-canary.20240924-3e1a879",
91
+ "@nx/nx-linux-arm64-gnu": "20.0.0-canary.20240924-3e1a879",
92
+ "@nx/nx-linux-arm64-musl": "20.0.0-canary.20240924-3e1a879",
93
+ "@nx/nx-linux-arm-gnueabihf": "20.0.0-canary.20240924-3e1a879",
94
+ "@nx/nx-win32-arm64-msvc": "20.0.0-canary.20240924-3e1a879",
95
+ "@nx/nx-freebsd-x64": "20.0.0-canary.20240924-3e1a879"
96
96
  },
97
97
  "nx-migrations": {
98
98
  "migrations": "./migrations.json",
Binary file
@@ -31,6 +31,9 @@ class TaskHistoryLifeCycle {
31
31
  }
32
32
  async endCommand() {
33
33
  const entries = Array.from(this.taskRuns);
34
+ if (!this.taskHistory) {
35
+ return;
36
+ }
34
37
  await this.taskHistory.recordTaskRuns(entries.map(([_, v]) => v));
35
38
  const flakyTasks = await this.taskHistory.getFlakyTasks(entries.map(([hash]) => hash));
36
39
  if (flakyTasks.length > 0) {
@@ -13,7 +13,7 @@ class TasksSchedule {
13
13
  this.notScheduledTaskGraph = this.taskGraph;
14
14
  this.reverseTaskDeps = (0, utils_1.calculateReverseDeps)(this.taskGraph);
15
15
  this.reverseProjectGraph = (0, operators_1.reverse)(this.projectGraph);
16
- this.taskHistory = process.env.NX_DISABLE_DB !== 'true' ? (0, task_history_1.getTaskHistory)() : null;
16
+ this.taskHistory = (0, task_history_1.getTaskHistory)();
17
17
  this.scheduledBatches = [];
18
18
  this.scheduledTasks = [];
19
19
  this.runningTasks = new Set();
@@ -12,6 +12,6 @@ export declare class TaskHistory {
12
12
  }
13
13
  /**
14
14
  * This function returns the singleton instance of TaskHistory
15
- * @returns singleton instance of TaskHistory
15
+ * @returns singleton instance of TaskHistory, null if database is disabled or WASM is not enabled
16
16
  */
17
- export declare function getTaskHistory(): TaskHistory;
17
+ export declare function getTaskHistory(): TaskHistory | null;
@@ -38,9 +38,12 @@ exports.TaskHistory = TaskHistory;
38
38
  let taskHistory;
39
39
  /**
40
40
  * This function returns the singleton instance of TaskHistory
41
- * @returns singleton instance of TaskHistory
41
+ * @returns singleton instance of TaskHistory, null if database is disabled or WASM is not enabled
42
42
  */
43
43
  function getTaskHistory() {
44
+ if (process.env.NX_DISABLE_DB === 'true' || !native_1.IS_WASM) {
45
+ return null;
46
+ }
44
47
  if (!taskHistory) {
45
48
  taskHistory = new TaskHistory();
46
49
  }