nx 23.0.0 → 23.1.0-beta.1

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.
Files changed (60) hide show
  1. package/README.md +1 -2
  2. package/dist/release/changelog-renderer/index.d.ts +1 -0
  3. package/dist/release/changelog-renderer/index.js +27 -12
  4. package/dist/src/adapter/compat.d.ts +2 -2
  5. package/dist/src/ai/utils.d.ts +1 -1
  6. package/dist/src/command-line/completion/command-object.d.ts +1 -1
  7. package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.js +1 -0
  8. package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +1 -1
  9. package/dist/src/command-line/migrate/agentic/cli-args.d.ts +1 -1
  10. package/dist/src/command-line/migrate/command-object.d.ts +2 -2
  11. package/dist/src/command-line/migrate/migrate.d.ts +4 -4
  12. package/dist/src/command-line/migrate/migrate.js +2 -1
  13. package/dist/src/command-line/migrate/resolve-package-version.js +3 -25
  14. package/dist/src/command-line/migrate/update-filters.js +2 -1
  15. package/dist/src/command-line/migrate/version-utils.d.ts +1 -1
  16. package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +14 -4
  17. package/dist/src/command-line/release/utils/release-graph.d.ts +2 -2
  18. package/dist/src/command-line/release/version/release-group-processor.d.ts +8 -8
  19. package/dist/src/command-line/show/show-target/info.d.ts +17 -17
  20. package/dist/src/command-line/yargs-utils/shared-options.d.ts +1 -1
  21. package/dist/src/core/graph/main.js +1 -1
  22. package/dist/src/core/graph/styles.js +1 -1
  23. package/dist/src/daemon/message-types/configure-ai-agents.d.ts +2 -2
  24. package/dist/src/daemon/message-types/flush-sync-generator-changes-to-disk.d.ts +1 -1
  25. package/dist/src/daemon/message-types/force-shutdown.d.ts +1 -1
  26. package/dist/src/daemon/message-types/get-context-file-data.d.ts +1 -1
  27. package/dist/src/daemon/message-types/get-files-in-directory.d.ts +1 -1
  28. package/dist/src/daemon/message-types/get-nx-workspace-files.d.ts +1 -1
  29. package/dist/src/daemon/message-types/get-registered-sync-generators.d.ts +1 -1
  30. package/dist/src/daemon/message-types/get-sync-generator-changes.d.ts +1 -1
  31. package/dist/src/daemon/message-types/glob.d.ts +2 -2
  32. package/dist/src/daemon/message-types/hash-glob.d.ts +2 -2
  33. package/dist/src/daemon/message-types/nx-console.d.ts +2 -2
  34. package/dist/src/daemon/message-types/run-tasks-execution-hooks.d.ts +2 -2
  35. package/dist/src/daemon/message-types/streaming-messages.d.ts +2 -2
  36. package/dist/src/daemon/message-types/task-history.d.ts +3 -3
  37. package/dist/src/daemon/message-types/update-workspace-context.d.ts +1 -1
  38. package/dist/src/daemon/server/handle-tasks-execution-hooks.d.ts +4 -4
  39. package/dist/src/executors/run-commands/run-commands.impl.d.ts +1 -1
  40. package/dist/src/executors/utils/convert-nx-executor.js +1 -1
  41. package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +1 -1
  42. package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
  43. package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
  44. package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts +1 -1
  45. package/dist/src/plugins/js/project-graph/affected/tsconfig-json-changes.js +1 -1
  46. package/dist/src/plugins/js/utils/register.js +5 -0
  47. package/dist/src/plugins/js/versions.d.ts +1 -1
  48. package/dist/src/plugins/js/versions.js +1 -1
  49. package/dist/src/project-graph/plugins/isolation/plugin-lifecycle-manager.d.ts +3 -3
  50. package/dist/src/utils/ab-testing.d.ts +9 -0
  51. package/dist/src/utils/ab-testing.js +18 -4
  52. package/dist/src/utils/catalog/index.d.ts +7 -0
  53. package/dist/src/utils/catalog/index.js +31 -0
  54. package/dist/src/utils/chunkify.d.ts +1 -1
  55. package/dist/src/utils/legacy-task-history.d.ts +1 -1
  56. package/dist/src/utils/progress-topics.d.ts +1 -1
  57. package/dist/src/utils/sync-generators.d.ts +1 -1
  58. package/dist/src/utils/terminal-link.d.ts +16 -0
  59. package/dist/src/utils/terminal-link.js +87 -0
  60. package/package.json +15 -15
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_nx_graph_client=self.webpackChunk_nx_graph_client||[]).push([[869],{5312(){}},e=>{var n;n=5312,e(e.s=n)}]);
1
+ "use strict";(self.webpackChunk_nx_graph_client=self.webpackChunk_nx_graph_client||[]).push([[869],{8027(){}},e=>{var n;n=8027,e(e.s=n)}]);
@@ -1,4 +1,4 @@
1
- export declare const GET_CONFIGURE_AI_AGENTS_STATUS: "GET_CONFIGURE_AI_AGENTS_STATUS";
1
+ export declare const GET_CONFIGURE_AI_AGENTS_STATUS: 'GET_CONFIGURE_AI_AGENTS_STATUS';
2
2
  export type HandleGetConfigureAiAgentsStatusMessage = {
3
3
  type: typeof GET_CONFIGURE_AI_AGENTS_STATUS;
4
4
  };
