nx 20.4.0-canary.20250115-0ae8665 → 20.4.0-canary.20250116-a127177

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "20.4.0-canary.20250115-0ae8665",
3
+ "version": "20.4.0-canary.20250116-a127177",
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": {
@@ -82,16 +82,16 @@
82
82
  }
83
83
  },
84
84
  "optionalDependencies": {
85
- "@nx/nx-darwin-arm64": "20.4.0-canary.20250115-0ae8665",
86
- "@nx/nx-darwin-x64": "20.4.0-canary.20250115-0ae8665",
87
- "@nx/nx-freebsd-x64": "20.4.0-canary.20250115-0ae8665",
88
- "@nx/nx-linux-arm-gnueabihf": "20.4.0-canary.20250115-0ae8665",
89
- "@nx/nx-linux-arm64-gnu": "20.4.0-canary.20250115-0ae8665",
90
- "@nx/nx-linux-arm64-musl": "20.4.0-canary.20250115-0ae8665",
91
- "@nx/nx-linux-x64-gnu": "20.4.0-canary.20250115-0ae8665",
92
- "@nx/nx-linux-x64-musl": "20.4.0-canary.20250115-0ae8665",
93
- "@nx/nx-win32-arm64-msvc": "20.4.0-canary.20250115-0ae8665",
94
- "@nx/nx-win32-x64-msvc": "20.4.0-canary.20250115-0ae8665"
85
+ "@nx/nx-darwin-arm64": "20.4.0-canary.20250116-a127177",
86
+ "@nx/nx-darwin-x64": "20.4.0-canary.20250116-a127177",
87
+ "@nx/nx-freebsd-x64": "20.4.0-canary.20250116-a127177",
88
+ "@nx/nx-linux-arm-gnueabihf": "20.4.0-canary.20250116-a127177",
89
+ "@nx/nx-linux-arm64-gnu": "20.4.0-canary.20250116-a127177",
90
+ "@nx/nx-linux-arm64-musl": "20.4.0-canary.20250116-a127177",
91
+ "@nx/nx-linux-x64-gnu": "20.4.0-canary.20250116-a127177",
92
+ "@nx/nx-linux-x64-musl": "20.4.0-canary.20250116-a127177",
93
+ "@nx/nx-win32-arm64-msvc": "20.4.0-canary.20250116-a127177",
94
+ "@nx/nx-win32-x64-msvc": "20.4.0-canary.20250116-a127177"
95
95
  },
