nx 23.0.0-rc.4 → 23.1.0-beta.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.
- package/README.md +1 -2
- package/dist/src/adapter/compat.d.ts +2 -2
- package/dist/src/ai/utils.d.ts +1 -1
- package/dist/src/command-line/completion/command-object.d.ts +1 -1
- package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.js +1 -0
- package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +1 -1
- package/dist/src/command-line/migrate/agentic/cli-args.d.ts +1 -1
- package/dist/src/command-line/migrate/command-object.d.ts +2 -2
- package/dist/src/command-line/migrate/migrate.d.ts +4 -4
- package/dist/src/command-line/migrate/resolve-package-version.js +3 -25
- package/dist/src/command-line/migrate/version-utils.d.ts +1 -1
- package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +14 -4
- package/dist/src/command-line/release/utils/release-graph.d.ts +2 -2
- package/dist/src/command-line/release/version/release-group-processor.d.ts +8 -8
- package/dist/src/command-line/show/show-target/info.d.ts +17 -17
- package/dist/src/command-line/yargs-utils/shared-options.d.ts +1 -1
- package/dist/src/core/graph/main.js +1 -1
- package/dist/src/core/graph/styles.js +1 -1
- package/dist/src/daemon/message-types/configure-ai-agents.d.ts +2 -2
- package/dist/src/daemon/message-types/flush-sync-generator-changes-to-disk.d.ts +1 -1
- package/dist/src/daemon/message-types/force-shutdown.d.ts +1 -1
- package/dist/src/daemon/message-types/get-context-file-data.d.ts +1 -1
- package/dist/src/daemon/message-types/get-files-in-directory.d.ts +1 -1
- package/dist/src/daemon/message-types/get-nx-workspace-files.d.ts +1 -1
- package/dist/src/daemon/message-types/get-registered-sync-generators.d.ts +1 -1
- package/dist/src/daemon/message-types/get-sync-generator-changes.d.ts +1 -1
- package/dist/src/daemon/message-types/glob.d.ts +2 -2
- package/dist/src/daemon/message-types/hash-glob.d.ts +2 -2
- package/dist/src/daemon/message-types/nx-console.d.ts +2 -2
- package/dist/src/daemon/message-types/run-tasks-execution-hooks.d.ts +2 -2
- package/dist/src/daemon/message-types/streaming-messages.d.ts +2 -2
- package/dist/src/daemon/message-types/task-history.d.ts +3 -3
- package/dist/src/daemon/message-types/update-workspace-context.d.ts +1 -1
- package/dist/src/daemon/server/handle-tasks-execution-hooks.d.ts +4 -4
- package/dist/src/executors/run-commands/run-commands.impl.d.ts +1 -1
- package/dist/src/executors/utils/convert-nx-executor.js +1 -1
- package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +1 -1
- package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
- package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts +1 -1
- package/dist/src/plugins/js/project-graph/affected/tsconfig-json-changes.js +1 -1
- package/dist/src/plugins/js/utils/register.js +5 -0
- package/dist/src/plugins/js/versions.d.ts +1 -1
- package/dist/src/plugins/js/versions.js +1 -1
- package/dist/src/project-graph/plugins/isolation/plugin-lifecycle-manager.d.ts +3 -3
- package/dist/src/utils/ab-testing.d.ts +9 -0
- package/dist/src/utils/ab-testing.js +18 -4
- package/dist/src/utils/chunkify.d.ts +1 -1
- package/dist/src/utils/legacy-task-history.d.ts +1 -1
- package/dist/src/utils/progress-topics.d.ts +1 -1
- package/dist/src/utils/sync-generators.d.ts +1 -1
- package/dist/src/utils/terminal-link.d.ts +16 -0
- package/dist/src/utils/terminal-link.js +87 -0
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -7,13 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
<div style="text-align: center;">
|
|
9
9
|
|
|
10
|
-
[](https://circleci.com/gh/nrwl/nx)
|
|
11
10
|
[]()
|
|
12
11
|
[](https://www.npmjs.com/package/nx)
|
|
13
12
|
[]()
|
|
14
13
|
[](http://commitizen.github.io/cz-cli/)
|
|
15
|
-
[](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
16
14
|
[](https://go.nx.dev/community)
|
|
15
|
+
[](https://nx.dev/docs/features/ci-features/sandboxing)
|
|
17
16
|
|
|
18
17
|
</div>
|
|
19
18
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const allowedProjectExtensions: readonly [
|
|
2
|
-
export declare const allowedWorkspaceExtensions: readonly [
|
|
1
|
+
export declare const allowedProjectExtensions: readonly ['tags', 'implicitDependencies', 'configFilePath', '$schema', 'generators', 'namedInputs', 'name', 'files', 'root', 'sourceRoot', 'projectType', 'release', 'includedScripts', 'metadata', 'owners', 'nxCloudImplicitDependencies'];
|
|
2
|
+
export declare const allowedWorkspaceExtensions: readonly ['$schema', 'implicitDependencies', 'affected', 'defaultBase', 'tasksRunnerOptions', 'workspaceLayout', 'plugins', 'targetDefaults', 'files', 'generators', 'namedInputs', 'extends', 'cli', 'pluginsConfig', 'defaultProject', 'installation', 'release', 'nxCloudAccessToken', 'nxCloudId', 'nxCloudUrl', 'nxCloudEncryptionKey', 'parallel', 'cacheDirectory', 'useDaemonProcess', 'useInferencePlugins', 'neverConnectToCloud', 'analytics', 'sync', 'migrate', 'useLegacyCache', 'maxCacheSize', 'tui', 'owners'];
|
package/dist/src/ai/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const supportedAgents: readonly [
|
|
1
|
+
export declare const supportedAgents: readonly ['claude', 'codex', 'copilot', 'cursor', 'gemini', 'opencode'];
|
|
2
2
|
export type Agent = (typeof supportedAgents)[number];
|
|
3
3
|
export declare const agentDisplayMap: Record<Agent, string>;
|
|
4
4
|
export type AgentConfiguration = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommandModule } from 'yargs';
|
|
2
|
-
declare const SHELL_CHOICES: readonly [
|
|
2
|
+
declare const SHELL_CHOICES: readonly ['bash', 'zsh', 'fish', 'powershell'];
|
|
3
3
|
type Shell = (typeof SHELL_CHOICES)[number];
|
|
4
4
|
interface CompletionArgs {
|
|
5
5
|
shell?: Shell;
|
|
@@ -20,6 +20,7 @@ const nxAngularLegacyVersionMap = {
|
|
|
20
20
|
16: '~20.1.0',
|
|
21
21
|
17: '~21.1.0',
|
|
22
22
|
18: '~22.2.0',
|
|
23
|
+
19: '~23.0.0',
|
|
23
24
|
};
|
|
24
25
|
// min major angular version supported in latest Nx
|
|
25
26
|
const minMajorAngularVersionSupported = Math.max(...Object.keys(nxAngularLegacyVersionMap).map(Number)) + 1;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tree } from '../../../../generators/tree';
|
|
2
|
-
export declare const nxWrapperPath: (p?: typeof import(
|
|
2
|
+
export declare const nxWrapperPath: (p?: typeof import('path')) => string;
|
|
3
3
|
export declare function generateDotNxSetup(version?: string): void;
|
|
4
4
|
export declare function normalizeVersionForNxJson(pkg: string, version: string): string;
|
|
5
5
|
export declare function writeMinimalNxJson(host: Tree, version: string): void;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* layer for `--agentic` validation and by the runtime as the source of truth
|
|
4
4
|
* for the {@link AgentId} union.
|
|
5
5
|
*/
|
|
6
|
-
export declare const AGENT_IDS: readonly [
|
|
6
|
+
export declare const AGENT_IDS: readonly ['claude-code', 'codex', 'opencode'];
|
|
7
7
|
export type AgentId = (typeof AGENT_IDS)[number];
|
|
8
8
|
/**
|
|
9
9
|
* Shape-only normalization of `--agentic`; validation of agent-id strings is
|
|
@@ -4,10 +4,10 @@ export declare const yargsMigrateCommand: CommandModule;
|
|
|
4
4
|
export declare const yargsInternalMigrateCommand: CommandModule;
|
|
5
5
|
export declare const DEFAULT_MIGRATION_COMMIT_PREFIX = "chore: [nx migration] ";
|
|
6
6
|
/** Allowed values for `--include` / `migrate.include`. */
|
|
7
|
-
export declare const MIGRATE_INCLUDE_VALUES: readonly [
|
|
7
|
+
export declare const MIGRATE_INCLUDE_VALUES: readonly ['required', 'optional', 'all'];
|
|
8
8
|
export type MigrateInclude = (typeof MIGRATE_INCLUDE_VALUES)[number];
|
|
9
9
|
/** Allowed values for `--multi-major-mode` / `migrate.multiMajorMode`. */
|
|
10
|
-
export declare const MULTI_MAJOR_MODES: readonly [
|
|
10
|
+
export declare const MULTI_MAJOR_MODES: readonly ['direct', 'gradual'];
|
|
11
11
|
export type MultiMajorMode = (typeof MULTI_MAJOR_MODES)[number];
|
|
12
12
|
/**
|
|
13
13
|
* The `nx migrate` args bag. Types the keys the nx.json overlay and the
|
|
@@ -68,12 +68,8 @@ export declare class Migrator {
|
|
|
68
68
|
constructor(opts: MigratorOptions);
|
|
69
69
|
private fetchMigrationConfig;
|
|
70
70
|
migrate(targetPackage: string, targetVersion: string): Promise<{
|
|
71
|
-
minVersionWithSkippedUpdates: string;
|
|
72
|
-
promptContents?: Record<string, string>;
|
|
73
71
|
packageUpdates: Record<string, PackageUpdate>;
|
|
74
72
|
migrations: {
|
|
75
|
-
package: string;
|
|
76
|
-
name: string;
|
|
77
73
|
version: string;
|
|
78
74
|
description?: string;
|
|
79
75
|
implementation?: string;
|
|
@@ -81,7 +77,11 @@ export declare class Migrator {
|
|
|
81
77
|
prompt?: string;
|
|
82
78
|
requires?: Record<string, string>;
|
|
83
79
|
documentation?: string;
|
|
80
|
+
package: string;
|
|
81
|
+
name: string;
|
|
84
82
|
}[];
|
|
83
|
+
promptContents?: Record<string, string>;
|
|
84
|
+
minVersionWithSkippedUpdates: string;
|
|
85
85
|
}>;
|
|
86
86
|
private createMigrateJson;
|
|
87
87
|
private buildPackageJsonUpdates;
|
|
@@ -137,9 +137,9 @@ async function resolveWithPolicy(packageName, version, policy, applySideEffects)
|
|
|
137
137
|
if (applySideEffects && outcome.version !== outcome.unconstrained) {
|
|
138
138
|
reportChangedOutcome(packageName, spec, outcome.version, outcome.unconstrained, policy);
|
|
139
139
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
// An immature loose pick is returned as-is. nx does not write the
|
|
141
|
+
// minimumReleaseAgeExclude entry here: migrate does not replace the install,
|
|
142
|
+
// so the real `pnpm install` (>=11.1.3) auto-writes it itself.
|
|
143
143
|
return outcome.version;
|
|
144
144
|
}
|
|
145
145
|
catch (e) {
|
|
@@ -171,28 +171,6 @@ function reportChangedOutcome(packageName, spec, picked, unconstrained, policy)
|
|
|
171
171
|
title: `Resolved ${packageName}@${picked} instead of ${unconstrained}: ${policy.sourceDescription}.`,
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
|
-
// pnpm v11 loose installs an immature version; >=11.1.3 also records it as an
|
|
175
|
-
// exclude in pnpm-workspace.yaml. Mirror that so a later real install agrees.
|
|
176
|
-
function handleImmaturePick(packageName, version, policy) {
|
|
177
|
-
if (policy.behavior.packageManager !== 'pnpm' ||
|
|
178
|
-
!policy.behavior.writesExcludes) {
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
const added = (0, pnpm_exclude_writer_1.appendMinimumReleaseAgeExcludes)(workspace_root_1.workspaceRoot, [
|
|
182
|
-
`${packageName}@${version}`,
|
|
183
|
-
]);
|
|
184
|
-
// Already present (e.g. a prior pick or a pre-existing entry): nothing written,
|
|
185
|
-
// so do not claim we added it.
|
|
186
|
-
if (added.length === 0) {
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
output_1.output.log({
|
|
190
|
-
title: `Added ${packageName}@${version} to minimumReleaseAgeExclude in pnpm-workspace.yaml.`,
|
|
191
|
-
bodyLines: [
|
|
192
|
-
`It is within the ${policy.sourceDescription} window; this mirrors what pnpm would write at install time.`,
|
|
193
|
-
],
|
|
194
|
-
});
|
|
195
|
-
}
|
|
196
174
|
async function handleViolation(packageName, error, policy) {
|
|
197
175
|
const isPnpmStrict = policy.behavior.packageManager === 'pnpm' &&
|
|
198
176
|
policy.behavior.strict &&
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const DIST_TAGS: readonly [
|
|
1
|
+
export declare const DIST_TAGS: readonly ['latest', 'next', 'canary'];
|
|
2
2
|
export type DistTag = (typeof DIST_TAGS)[number];
|
|
3
3
|
export declare function isLegacyEra(targetVersion: string): boolean;
|
|
4
4
|
export declare function normalizeVersion(version: string): string;
|
|
@@ -181,7 +181,7 @@ function sleep(ms) {
|
|
|
181
181
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
182
182
|
}
|
|
183
183
|
async function connectExistingRepoToNxCloudPrompt(command = 'init', key = 'setupNxCloud') {
|
|
184
|
-
const res = await nxCloudPrompt(key);
|
|
184
|
+
const res = await nxCloudPrompt(key, utmMediumForCommand(command));
|
|
185
185
|
await (0, ab_testing_1.recordStat)({
|
|
186
186
|
command,
|
|
187
187
|
nxVersion: versions_1.nxVersion,
|
|
@@ -200,7 +200,7 @@ async function connectExistingRepoToNxCloudPrompt(command = 'init', key = 'setup
|
|
|
200
200
|
return res;
|
|
201
201
|
}
|
|
202
202
|
async function connectToNxCloudWithPrompt(command) {
|
|
203
|
-
const setNxCloud = await nxCloudPrompt('setupNxCloud');
|
|
203
|
+
const setNxCloud = await nxCloudPrompt('setupNxCloud', utmMediumForCommand(command));
|
|
204
204
|
let useCloud = false;
|
|
205
205
|
if (setNxCloud === 'yes') {
|
|
206
206
|
useCloud = await connectToNxCloudCommand({ generateToken: false }, command);
|
|
@@ -229,7 +229,17 @@ async function connectToNxCloudWithPrompt(command) {
|
|
|
229
229
|
},
|
|
230
230
|
});
|
|
231
231
|
}
|
|
232
|
-
|
|
232
|
+
function utmMediumForCommand(command) {
|
|
233
|
+
switch (command) {
|
|
234
|
+
case 'migrate':
|
|
235
|
+
return 'nx-migrate';
|
|
236
|
+
case 'view-logs':
|
|
237
|
+
return 'nx-connect';
|
|
238
|
+
default:
|
|
239
|
+
return 'nx-init';
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
async function nxCloudPrompt(key, utmMedium) {
|
|
233
243
|
const { message, choices, initial, footer, hint } = ab_testing_1.messages.getPrompt(key);
|
|
234
244
|
const promptConfig = {
|
|
235
245
|
name: 'NxCloud',
|
|
@@ -239,7 +249,7 @@ async function nxCloudPrompt(key) {
|
|
|
239
249
|
initial,
|
|
240
250
|
}; // meeroslav: types in enquirer are not up to date
|
|
241
251
|
if (footer) {
|
|
242
|
-
promptConfig.footer = () => pc.dim(footer);
|
|
252
|
+
promptConfig.footer = () => pc.dim(`${footer} ${(0, ab_testing_1.nxCloudHyperlink)(utmMedium)}`);
|
|
243
253
|
}
|
|
244
254
|
if (hint) {
|
|
245
255
|
promptConfig.hint = () => pc.dim(hint);
|
|
@@ -48,7 +48,7 @@ export interface CreateReleaseGraphOptions {
|
|
|
48
48
|
skipVersionResolution?: boolean;
|
|
49
49
|
versionActionsOptionsOverrides?: Record<string, unknown>;
|
|
50
50
|
}
|
|
51
|
-
export declare const validReleaseVersionPrefixes: readonly [
|
|
51
|
+
export declare const validReleaseVersionPrefixes: readonly ['auto', '', '~', '^', '='];
|
|
52
52
|
/**
|
|
53
53
|
* The complete release graph containing all relationships, caches, and computed data
|
|
54
54
|
* necessary for efficient release operations across versioning, changelog, and publishing.
|
|
@@ -65,7 +65,7 @@ export declare class ReleaseGraph {
|
|
|
65
65
|
readonly projectToReleaseGroup: Map<string, ReleaseGroupWithName>;
|
|
66
66
|
readonly projectToDependents: Map<string, Set<string>>;
|
|
67
67
|
readonly projectToDependencies: Map<string, Set<string>>;
|
|
68
|
-
readonly projectToUpdateDependentsSetting: Map<string, "
|
|
68
|
+
readonly projectToUpdateDependentsSetting: Map<string, "always" | "auto" | "never">;
|
|
69
69
|
readonly groupGraph: Map<string, GroupNode>;
|
|
70
70
|
sortedReleaseGroups: string[];
|
|
71
71
|
readonly sortedProjects: Map<string, string[]>;
|
|
@@ -4,14 +4,14 @@ import { type NxReleaseConfig } from '../config/config';
|
|
|
4
4
|
import { ReleaseGraph } from '../utils/release-graph';
|
|
5
5
|
import type { VersionData } from '../utils/shared';
|
|
6
6
|
export declare const BUMP_TYPE_REASON_TEXT: {
|
|
7
|
-
readonly DEPENDENCY_WAS_BUMPED:
|
|
8
|
-
readonly USER_SPECIFIER:
|
|
9
|
-
readonly PROMPTED_USER_SPECIFIER:
|
|
10
|
-
readonly CONVENTIONAL_COMMITS:
|
|
11
|
-
readonly VERSION_PLANS:
|
|
12
|
-
readonly DEPENDENCY_ACROSS_GROUPS_WAS_BUMPED:
|
|
13
|
-
readonly OTHER_PROJECT_IN_FIXED_GROUP_WAS_BUMPED_DUE_TO_DEPENDENCY:
|
|
14
|
-
readonly NOOP_VERSION_ACTIONS:
|
|
7
|
+
readonly DEPENDENCY_WAS_BUMPED: ', because a dependency was bumped, ';
|
|
8
|
+
readonly USER_SPECIFIER: ', from the given specifier, ';
|
|
9
|
+
readonly PROMPTED_USER_SPECIFIER: ', from the prompted specifier, ';
|
|
10
|
+
readonly CONVENTIONAL_COMMITS: ', derived from conventional commits data, ';
|
|
11
|
+
readonly VERSION_PLANS: ', read from version plan {versionPlanPath}, ';
|
|
12
|
+
readonly DEPENDENCY_ACROSS_GROUPS_WAS_BUMPED: ', because a dependency project belonging to another release group was bumped, ';
|
|
13
|
+
readonly OTHER_PROJECT_IN_FIXED_GROUP_WAS_BUMPED_DUE_TO_DEPENDENCY: ', because of a dependency-only bump to another project in the same fixed release group, ';
|
|
14
|
+
readonly NOOP_VERSION_ACTIONS: ', because this project uses docker and has been configured to skip VersionActions, ';
|
|
15
15
|
};
|
|
16
16
|
interface ReleaseGroupProcessorOptions {
|
|
17
17
|
dryRun: boolean;
|
|
@@ -4,25 +4,25 @@ import { type ResolvedTarget } from './utils';
|
|
|
4
4
|
export declare function showTargetInfoHandler(args: ShowTargetBaseOptions): Promise<void>;
|
|
5
5
|
export type TargetInfoData = ReturnType<typeof resolveTargetInfoData>;
|
|
6
6
|
declare function resolveTargetInfoData(t: ResolvedTarget): {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
project: string;
|
|
8
|
+
target: string;
|
|
9
|
+
configuration?: string;
|
|
10
|
+
executor: string;
|
|
11
|
+
command?: string;
|
|
12
|
+
_commandSourceKey?: string;
|
|
13
|
+
customHasher?: boolean;
|
|
14
|
+
dependsOn?: string[];
|
|
15
|
+
_depSources?: number[];
|
|
16
|
+
transitiveTasks?: string[];
|
|
14
17
|
parallelism: boolean;
|
|
15
18
|
continuous: boolean;
|
|
16
19
|
cache: boolean;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
configuration?: string;
|
|
25
|
-
project: string;
|
|
26
|
-
target: string;
|
|
20
|
+
inputs?: (string | InputDefinition)[];
|
|
21
|
+
_inputSources?: number[];
|
|
22
|
+
outputs?: string[];
|
|
23
|
+
options: any;
|
|
24
|
+
configurations?: string[];
|
|
25
|
+
defaultConfiguration?: string;
|
|
26
|
+
sourceMap?: Record<string, [file: string, plugin: string]>;
|
|
27
27
|
};
|
|
28
28
|
export {};
|
|
@@ -67,7 +67,7 @@ export declare function withOverrides<T extends {
|
|
|
67
67
|
}>(args: T, commandLevel?: number): T & {
|
|
68
68
|
__overrides_unparsed__: string[];
|
|
69
69
|
};
|
|
70
|
-
declare const allOutputStyles: readonly [
|
|
70
|
+
declare const allOutputStyles: readonly ['tui', 'dynamic', 'dynamic-legacy', 'static', 'stream', 'stream-without-prefixes'];
|
|
71
71
|
export type OutputStyle = (typeof allOutputStyles)[number];
|
|
72
72
|
export declare function withOutputStyleOption<T>(yargs: Argv<T>, choices?: ReadonlyArray<OutputStyle>): Argv<T & {
|
|
73
73
|
outputStyle: OutputStyle;
|