@@ -13,7 +13,7 @@ export type ConfigureAiAgentsStatusResponse = {
13
13
  nonConfiguredAgents: AgentStatusInfo[];
14
14
  };
15
15
  export declare function isHandleGetConfigureAiAgentsStatusMessage(message: unknown): message is HandleGetConfigureAiAgentsStatusMessage;
16
- export declare const RESET_CONFIGURE_AI_AGENTS_STATUS: "RESET_CONFIGURE_AI_AGENTS_STATUS";
16
+ export declare const RESET_CONFIGURE_AI_AGENTS_STATUS: 'RESET_CONFIGURE_AI_AGENTS_STATUS';
17
17
  export type HandleResetConfigureAiAgentsStatusMessage = {
18
18
  type: typeof RESET_CONFIGURE_AI_AGENTS_STATUS;
19
19
  };
@@ -1,4 +1,4 @@
1
- export declare const FLUSH_SYNC_GENERATOR_CHANGES_TO_DISK: "CLEAR_CACHED_SYNC_GENERATOR_CHANGES";
1
+ export declare const FLUSH_SYNC_GENERATOR_CHANGES_TO_DISK: 'CLEAR_CACHED_SYNC_GENERATOR_CHANGES';
2
2
  export type HandleFlushSyncGeneratorChangesToDiskMessage = {
3
3
  type: typeof FLUSH_SYNC_GENERATOR_CHANGES_TO_DISK;
4
4
  generators: string[];
@@ -1,4 +1,4 @@
1
- export declare const FORCE_SHUTDOWN: "FORCE_SHUTDOWN";
1
+ export declare const FORCE_SHUTDOWN: 'FORCE_SHUTDOWN';
2
2
  export type HandleForceShutdownMessage = {
3
3
  type: typeof FORCE_SHUTDOWN;
4
4
  };
@@ -1,4 +1,4 @@
1
- export declare const GET_CONTEXT_FILE_DATA: "GET_CONTEXT_FILE_DATA";
1
+ export declare const GET_CONTEXT_FILE_DATA: 'GET_CONTEXT_FILE_DATA';
2
2
  export type HandleContextFileDataMessage = {
3
3
  type: typeof GET_CONTEXT_FILE_DATA;
4
4
  };
@@ -1,4 +1,4 @@
1
- export declare const GET_FILES_IN_DIRECTORY: "GET_FILES_IN_DIRECTORY";
1
+ export declare const GET_FILES_IN_DIRECTORY: 'GET_FILES_IN_DIRECTORY';
2
2
  export type HandleGetFilesInDirectoryMessage = {
3
3
  type: typeof GET_FILES_IN_DIRECTORY;
4
4
  dir: string;
@@ -1,4 +1,4 @@
1
- export declare const GET_NX_WORKSPACE_FILES: "GET_NX_WORKSPACE_FILES";
1
+ export declare const GET_NX_WORKSPACE_FILES: 'GET_NX_WORKSPACE_FILES';
2
2
  export type HandleNxWorkspaceFilesMessage = {
3
3
  type: typeof GET_NX_WORKSPACE_FILES;
4
4
  projectRootMap: Record<string, string>;
@@ -1,4 +1,4 @@
1
- export declare const GET_REGISTERED_SYNC_GENERATORS: "GET_REGISTERED_SYNC_GENERATORS";
1
+ export declare const GET_REGISTERED_SYNC_GENERATORS: 'GET_REGISTERED_SYNC_GENERATORS';
2
2
  export type HandleGetRegisteredSyncGeneratorsMessage = {
3
3
  type: typeof GET_REGISTERED_SYNC_GENERATORS;
4
4
  };
@@ -1,4 +1,4 @@
1
- export declare const GET_SYNC_GENERATOR_CHANGES: "GET_SYNC_GENERATOR_CHANGES";
1
+ export declare const GET_SYNC_GENERATOR_CHANGES: 'GET_SYNC_GENERATOR_CHANGES';
2
2
  export type HandleGetSyncGeneratorChangesMessage = {
3
3
  type: typeof GET_SYNC_GENERATOR_CHANGES;
4
4
  generators: string[];
@@ -1,11 +1,11 @@
1
- export declare const GLOB: "GLOB";
1
+ export declare const GLOB: 'GLOB';
2
2
  export type HandleGlobMessage = {
3
3
  type: typeof GLOB;
4
4
  globs: string[];
5
5
  exclude?: string[];
6
6
  };
7
7
  export declare function isHandleGlobMessage(message: unknown): message is HandleGlobMessage;
8
- export declare const MULTI_GLOB: "MULTI_GLOB";
8
+ export declare const MULTI_GLOB: 'MULTI_GLOB';
9
9
  export type HandleMultiGlobMessage = {
10
10
  type: typeof MULTI_GLOB;
11
11
  globs: string[];
@@ -1,11 +1,11 @@
1
- export declare const HASH_GLOB: "HASH_GLOB";
1
+ export declare const HASH_GLOB: 'HASH_GLOB';
2
2
  export type HandleHashGlobMessage = {
3
3
  type: typeof HASH_GLOB;
4
4
  globs: string[];
5
5
  exclude?: string[];
6
6
  };
7
7
  export declare function isHandleHashGlobMessage(message: unknown): message is HandleHashGlobMessage;
8
- export declare const HASH_MULTI_GLOB: "HASH_MULTI_GLOB";
8
+ export declare const HASH_MULTI_GLOB: 'HASH_MULTI_GLOB';
9
9
  export type HandleHashMultiGlobMessage = {
10
10
  type: typeof HASH_MULTI_GLOB;
11
11
  globGroups: string[][];
@@ -1,5 +1,5 @@
1
- export declare const GET_NX_CONSOLE_STATUS: "GET_NX_CONSOLE_STATUS";
2
- export declare const SET_NX_CONSOLE_PREFERENCE_AND_INSTALL: "SET_NX_CONSOLE_PREFERENCE_AND_INSTALL";
1
+ export declare const GET_NX_CONSOLE_STATUS: 'GET_NX_CONSOLE_STATUS';
2
+ export declare const SET_NX_CONSOLE_PREFERENCE_AND_INSTALL: 'SET_NX_CONSOLE_PREFERENCE_AND_INSTALL';
3
3
  export type HandleGetNxConsoleStatusMessage = {
4
4
  type: typeof GET_NX_CONSOLE_STATUS;
5
5
  };
@@ -1,6 +1,6 @@
1
1
  import type { PostTasksExecutionContext, PreTasksExecutionContext } from '../../project-graph/plugins';
2
- export declare const PRE_TASKS_EXECUTION: "PRE_TASKS_EXECUTION";
3
- export declare const POST_TASKS_EXECUTION: "POST_TASKS_EXECUTION";
2
+ export declare const PRE_TASKS_EXECUTION: 'PRE_TASKS_EXECUTION';
3
+ export declare const POST_TASKS_EXECUTION: 'POST_TASKS_EXECUTION';
4
4
  export type HandlePreTasksExecutionMessage = {
5
5
  type: typeof PRE_TASKS_EXECUTION;
6
6
  context: PreTasksExecutionContext;
@@ -1,10 +1,10 @@
1
- export declare const UPDATE_PROGRESS_MESSAGE: "UPDATE_PROGRESS_MESSAGE";
1
+ export declare const UPDATE_PROGRESS_MESSAGE: 'UPDATE_PROGRESS_MESSAGE';
2
2
  export type UpdateProgressMessage = {
3
3
  type: typeof UPDATE_PROGRESS_MESSAGE;
4
4
  message: string;
5
5
  };
6
6
  export declare function isUpdateProgressMessage(message: unknown): message is UpdateProgressMessage;
7
- export declare const EMIT_LOG: "EMIT_LOG";
7
+ export declare const EMIT_LOG: 'EMIT_LOG';
8
8
  export type EmitLogLevel = 'log' | 'warn' | 'error';
9
9
  export type EmitLogMessage = {
10
10
  type: typeof EMIT_LOG;
@@ -1,7 +1,7 @@
1
1
  import type { TaskRun, TaskTarget } from '../../native';
2
- export declare const GET_FLAKY_TASKS: "GET_FLAKY_TASKS";
3
- export declare const GET_ESTIMATED_TASK_TIMINGS: "GET_ESTIMATED_TASK_TIMINGS";
4
- export declare const RECORD_TASK_RUNS: "RECORD_TASK_RUNS";
2
+ export declare const GET_FLAKY_TASKS: 'GET_FLAKY_TASKS';
3
+ export declare const GET_ESTIMATED_TASK_TIMINGS: 'GET_ESTIMATED_TASK_TIMINGS';
4
+ export declare const RECORD_TASK_RUNS: 'RECORD_TASK_RUNS';
5
5
  export type HandleGetFlakyTasks = {
6
6
  type: typeof GET_FLAKY_TASKS;
7
7
  hashes: string[];
@@ -1,4 +1,4 @@
1
- export declare const UPDATE_WORKSPACE_CONTEXT: "UPDATE_WORKSPACE_CONTEXT";
1
+ export declare const UPDATE_WORKSPACE_CONTEXT: 'UPDATE_WORKSPACE_CONTEXT';
2
2
  export type HandleUpdateWorkspaceContextMessage = {
3
3
  type: typeof UPDATE_WORKSPACE_CONTEXT;
4
4
  createdFiles: string[];
@@ -1,19 +1,19 @@
1
1
  import type { PostTasksExecutionContext, PreTasksExecutionContext } from '../../project-graph/plugins/public-api';
2
2
  export declare function handleRunPreTasksExecution(context: PreTasksExecutionContext): Promise<{
3
+ error?: undefined;
3
4
  response: NodeJS.ProcessEnv[];
4
5
  description: string;
5
- error?: undefined;
6
6
  } | {
7
+ response?: undefined;
7
8
  error: any;
8
9
  description: string;
9
- response?: undefined;
10
10
  }>;
11
11
  export declare function handleRunPostTasksExecution(context: PostTasksExecutionContext): Promise<{
12
+ error?: undefined;
12
13
  response: string;
13
14
  description: string;
14
- error?: undefined;
15
15
  } | {
16
+ response?: undefined;
16
17
  error: any;
17
18
  description: string;
18
- response?: undefined;
19
19
  }>;
@@ -55,5 +55,5 @@ export default function (options: RunCommandsOptions, context: ExecutorContext):
55
55
  success: boolean;
56
56
  terminalOutput: string;
57
57
  }>;
58
- export declare function runCommands(options: RunCommandsOptions, context: ExecutorContext, taskId?: string): Promise<import("../../tasks-runner/pseudo-terminal").PseudoTtyProcess | NoopChildProcess | ParallelRunningTasks | SeriallyRunningTasks>;
58
+ export declare function runCommands(options: RunCommandsOptions, context: ExecutorContext, taskId?: string): Promise<NoopChildProcess | ParallelRunningTasks | import("../../tasks-runner/pseudo-terminal").PseudoTtyProcess | SeriallyRunningTasks>;
59
59
  export declare function interpolateArgsIntoCommand(command: string, opts: Pick<NormalizedRunCommandsOptions, 'args' | 'parsedArgs' | '__unparsed__' | 'unknownOptions' | 'unparsedCommandArgs'>, forwardAllArgs: boolean): string;
@@ -42,7 +42,7 @@ function convertNxExecutor(executor) {
42
42
  return require('@angular-devkit/architect').createBuilder(builderFunction);
43
43
  }
44
44
  function toObservable(promiseOrAsyncIterator) {
45
- return new (require('rxjs').Observable)((subscriber) => {
45
+ return new require('rxjs').Observable((subscriber) => {
46
46
  promiseOrAsyncIterator
47
47
  .then((value) => {
48
48
  if (!value.next) {
@@ -3,7 +3,7 @@ import type { Tree } from '../tree';
3
3
  * Creates a host for testing.
4
4
  */
5
5
  export declare function createTreeWithEmptyWorkspace(opts?: {
6
- layout?: "apps-libs";
6
+ layout?: 'apps-libs';
7
7
  }): Tree;
8
8
  /**
9
9
  * @deprecated use createTreeWithEmptyWorkspace instead
Binary file
@@ -9,6 +9,6 @@ export interface ConnectToNxCloudOptions {
9
9
  directory?: string;
10
10
  generateToken?: boolean;
11
11
  }
12
- export declare function connectToNxCloud(tree: Tree, schema: ConnectToNxCloudOptions, nxJson?: NxJsonConfiguration<string[] | "*">): Promise<string | null>;
12
+ export declare function connectToNxCloud(tree: Tree, schema: ConnectToNxCloudOptions, nxJson?: NxJsonConfiguration<"*" | string[]>): Promise<string | null>;
13
13
  declare function connectToNxCloudGenerator(tree: Tree, options: ConnectToNxCloudOptions): Promise<void>;
14
14
  export default connectToNxCloudGenerator;
@@ -45,7 +45,7 @@ function getProjectsAffectedByPaths(change, nodes) {
45
45
  const normalizedPath = path && path.startsWith('./') ? path.substring(2) : path;
46
46
  const r = project.data.root;
47
47
  const root = r && r.endsWith('/') ? r.substring(0, r.length - 1) : r;
48
- if ((normalizedPath && root && normalizedPath.startsWith(root)) ||
48
+ if ((normalizedPath && root && normalizedPath.startsWith(`${root}/`)) ||
49
49
  normalizedPath == root) {
50
50
  result.push(project.name);
51
51
  }
@@ -490,6 +490,11 @@ function getTranspiler(compilerOptions, tsConfigRaw) {
490
490
  compilerOptions.target = ts.ScriptTarget.ES2021;
491
491
  compilerOptions.inlineSourceMap = true;
492
492
  compilerOptions.skipLibCheck = true;
493
+ // TS 6 hard-errors on deprecated options set above (node10 moduleResolution);
494
+ // ignoreDeprecations exists since TS 5.0 but the value '6.0' is rejected by TS5 (TS5103).
495
+ if (parseInt(ts.versionMajorMinor, 10) >= 6) {
496
+ compilerOptions.ignoreDeprecations = '6.0';
497
+ }
493
498
  // These options are different per project, and since they are not needed for transpilation, we can remove them so we have more cache hits.
494
499
  compilerOptions.outDir = undefined;
495
500
  compilerOptions.outFile = undefined;
@@ -1 +1 @@
1
- export declare const typescriptVersion = "~5.9.2";
1
+ export declare const typescriptVersion = "~6.0.3";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.typescriptVersion = void 0;
4
- exports.typescriptVersion = '~5.9.2';
4
+ exports.typescriptVersion = '~6.0.3';
@@ -4,9 +4,9 @@
4
4
  * Hooks within each phase can execute in any order.
5
5
  */
6
6
  declare const HOOKS_BY_PHASE: {
7
- readonly graph: readonly ["createNodes", "createDependencies", "createMetadata"];
8
- readonly 'pre-task': readonly ["preTasksExecution"];
9
- readonly 'post-task': readonly ["postTasksExecution"];
7
+ readonly graph: readonly ['createNodes', 'createDependencies', 'createMetadata'];
8
+ readonly 'pre-task': readonly ['preTasksExecution'];
9
+ readonly 'post-task': readonly ['postTasksExecution'];
10
10
  };
11
11
  export type Phase = keyof typeof HOOKS_BY_PHASE;
12
12
  export type Hook = (typeof HOOKS_BY_PHASE)[Phase][number];
@@ -1,3 +1,12 @@
1
+ export declare const NX_CLOUD_URL = "https://nx.dev/nx-cloud";
2
+ /**
3
+ * Clickable Nx Cloud marketing link for cloud prompt footers. The visible text
4
+ * stays the clean `NX_CLOUD_URL` while clicks carry UTM attribution; terminals
5
+ * without OSC 8 support just render the bare URL (CLOUD-4642). The medium is
6
+ * per-command because `nx init` and `nx migrate` share a footer but report
7
+ * different mediums.
8
+ */
9
+ export declare function nxCloudHyperlink(utmMedium: string): string;
1
10
  /**
2
11
  * Meta payload types for recordStat telemetry (matches CNW format).
3
12
  */
@@ -1,13 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.messages = exports.PromptMessages = void 0;
3
+ exports.messages = exports.PromptMessages = exports.NX_CLOUD_URL = void 0;
4
+ exports.nxCloudHyperlink = nxCloudHyperlink;
4
5
  exports.recordStat = recordStat;
5
6
  const tslib_1 = require("tslib");
6
7
  const node_child_process_1 = require("node:child_process");
7
8
  const is_ci_1 = require("./is-ci");
8
9
  const package_manager_1 = require("./package-manager");
9
10
  const get_cloud_options_1 = require("../nx-cloud/utilities/get-cloud-options");
11
+ const terminal_link_1 = require("./terminal-link");
10
12
  const pc = tslib_1.__importStar(require("picocolors"));
13
+ exports.NX_CLOUD_URL = 'https://nx.dev/nx-cloud';
14
+ /**
15
+ * Clickable Nx Cloud marketing link for cloud prompt footers. The visible text
16
+ * stays the clean `NX_CLOUD_URL` while clicks carry UTM attribution; terminals
17
+ * without OSC 8 support just render the bare URL (CLOUD-4642). The medium is
18
+ * per-command because `nx init` and `nx migrate` share a footer but report
19
+ * different mediums.
20
+ */
21
+ function nxCloudHyperlink(utmMedium) {
22
+ const tracked = `${exports.NX_CLOUD_URL}?utm_source=nx-cli&utm_medium=${utmMedium}`;
23
+ return (0, terminal_link_1.terminalLink)(exports.NX_CLOUD_URL, tracked);
24
+ }
11
25
  const messageOptions = {
12
26
  setupNxCloud: [
13
27
  {
@@ -19,7 +33,7 @@ const messageOptions = {
19
33
  { value: 'skip', name: 'Skip for now' },
20
34
  { value: 'never', name: pc.dim("No, don't ask again") },
21
35
  ],
22
- footer: '\nFree for small teams. Remote caching and task distribution. 2-minute setup: https://nx.dev/nx-cloud',
36
+ footer: '\nFree for small teams. Remote caching and task distribution. 2-minute setup:',
23
37
  },
24
38
  {
25
39
  code: 'cloud-self-healing-remote-cache',
@@ -30,7 +44,7 @@ const messageOptions = {
30
44
  { value: 'skip', name: 'Skip for now' },
31
45
  { value: 'never', name: pc.dim("No, don't ask again") },
32
46
  ],
33
- footer: '\nLearn about it at https://nx.dev/nx-cloud',
47
+ footer: '\nLearn about it at',
34
48
  hint: `\n(it's free and can be disabled any time)`,
35
49
  },
36
50
  ],
@@ -47,7 +61,7 @@ const messageOptions = {
47
61
  },
48
62
  { value: 'skip', name: 'No' },
49
63
  ],
50
- footer: '\nRead more about Nx Cloud at https://nx.dev/nx-cloud',
64
+ footer: '\nRead more about Nx Cloud at',
51
65
  hint: `\n(it's free and can be disabled any time)`,
52
66
  },
53
67
  ],
@@ -1,4 +1,5 @@
1
1
  import type { Tree } from '../../generators/tree';
2
+ import type { PackageJson } from '../package-json';
2
3
  import type { CatalogManager } from './manager';
3
4
  import { getCatalogManager } from './manager-factory';
4
5
  export { type CatalogManager, getCatalogManager };
@@ -8,6 +9,12 @@ export { type CatalogManager, getCatalogManager };
8
9
  * applies). Throws when the reference cannot be resolved.
9
10
  */
10
11
  export declare function resolveCatalogReferenceIfNeeded(packageName: string, version: string): string;
12
+ /**
13
+ * Resolves a package.json's `catalog:` dependency / devDependency specifiers to
14
+ * their declared version range. Non-catalog or unresolvable specifiers are
15
+ * returned unchanged.
16
+ */
17
+ export declare function resolveCatalogSpecifiers(packageJson: PackageJson | null): PackageJson | null;
11
18
  /**
12
19
  * Detects which packages in a package.json use catalog references
13
20
  * Returns Map of package name -> catalog name (undefined for default catalog)
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getCatalogManager = void 0;
4
4
  exports.resolveCatalogReferenceIfNeeded = resolveCatalogReferenceIfNeeded;
5
+ exports.resolveCatalogSpecifiers = resolveCatalogSpecifiers;
5
6
  exports.getCatalogDependenciesFromPackageJson = getCatalogDependenciesFromPackageJson;
6
7
  const json_1 = require("../../generators/utils/json");
7
8
  const workspace_root_1 = require("../workspace-root");
@@ -23,6 +24,36 @@ function resolveCatalogReferenceIfNeeded(packageName, version) {
23
24
  }
24
25
  return resolvedVersion;
25
26
  }
27
+ /**
28
+ * Resolves a package.json's `catalog:` dependency / devDependency specifiers to
29
+ * their declared version range. Non-catalog or unresolvable specifiers are
30
+ * returned unchanged.
31
+ */
32
+ function resolveCatalogSpecifiers(packageJson) {
33
+ if (!packageJson) {
34
+ return packageJson;
35
+ }
36
+ const resolveSection = (section) => {
37
+ const resolved = {};
38
+ for (const [name, specifier] of Object.entries(section)) {
39
+ try {
40
+ resolved[name] = resolveCatalogReferenceIfNeeded(name, specifier);
41
+ }
42
+ catch {
43
+ resolved[name] = specifier;
44
+ }
45
+ }
46
+ return resolved;
47
+ };
48
+ const result = { ...packageJson };
49
+ if (packageJson.dependencies) {
50
+ result.dependencies = resolveSection(packageJson.dependencies);
51
+ }
52
+ if (packageJson.devDependencies) {
53
+ result.devDependencies = resolveSection(packageJson.devDependencies);
54
+ }
55
+ return result;
56
+ }
26
57
  /**
27
58
  * Detects which packages in a package.json use catalog references
28
59
  * Returns Map of package name -> catalog name (undefined for default catalog)
@@ -8,4 +8,4 @@ export declare function chunkify(target: string[], maxChunkLength?: number): str
8
8
  *
9
9
  * Taken from: https://github.com/lint-staged/lint-staged/blob/adf50b00669f6aac2eeca25dd28ff86a9a3c2a48/lib/index.js#L21-L37
10
10
  */
11
- export declare function getMaxArgLength(): 262144 | 8191 | 131072;
11
+ export declare function getMaxArgLength(): 8191 | 131072 | 262144;
@@ -1,4 +1,4 @@
1
- declare const taskRunKeys: readonly ["project", "target", "configuration", "hash", "code", "status", "start", "end"];
1
+ declare const taskRunKeys: readonly ['project', 'target', 'configuration', 'hash', 'code', 'status', 'start', 'end'];
2
2
  export type TaskRun = Record<(typeof taskRunKeys)[number], string>;
3
3
  export declare function getHistoryForHashes(hashes: string[]): Promise<{
4
4
  [hash: string]: TaskRun[];
@@ -14,6 +14,6 @@
14
14
  * their own streaming surfaces.
15
15
  */
16
16
  export declare const ProgressTopics: {
17
- readonly GraphConstruction: "graph-construction";
17
+ readonly GraphConstruction: 'graph-construction';
18
18
  };
19
19
  export type ProgressTopic = (typeof ProgressTopics)[keyof typeof ProgressTopics];
@@ -54,7 +54,7 @@ export declare function collectAllRegisteredSyncGenerators(projectGraph: Project
54
54
  export declare function runSyncGenerator(tree: Tree, generatorSpecifier: string, projects: Record<string, ProjectConfiguration>): Promise<SyncGeneratorRunResult>;
55
55
  export declare function collectEnabledTaskSyncGeneratorsFromProjectGraph(projectGraph: ProjectGraph, nxJson: NxJsonConfiguration): Set<string>;
56
56
  export declare function collectEnabledTaskSyncGeneratorsFromTaskGraph(taskGraph: TaskGraph, projectGraph: ProjectGraph, nxJson: NxJsonConfiguration): Set<string>;
57
- export declare function collectRegisteredGlobalSyncGenerators(nxJson?: NxJsonConfiguration<string[] | "*">): Set<string>;
57
+ export declare function collectRegisteredGlobalSyncGenerators(nxJson?: NxJsonConfiguration<"*" | string[]>): Set<string>;
58
58
  export declare function getSyncGeneratorSuccessResultsMessageLines(results: SyncGeneratorRunResult[], logOutOfSyncDetails?: boolean): string[];
59
59
  export declare function getFailedSyncGeneratorsFixMessageLines(results: SyncGeneratorRunResult[], verbose: boolean, globalGeneratorSet?: Set<string>): string[];
60
60
  export declare function getFlushFailureMessageLines(result: FlushSyncGeneratorChangesFailure, verbose: boolean, globalGeneratorSet?: Set<string>): string[];
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Wrap `text` in an OSC 8 hyperlink that points at `url`. Supported terminals
3
+ * render `text` as a clickable link to `url`; everywhere else `text` prints
4
+ * unchanged. This lets us keep tracking querystrings out of the visible output
5
+ * while still attaching them to the link target (CLOUD-4642).
6
+ */
7
+ export declare function terminalLink(text: string, url: string): string;
8
+ /**
9
+ * Exported for testing. VTE reports versions as a packed integer, e.g. "5402"
10
+ * means 0.54.2; everything else is dot-separated.
11
+ */
12
+ export declare function parseVersion(versionString?: string): {
13
+ major: number;
14
+ minor: number;
15
+ patch: number;
16
+ };
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ // Keep in sync with packages/create-nx-workspace/src/utils/terminal-link.ts.
3
+ // create-nx-workspace cannot depend on nx, so this generic OSC 8 helper is
4
+ // intentionally duplicated (same reasoning as output.ts / package-manager.ts).
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.terminalLink = terminalLink;
7
+ exports.parseVersion = parseVersion;
8
+ const OSC = '\u001B]';
9
+ const BEL = '\u0007';
10
+ const SEP = ';';
11
+ /**
12
+ * Wrap `text` in an OSC 8 hyperlink that points at `url`. Supported terminals
13
+ * render `text` as a clickable link to `url`; everywhere else `text` prints
14
+ * unchanged. This lets us keep tracking querystrings out of the visible output
15
+ * while still attaching them to the link target (CLOUD-4642).
16
+ */
17
+ function terminalLink(text, url) {
18
+ if (!supportsHyperlinks()) {
19
+ return text;
20
+ }
21
+ return [OSC, '8', SEP, SEP, url, BEL, text, OSC, '8', SEP, SEP, BEL].join('');
22
+ }
23
+ /**
24
+ * Best-effort detection of OSC 8 hyperlink support, adapted from the
25
+ * `supports-hyperlinks` package. Defaults to false when in doubt so we never
26
+ * print raw escape sequences to a terminal that can't render them.
27
+ */
28
+ function supportsHyperlinks() {
29
+ const env = process.env;
30
+ if (env.FORCE_HYPERLINK !== undefined) {
31
+ return !(env.FORCE_HYPERLINK.length > 0 && parseInt(env.FORCE_HYPERLINK, 10) === 0);
32
+ }
33
+ if (!process.stdout || !process.stdout.isTTY) {
34
+ return false;
35
+ }
36
+ if (process.platform === 'win32') {
37
+ // Only Windows Terminal advertises OSC 8 support reliably.
38
+ return Boolean(env.WT_SESSION);
39
+ }
40
+ if (env.CI || env.TEAMCITY_VERSION) {
41
+ return false;
42
+ }
43
+ if (env.TERM === 'dumb') {
44
+ return false;
45
+ }
46
+ if (env.TERM_PROGRAM) {
47
+ const version = parseVersion(env.TERM_PROGRAM_VERSION);
48
+ switch (env.TERM_PROGRAM) {
49
+ case 'iTerm.app':
50
+ return version.major === 3 ? version.minor >= 1 : version.major > 3;
51
+ case 'WezTerm':
52
+ return version.major >= 20200620;
53
+ case 'vscode':
54
+ return (version.major > 1 || (version.major === 1 && version.minor >= 72));
55
+ case 'ghostty':
56
+ return true;
57
+ }
58
+ }
59
+ if (env.VTE_VERSION) {
60
+ if (env.VTE_VERSION === '0.50.0') {
61
+ return false;
62
+ }
63
+ const version = parseVersion(env.VTE_VERSION);
64
+ return version.major > 0 || version.minor >= 50;
65
+ }
66
+ if (env.TERM === 'xterm-kitty') {
67
+ return true;
68
+ }
69
+ if (env.TERMINAL_EMULATOR === 'JetBrains-JediTerm') {
70
+ return true;
71
+ }
72
+ return false;
73
+ }
74
+ /**
75
+ * Exported for testing. VTE reports versions as a packed integer, e.g. "5402"
76
+ * means 0.54.2; everything else is dot-separated.
77
+ */
78
+ function parseVersion(versionString = '') {
79
+ if (/^\d{3,4}$/.test(versionString)) {
80
+ const m = /(\d{1,2})(\d{2})/.exec(versionString) ?? [];
81
+ return { major: 0, minor: parseInt(m[1], 10), patch: parseInt(m[2], 10) };
82
+ }
83
+ const [major = 0, minor = 0, patch = 0] = (versionString ?? '')
84
+ .split('.')
85
+ .map((n) => parseInt(n, 10) || 0);
86
+ return { major, minor, patch };
87
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "23.0.0",
3
+ "version": "23.1.0-beta.1",
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.",
@@ -94,7 +94,7 @@
94
94
  "figures": "3.2.0",
95
95
  "flat": "5.0.2",
96
96
  "follow-redirects": "1.16.0",
97
- "form-data": "4.0.5",
97
+ "form-data": "4.0.6",
98
98
  "fs-constants": "1.0.0",
99
99
  "function-bind": "1.1.2",
100
100
  "get-caller-file": "2.0.5",
@@ -104,7 +104,7 @@
104
104
  "has-flag": "4.0.0",
105
105
  "has-symbols": "1.1.0",
106
106
  "has-tostringtag": "1.0.2",
107
- "hasown": "2.0.2",
107
+ "hasown": "2.0.4",
108
108
  "ieee754": "1.2.1",
109
109
  "ignore": "7.0.5",
110
110
  "inherits": "2.0.4",
@@ -137,7 +137,7 @@
137
137
  "resolve.exports": "2.0.3",
138
138
  "restore-cursor": "3.1.0",
139
139
  "safe-buffer": "5.2.1",
140
- "semver": "7.7.4",
140
+ "semver": "7.8.4",
141
141
  "signal-exit": "3.0.7",
142
142
  "smol-toml": "1.6.1",
143
143
  "string-width": "4.2.3",
@@ -146,7 +146,7 @@
146
146
  "strip-bom": "3.0.0",
147
147
  "supports-color": "7.2.0",
148
148
  "tar-stream": "2.2.0",
149
- "tmp": "0.2.6",
149
+ "tmp": "0.2.7",
150
150
  "tsconfig-paths": "4.2.0",
151
151
  "tslib": "2.8.1",
152
152
  "util-deprecate": "1.0.2",
@@ -172,16 +172,16 @@
172
172
  }
173
173
  },
174
174
  "optionalDependencies": {
175
- "@nx/nx-darwin-arm64": "23.0.0",
176
- "@nx/nx-darwin-x64": "23.0.0",
177
- "@nx/nx-freebsd-x64": "23.0.0",
178
- "@nx/nx-linux-arm-gnueabihf": "23.0.0",
179
- "@nx/nx-linux-arm64-gnu": "23.0.0",
180
- "@nx/nx-linux-arm64-musl": "23.0.0",
181
- "@nx/nx-linux-x64-gnu": "23.0.0",
182
- "@nx/nx-linux-x64-musl": "23.0.0",
183
- "@nx/nx-win32-arm64-msvc": "23.0.0",
184
- "@nx/nx-win32-x64-msvc": "23.0.0"
175
+ "@nx/nx-darwin-arm64": "23.1.0-beta.1",
176
+ "@nx/nx-darwin-x64": "23.1.0-beta.1",
177
+ "@nx/nx-freebsd-x64": "23.1.0-beta.1",
178
+ "@nx/nx-linux-arm-gnueabihf": "23.1.0-beta.1",
179
+ "@nx/nx-linux-arm64-gnu": "23.1.0-beta.1",
180
+ "@nx/nx-linux-arm64-musl": "23.1.0-beta.1",
181
+ "@nx/nx-linux-x64-gnu": "23.1.0-beta.1",
182
+ "@nx/nx-linux-x64-musl": "23.1.0-beta.1",
183
+ "@nx/nx-win32-arm64-msvc": "23.1.0-beta.1",
184
+ "@nx/nx-win32-x64-msvc": "23.1.0-beta.1"
185
185
  },
186
186
  "nx-migrations": {
187
187
  "migrations": "./migrations.json",