nx 23.3.0-rc.1 → 23.3.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.
@@ -320,10 +320,10 @@ export declare class UltracacheConfigurationStore {
320
320
  import(options: UltracacheConfigurationImportOptions): UltracacheConfigurations
321
321
  /**
322
322
  * The newest stored set for `commit`, without touching the network;
323
- * `null` when none is stored, its row cannot be read, or it was fetched
324
- * more than `max_age_ms` ago. Reads only the version's summary row.
323
+ * `null` when none is stored or its row cannot be read. Reads only the
324
+ * version's summary row.
325
325
  */
326
- get(commit: string, maxAgeMs?: number | undefined | null): UltracacheConfigurations | null
326
+ get(commit: string): UltracacheConfigurations | null
327
327
  /**
328
328
  * Exactly the version of `commit` fetched at `fetched_at`; `null` when it
329
329
  * is not stored or its row cannot be read.
@@ -738,6 +738,13 @@ export declare function formatDuration(ms: number): string
738
738
 
739
739
  export declare function getBinaryTarget(): string
740
740
 
741
+ /**
742
+ * A tenth of the filesystem that holds `cache_path`, asked of that one
743
+ * filesystem through its nearest existing ancestor (the cache directory may
744
+ * not exist yet). Listing every mounted disk instead costs, on macOS, IOKit
745
+ * and CacheDelete round trips per mount on the thread that is about to run
746
+ * tasks, and those stall while disk images attach or detach.
747
+ */
741
748
  export declare function getDefaultMaxCacheSize(cachePath: string): number
742
749
 
743
750
  /** Returns the canonical event dimension names. */
Binary file
@@ -33,8 +33,9 @@ export declare function importUltracacheConfigurations(requestedCommit: string,
33
33
  export declare function openUltracacheConfigurations(commit: string, fetchedAt: number): UltracacheConfigurations | null;
34
34
  /**
35
35
  * This run's Ultracache configurations for HEAD, in the process that owns the
36
- * fetch: the stored ones while they are fresh, otherwise what Nx Cloud reads,
37
- * imported into the store. Returns `null` when Ultracache is not enabled for
38
- * this workspace; never throws.
36
+ * fetch: the newest stored set, otherwise what Nx Cloud reads, imported into
37
+ * the store. The Nx Cloud client imports a fresh set when each CI run starts,
38
+ * so a stored set is never older than its run. Returns `null` when Ultracache
39
+ * is not enabled for this workspace; never throws.
39
40
  */
40
41
  export declare function loadUltracacheConfigurationsForRun(nxJson: NxJsonConfiguration, runnerOptions: UltracacheCloudOptions, env?: UltracacheEnv): Promise<UltracacheConfigurationOutcome | null>;
@@ -24,11 +24,6 @@ function configurationsOf(outcome) {
24
24
  ? outcome.configurations
25
25
  : undefined;
26
26
  }
27
- /**
28
- * Younger sets are served without asking Nx Cloud; older ones re-fetch, since
29
- * a closer ancestor's recording may have landed.
30
- */
31
- const STORED_SET_MAX_AGE_MS = 60 * 60 * 1000;
32
27
  // Reasons that indicate misconfiguration rather than an expected offline
33
28
  // state or a client that simply predates Ultracache.
34
29
  const WARNED_REASONS = new Set([
@@ -61,9 +56,10 @@ function openUltracacheConfigurations(commit, fetchedAt) {
61
56
  }
62
57
  /**
63
58
  * This run's Ultracache configurations for HEAD, in the process that owns the
64
- * fetch: the stored ones while they are fresh, otherwise what Nx Cloud reads,
65
- * imported into the store. Returns `null` when Ultracache is not enabled for
66
- * this workspace; never throws.
59
+ * fetch: the newest stored set, otherwise what Nx Cloud reads, imported into
60
+ * the store. The Nx Cloud client imports a fresh set when each CI run starts,
61
+ * so a stored set is never older than its run. Returns `null` when Ultracache
62
+ * is not enabled for this workspace; never throws.
67
63
  */
68
64
  async function loadUltracacheConfigurationsForRun(nxJson, runnerOptions, env = (0, config_1.ultracacheEnv)()) {
69
65
  if (!(0, config_1.isUltracacheConfigurationFetchEnabled)(nxJson, runnerOptions, env)) {
@@ -76,7 +72,7 @@ async function loadUltracacheConfigurationsForRun(nxJson, runnerOptions, env = (
76
72
  try {
77
73
  const store = getUltracacheConfigurationStore();
78
74
  const cached = () => {
79
- const stored = store.get(head, STORED_SET_MAX_AGE_MS);
75
+ const stored = store.get(head);
80
76
  return (stored &&
81
77
  reportUltracacheConfigurationResolution({
82
78
  status: 'cached',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "23.3.0-rc.1",
3
+ "version": "23.3.0",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
@@ -159,16 +159,16 @@
159
159
  }
160
160
  },
161
161
  "optionalDependencies": {
162
- "@nx/nx-darwin-arm64": "23.3.0-rc.1",
163
- "@nx/nx-darwin-x64": "23.3.0-rc.1",
164
- "@nx/nx-freebsd-x64": "23.3.0-rc.1",
165
- "@nx/nx-linux-arm-gnueabihf": "23.3.0-rc.1",
166
- "@nx/nx-linux-arm64-gnu": "23.3.0-rc.1",
167
- "@nx/nx-linux-arm64-musl": "23.3.0-rc.1",
168
- "@nx/nx-linux-x64-gnu": "23.3.0-rc.1",
169
- "@nx/nx-linux-x64-musl": "23.3.0-rc.1",
170
- "@nx/nx-win32-arm64-msvc": "23.3.0-rc.1",
171
- "@nx/nx-win32-x64-msvc": "23.3.0-rc.1"
162
+ "@nx/nx-darwin-arm64": "23.3.0",
163
+ "@nx/nx-darwin-x64": "23.3.0",
164
+ "@nx/nx-freebsd-x64": "23.3.0",
165
+ "@nx/nx-linux-arm-gnueabihf": "23.3.0",
166
+ "@nx/nx-linux-arm64-gnu": "23.3.0",
167
+ "@nx/nx-linux-arm64-musl": "23.3.0",
168
+ "@nx/nx-linux-x64-gnu": "23.3.0",
169
+ "@nx/nx-linux-x64-musl": "23.3.0",
170
+ "@nx/nx-win32-arm64-msvc": "23.3.0",
171
+ "@nx/nx-win32-x64-msvc": "23.3.0"
172
172
  },
173
173
  "nx-migrations": {
174
174
  "migrations": "./migrations.json",