nx 20.0.4 → 20.0.6

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.4",
3
+ "version": "20.0.6",
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.4",
84
- "@nx/nx-darwin-arm64": "20.0.4",
85
- "@nx/nx-linux-x64-gnu": "20.0.4",
86
- "@nx/nx-linux-x64-musl": "20.0.4",
87
- "@nx/nx-win32-x64-msvc": "20.0.4",
88
- "@nx/nx-linux-arm64-gnu": "20.0.4",
89
- "@nx/nx-linux-arm64-musl": "20.0.4",
90
- "@nx/nx-linux-arm-gnueabihf": "20.0.4",
91
- "@nx/nx-win32-arm64-msvc": "20.0.4",
92
- "@nx/nx-freebsd-x64": "20.0.4"
83
+ "@nx/nx-darwin-x64": "20.0.6",
84
+ "@nx/nx-darwin-arm64": "20.0.6",
85
+ "@nx/nx-linux-x64-gnu": "20.0.6",
86
+ "@nx/nx-linux-x64-musl": "20.0.6",
87
+ "@nx/nx-win32-x64-msvc": "20.0.6",
88
+ "@nx/nx-linux-arm64-gnu": "20.0.6",
89
+ "@nx/nx-linux-arm64-musl": "20.0.6",
90
+ "@nx/nx-linux-arm-gnueabihf": "20.0.6",
91
+ "@nx/nx-win32-arm64-msvc": "20.0.6",
92
+ "@nx/nx-freebsd-x64": "20.0.6"
93
93
  },
94
94
  "nx-migrations": {
95
95
  "migrations": "./migrations.json",
@@ -579,7 +579,7 @@ async function createTaskGraphClientResponse(pruneExternal = false) {
579
579
  }
580
580
  const nxJson = (0, configuration_1.readNxJson)();
581
581
  perf_hooks_1.performance.mark('task graph generation:start');
582
- const taskGraphs = getAllTaskGraphsForWorkspace(nxJson, graph);
582
+ const taskGraphs = getAllTaskGraphsForWorkspace(graph);
583
583
  perf_hooks_1.performance.mark('task graph generation:end');
584
584
  const planner = new native_1.HashPlanner(nxJson, (0, native_1.transferProjectGraph)((0, transform_objects_1.transformProjectGraphForRust)(graph)));
585
585
  perf_hooks_1.performance.mark('task hash plan generation:start');
@@ -613,8 +613,7 @@ async function createExpandedTaskInputResponse(taskGraphClientResponse, depGraph
613
613
  perf_hooks_1.performance.measure('task input static generation', 'task input static generation:start', 'task input static generation:end');
614
614
  return response;
615
615
  }
616
- function getAllTaskGraphsForWorkspace(nxJson, projectGraph) {
617
- const defaultDependencyConfigs = (0, create_task_graph_1.mapTargetDefaultsToDependencies)(nxJson.targetDefaults);
616
+ function getAllTaskGraphsForWorkspace(projectGraph) {
618
617
  const taskGraphs = {};
619
618
  const taskGraphErrors = {};
620
619
  // TODO(cammisuli): improve performance here. Cache results or something.
@@ -624,7 +623,7 @@ function getAllTaskGraphsForWorkspace(nxJson, projectGraph) {
624
623
  targets.forEach((target) => {
625
624
  const taskId = createTaskId(projectName, target);
626
625
  try {
627
- taskGraphs[taskId] = (0, create_task_graph_1.createTaskGraph)(projectGraph, defaultDependencyConfigs, [projectName], [target], undefined, {});
626
+ taskGraphs[taskId] = (0, create_task_graph_1.createTaskGraph)(projectGraph, {}, [projectName], [target], undefined, {});
628
627
  }
629
628
  catch (err) {
630
629
  taskGraphs[taskId] = {
@@ -639,7 +638,7 @@ function getAllTaskGraphsForWorkspace(nxJson, projectGraph) {
639
638
  configurations.forEach((configuration) => {
640
639
  const taskId = createTaskId(projectName, target, configuration);
641
640
  try {
642
- taskGraphs[taskId] = (0, create_task_graph_1.createTaskGraph)(projectGraph, defaultDependencyConfigs, [projectName], [target], configuration, {});
641
+ taskGraphs[taskId] = (0, create_task_graph_1.createTaskGraph)(projectGraph, {}, [projectName], [target], configuration, {});
643
642
  }
644
643
  catch (err) {
645
644
  taskGraphs[taskId] = {
@@ -771,9 +770,7 @@ async function createJsonOutput(prunedGraph, rawGraph, projects, targets) {
771
770
  graph: prunedGraph,
772
771
  };
773
772
  if (targets?.length) {
774
- const nxJson = (0, configuration_1.readNxJson)();
775
- const defaultDependencyConfigs = (0, create_task_graph_1.mapTargetDefaultsToDependencies)(nxJson.targetDefaults);
776
- const taskGraph = (0, create_task_graph_1.createTaskGraph)(rawGraph, defaultDependencyConfigs, projects, targets, undefined, {});
773
+ const taskGraph = (0, create_task_graph_1.createTaskGraph)(rawGraph, {}, projects, targets, undefined, {});
777
774
  const hasher = (0, create_task_hasher_1.createTaskHasher)(rawGraph, (0, configuration_1.readNxJson)());
778
775
  let tasks = Object.values(taskGraph.tasks);
779
776
  const hashes = await hasher.hashTasks(tasks, taskGraph);
@@ -30,7 +30,7 @@ async function hashTasksThatDoNotDependOnOutputsOfOtherTasks(hasher, projectGrap
30
30
  const tasksToHash = tasksWithHashers
31
31
  .filter(({ task, customHasher }) => {
32
32
  // If a task has a custom hasher, it might depend on the outputs of other tasks
33
- if (customHasher) {
33
+ if (customHasher && customHasher.name !== 'eslint-hasher') {
34
34
  return false;
35
35
  }
36
36
  return !(taskGraph.dependencies[task.id].length > 0 &&
Binary file
@@ -33,6 +33,8 @@ export declare class DbCache {
33
33
  private _getRemoteCache;
34
34
  private getPowerpackS3Cache;
35
35
  private getPowerpackSharedCache;
36
+ private getPowerpackGcsCache;
37
+ private getPowerpackAzureCache;
36
38
  private getPowerpackCache;
37
39
  private resolvePackage;
38
40
  private assertCacheIsValid;
@@ -118,6 +118,8 @@ class DbCache {
118
118
  else {
119
119
  return ((await this.getPowerpackS3Cache()) ??
120
120
  (await this.getPowerpackSharedCache()) ??
121
+ (await this.getPowerpackGcsCache()) ??
122
+ (await this.getPowerpackAzureCache()) ??
121
123
  null);
122
124
  }
123
125
  }
@@ -127,6 +129,12 @@ class DbCache {
127
129
  getPowerpackSharedCache() {
128
130
  return this.getPowerpackCache('@nx/powerpack-shared-fs-cache');
129
131
  }
132
+ getPowerpackGcsCache() {
133
+ return this.getPowerpackCache('@nx/powerpack-gcs-cache');
134
+ }
135
+ getPowerpackAzureCache() {
136
+ return this.getPowerpackCache('@nx/powerpack-azure-cache');
137
+ }
130
138
  async getPowerpackCache(pkg) {
131
139
  let getRemoteCache = null;
132
140
  try {