nx 19.6.0-beta.4 → 19.6.0-beta.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,6 +28,7 @@ const logger_1 = require("../src/utils/logger");
28
28
  if ((0, nx_cloud_utils_1.isNxCloudUsed)((0, nx_json_1.readNxJson)())) {
29
29
  tasks.push((0, update_manager_1.verifyOrUpdateNxCloudClient)((0, get_cloud_options_1.getCloudOptions)()));
30
30
  }
31
+ process.env.NX_DAEMON = 'false';
31
32
  await Promise.all(tasks.map((promise) => {
32
33
  return promise.catch((e) => {
33
34
  if (process.env.NX_VERBOSE_LOGGING === 'true') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "19.6.0-beta.4",
3
+ "version": "19.6.0-beta.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": {
@@ -71,7 +71,7 @@
71
71
  "yargs-parser": "21.1.1",
72
72
  "node-machine-id": "1.1.12",
73
73
  "ora": "5.3.0",
74
- "@nrwl/tao": "19.6.0-beta.4"
74
+ "@nrwl/tao": "19.6.0-beta.6"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@swc-node/register": "^1.8.0",
@@ -86,16 +86,16 @@
86
86
  }
87
87
  },
88
88
  "optionalDependencies": {
89
- "@nx/nx-darwin-x64": "19.6.0-beta.4",
90
- "@nx/nx-darwin-arm64": "19.6.0-beta.4",
91
- "@nx/nx-linux-x64-gnu": "19.6.0-beta.4",
92
- "@nx/nx-linux-x64-musl": "19.6.0-beta.4",
93
- "@nx/nx-win32-x64-msvc": "19.6.0-beta.4",
94
- "@nx/nx-linux-arm64-gnu": "19.6.0-beta.4",
95
- "@nx/nx-linux-arm64-musl": "19.6.0-beta.4",
96
- "@nx/nx-linux-arm-gnueabihf": "19.6.0-beta.4",
97
- "@nx/nx-win32-arm64-msvc": "19.6.0-beta.4",
98
- "@nx/nx-freebsd-x64": "19.6.0-beta.4"
89
+ "@nx/nx-darwin-x64": "19.6.0-beta.6",
90
+ "@nx/nx-darwin-arm64": "19.6.0-beta.6",
91
+ "@nx/nx-linux-x64-gnu": "19.6.0-beta.6",
92
+ "@nx/nx-linux-x64-musl": "19.6.0-beta.6",
93
+ "@nx/nx-win32-x64-msvc": "19.6.0-beta.6",
94
+ "@nx/nx-linux-arm64-gnu": "19.6.0-beta.6",
95
+ "@nx/nx-linux-arm64-musl": "19.6.0-beta.6",
96
+ "@nx/nx-linux-arm-gnueabihf": "19.6.0-beta.6",
97
+ "@nx/nx-win32-arm64-msvc": "19.6.0-beta.6",
98
+ "@nx/nx-freebsd-x64": "19.6.0-beta.6"
99
99
  },
100
100
  "nx-migrations": {
101
101
  "migrations": "./migrations.json",
@@ -146,7 +146,7 @@ async function processFilesAndCreateAndSerializeProjectGraph(plugins) {
146
146
  perf_hooks_1.performance.mark('hash-watched-changes-start');
147
147
  const updatedFiles = [...collectedUpdatedFiles.values()];
148
148
  const deletedFiles = [...collectedDeletedFiles.values()];
149
- let updatedFileHashes = (0, workspace_context_1.updateFilesInContext)(updatedFiles, deletedFiles);
149
+ let updatedFileHashes = (0, workspace_context_1.updateFilesInContext)(workspace_root_1.workspaceRoot, updatedFiles, deletedFiles);
150
150
  perf_hooks_1.performance.mark('hash-watched-changes-end');
151
151
  perf_hooks_1.performance.measure('hash changed files from watcher', 'hash-watched-changes-start', 'hash-watched-changes-end');
152
152
  logger_1.serverLogger.requestLog(`Updated workspace context based on watched changes, recomputing project graph...`);
Binary file
@@ -118,9 +118,6 @@ async function runCommand(projectsToRun, currentProjectGraph, { nxJson }, nxArgs
118
118
  }
119
119
  async function ensureWorkspaceIsInSyncAndGetGraphs(projectGraph, nxJson, projectNames, nxArgs, overrides, extraTargetDependencies, extraOptions) {
120
120
  let taskGraph = createTaskGraphAndRunValidations(projectGraph, extraTargetDependencies ?? {}, projectNames, nxArgs, overrides, extraOptions);
121
- if (process.env.NX_ENABLE_SYNC_GENERATORS !== 'true') {
122
- return { projectGraph, taskGraph };
123
- }
124
121
  // collect unique syncGenerators from the tasks
125
122
  const uniqueSyncGenerators = new Set();
126
123
  for (const { target } of Object.values(taskGraph.tasks)) {
@@ -130,7 +130,7 @@ async function flushSyncGeneratorChangesToDisk(results) {
130
130
  }
131
131
  }
132
132
  // Update the context files
133
- await (0, workspace_context_1.updateContextWithChangedFiles)(createdFiles, updatedFiles, deletedFiles);
133
+ await (0, workspace_context_1.updateContextWithChangedFiles)(workspace_root_1.workspaceRoot, createdFiles, updatedFiles, deletedFiles);
134
134
  perf_hooks_1.performance.mark('flush-sync-generator-changes-to-disk:end');
135
135
  perf_hooks_1.performance.measure('flush sync generator changes to disk', 'flush-sync-generator-changes-to-disk:start', 'flush-sync-generator-changes-to-disk:end');
136
136
  }
@@ -11,8 +11,8 @@ export declare function getNxWorkspaceFilesFromContext(workspaceRoot: string, pr
11
11
  export declare function globWithWorkspaceContextSync(workspaceRoot: string, globs: string[], exclude?: string[]): string[];
12
12
  export declare function globWithWorkspaceContext(workspaceRoot: string, globs: string[], exclude?: string[]): Promise<string[]>;
13
13
  export declare function hashWithWorkspaceContext(workspaceRoot: string, globs: string[], exclude?: string[]): Promise<string>;
14
- export declare function updateContextWithChangedFiles(createdFiles: string[], updatedFiles: string[], deletedFiles: string[]): Promise<void>;
15
- export declare function updateFilesInContext(updatedFiles: string[], deletedFiles: string[]): Record<string, string>;
14
+ export declare function updateContextWithChangedFiles(workspaceRoot: string, createdFiles: string[], updatedFiles: string[], deletedFiles: string[]): Promise<void>;
15
+ export declare function updateFilesInContext(workspaceRoot: string, updatedFiles: string[], deletedFiles: string[]): Record<string, string>;
16
16
  export declare function getAllFileDataInContext(workspaceRoot: string): Promise<import("../native").FileData[]>;
17
17
  export declare function getFilesInDirectoryUsingContext(workspaceRoot: string, dir: string): Promise<string[]>;
18
18
  export declare function updateProjectFiles(projectRootMappings: Record<string, string>, rustReferences: NxWorkspaceFilesExternals, updatedFiles: Record<string, string>, deletedFiles: string[]): import("../native").UpdatedWorkspaceFiles;
@@ -57,9 +57,9 @@ async function hashWithWorkspaceContext(workspaceRoot, globs, exclude) {
57
57
  }
58
58
  return client_1.daemonClient.hashGlob(globs, exclude);
59
59
  }
60
- async function updateContextWithChangedFiles(createdFiles, updatedFiles, deletedFiles) {
60
+ async function updateContextWithChangedFiles(workspaceRoot, createdFiles, updatedFiles, deletedFiles) {
61
61
  if (!client_1.daemonClient.enabled()) {
62
- updateFilesInContext([...createdFiles, ...updatedFiles], deletedFiles);
62
+ updateFilesInContext(workspaceRoot, [...createdFiles, ...updatedFiles], deletedFiles);
63
63
  }
64
64
  else if ((0, is_on_daemon_1.isOnDaemon)()) {
65
65
  // make sure to only import this when running on the daemon
@@ -72,7 +72,8 @@ async function updateContextWithChangedFiles(createdFiles, updatedFiles, deleted
72
72
  await client_1.daemonClient.updateWorkspaceContext(createdFiles, updatedFiles, deletedFiles);
73
73
  }
74
74
  }
75
- function updateFilesInContext(updatedFiles, deletedFiles) {
75
+ function updateFilesInContext(workspaceRoot, updatedFiles, deletedFiles) {
76
+ ensureContextAvailable(workspaceRoot);
76
77
  return workspaceContext?.incrementalUpdate(updatedFiles, deletedFiles);
77
78
  }
78
79
  async function getAllFileDataInContext(workspaceRoot) {