96
96
  "nx-migrations": {
97
97
  "migrations": "./migrations.json",
@@ -15,6 +15,7 @@ export interface RunOptions {
15
15
  nxBail: boolean;
16
16
  nxIgnoreCycles: boolean;
17
17
  skipNxCache: boolean;
18
+ skipRemoteCache: boolean;
18
19
  cloud: boolean;
19
20
  dte: boolean;
20
21
  batch: boolean;
@@ -75,6 +75,13 @@ function withRunOptions(yargs) {
75
75
  describe: 'Rerun the tasks even when the results are available in the cache.',
76
76
  type: 'boolean',
77
77
  default: false,
78
+ alias: 'disableNxCache',
79
+ })
80
+ .options('skipRemoteCache', {
81
+ type: 'boolean',
82
+ describe: 'Disables the remote cache.',
83
+ default: false,
84
+ alias: 'disableRemoteCache',
78
85
  })
79
86
  .options('excludeTaskDependencies', {
80
87
  describe: 'Skips running dependent tasks first.',
@@ -181,8 +181,8 @@ async function handleResult(socket, type, hrFn) {
181
181
  logger_1.serverLogger.log(`Handled ${type}. Handling time: ${doneHandlingMark.getTime() - startMark.getTime()}. Response time: ${endMark.getTime() - doneHandlingMark.getTime()}.`);
182
182
  }
183
183
  function handleInactivityTimeout() {
184
- if (numberOfOpenConnections > 0) {
185
- logger_1.serverLogger.log(`There are ${numberOfOpenConnections} open connections. Reset inactivity timer.`);
184
+ if ((0, file_watcher_sockets_1.hasRegisteredFileWatcherSockets)()) {
185
+ logger_1.serverLogger.log(`There are open file watchers. Resetting inactivity timer.`);
186
186
  (0, shutdown_utils_1.resetInactivityTimeout)(handleInactivityTimeout);
187
187
  }
188
188
  else {
Binary file
@@ -21,6 +21,7 @@ export declare class DbCache {
21
21
  private isVerbose;
22
22
  constructor(options: {
23
23
  nxCloudRemoteCache: RemoteCache;
24
+ skipRemoteCache?: boolean;
24
25
  });
25
26
  init(): Promise<void>;
26
27
  get(task: Task): Promise<CachedResult | null>;
@@ -61,6 +61,7 @@ function getCache(options) {
61
61
  ? new DbCache({
62
62
  // Remove this in Nx 21
63
63
  nxCloudRemoteCache: (0, nx_cloud_utils_1.isNxCloudUsed)(nxJson) ? options.remoteCache : null,
64
+ skipRemoteCache: options.skipRemoteCache,
64
65
  })
65
66
  : new Cache(options);
66
67
  }
@@ -132,6 +133,15 @@ class DbCache {
132
133
  return this.remoteCachePromise;
133
134
  }
134
135
  async _getRemoteCache() {
136
+ if (this.options.skipRemoteCache) {
137
+ output_1.output.warn({
138
+ title: 'Remote Cache Disabled',
139
+ bodyLines: [
140
+ 'Nx will continue running, but nothing will be written or read from the remote cache.',
141
+ ],
142
+ });
143
+ return null;
144
+ }
135
145
  const nxJson = (0, nx_json_1.readNxJson)();
136
146
  if ((0, nx_cloud_utils_1.isNxCloudUsed)(nxJson)) {
137
147
  const options = (0, get_cloud_options_1.getCloudOptions)();
@@ -211,6 +221,14 @@ class Cache {
211
221
  this.cachePath = this.createCacheDir();
212
222
  this.terminalOutputsDir = this.createTerminalOutputsDir();
213
223
  this._currentMachineId = null;
224
+ if (this.options.skipRemoteCache) {
225
+ output_1.output.warn({
226
+ title: 'Remote Cache Disabled',
227
+ bodyLines: [
228
+ 'Nx will continue running, but nothing will be written or read from the remote cache.',
229
+ ],
230
+ });
231
+ }
214
232
  }
215
233
  removeOldCacheRecords() {
216
234
  /**
@@ -255,7 +273,7 @@ class Cache {
255
273
  await this.assertLocalCacheValidity(task);
256
274
  return { ...res, remote: false };
257
275
  }
258
- else if (this.options.remoteCache) {
276
+ else if (this.options.remoteCache && !this.options.skipRemoteCache) {
259
277
  // didn't find it locally but we have a remote cache
260
278
  // attempt remote cache
261
279
  await this.options.remoteCache.retrieve(task.hash, this.cachePath);
@@ -295,7 +313,7 @@ class Cache {
295
313
  await (0, promises_1.writeFile)((0, path_1.join)(td, 'code'), code.toString());
296
314
  await (0, promises_1.writeFile)((0, path_1.join)(td, 'source'), await this.currentMachineId());
297
315
  await (0, promises_1.writeFile)(tdCommit, 'true');
298
- if (this.options.remoteCache) {
316
+ if (this.options.remoteCache && !this.options.skipRemoteCache) {
299
317
  await this.options.remoteCache.store(task.hash, this.cachePath);
300
318
  }
301
319
  if (terminalOutput) {
@@ -20,6 +20,7 @@ export interface DefaultTasksRunnerOptions {
20
20
  lifeCycle: LifeCycle;
21
21
  captureStderr?: boolean;
22
22
  skipNxCache?: boolean;
23
+ skipRemoteCache?: boolean;
23
24
  batch?: boolean;
24
25
  }
25
26
  export declare const defaultTasksRunner: TasksRunner<DefaultTasksRunnerOptions>;
@@ -27,6 +27,7 @@ export interface NxArgs {
27
27
  select?: string;
28
28
  graph?: string | boolean;
29
29
  skipNxCache?: boolean;
30
+ skipRemoteCache?: boolean;
30
31
  outputStyle?: string;
31
32
  nxBail?: boolean;
32
33
  nxIgnoreCycles?: boolean;
@@ -113,7 +113,14 @@ function splitArgsIntoNxArgsAndOverrides(args, mode, options = { printWarnings:
113
113
  nxArgs.exclude = args.exclude.split(',');
114
114
  }
115
115
  if (!nxArgs.skipNxCache) {
116
- nxArgs.skipNxCache = process.env.NX_SKIP_NX_CACHE === 'true';
116
+ nxArgs.skipNxCache =
117
+ process.env.NX_SKIP_NX_CACHE === 'true' ||
118
+ process.env.NX_DISABLE_NX_CACHE === 'true';
119
+ }
120
+ if (!nxArgs.skipRemoteCache) {
121
+ nxArgs.skipRemoteCache =
122
+ process.env.NX_DISABLE_REMOTE_CACHE === 'true' ||
123
+ process.env.NX_SKIP_REMOTE_CACHE === 'true';
117
124
  }
118
125
  normalizeNxArgsRunner(nxArgs, nxJson, options);
119
126
  nxArgs['parallel'] = (0, shared_options_1.readParallelFromArgsAndEnv)(args);