nx 22.0.0-beta.2 → 22.0.0-beta.4
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/migrations.json +5 -0
- package/package.json +12 -12
- package/project.json +2 -1
- package/schemas/nx-schema.json +268 -162
- package/schemas/project-schema.json +72 -12
- package/src/adapter/angular-json.d.ts.map +1 -1
- package/src/adapter/angular-json.js +13 -17
- package/src/command-line/configure-ai-agents/command-object.d.ts +1 -1
- package/src/command-line/configure-ai-agents/command-object.d.ts.map +1 -1
- package/src/command-line/configure-ai-agents/command-object.js +18 -4
- package/src/command-line/configure-ai-agents/configure-ai-agents.d.ts.map +1 -1
- package/src/command-line/configure-ai-agents/configure-ai-agents.js +58 -31
- package/src/command-line/init/init-v2.js +1 -1
- package/src/command-line/nx-cloud/login/command-object.d.ts.map +1 -1
- package/src/command-line/nx-cloud/login/command-object.js +2 -2
- package/src/command-line/nx-cloud/logout/command-object.js +1 -1
- package/src/command-line/release/changelog.d.ts.map +1 -1
- package/src/command-line/release/changelog.js +41 -32
- package/src/command-line/release/command-object.d.ts +7 -9
- package/src/command-line/release/command-object.d.ts.map +1 -1
- package/src/command-line/release/config/config.d.ts +1 -1
- package/src/command-line/release/config/config.d.ts.map +1 -1
- package/src/command-line/release/config/config.js +55 -133
- package/src/command-line/release/config/version-plans.d.ts.map +1 -1
- package/src/command-line/release/config/version-plans.js +4 -1
- package/src/command-line/release/plan-check.d.ts.map +1 -1
- package/src/command-line/release/plan-check.js +1 -3
- package/src/command-line/release/plan.d.ts.map +1 -1
- package/src/command-line/release/plan.js +1 -3
- package/src/command-line/release/publish.d.ts.map +1 -1
- package/src/command-line/release/publish.js +36 -14
- package/src/command-line/release/release.d.ts.map +1 -1
- package/src/command-line/release/release.js +32 -33
- package/src/command-line/release/utils/git.d.ts.map +1 -1
- package/src/command-line/release/utils/git.js +3 -1
- package/src/command-line/release/utils/release-graph.d.ts +219 -0
- package/src/command-line/release/utils/release-graph.d.ts.map +1 -0
- package/src/command-line/release/utils/release-graph.js +658 -0
- package/src/command-line/release/utils/resolve-semver-specifier.d.ts +2 -1
- package/src/command-line/release/utils/resolve-semver-specifier.d.ts.map +1 -1
- package/src/command-line/release/utils/semver.d.ts +14 -9
- package/src/command-line/release/utils/semver.d.ts.map +1 -1
- package/src/command-line/release/utils/semver.js +29 -25
- package/src/command-line/release/utils/shared.d.ts +5 -2
- package/src/command-line/release/utils/shared.d.ts.map +1 -1
- package/src/command-line/release/utils/shared.js +82 -26
- package/src/command-line/release/utils/test/test-utils.d.ts +20 -0
- package/src/command-line/release/utils/test/test-utils.d.ts.map +1 -0
- package/src/command-line/release/utils/test/test-utils.js +24 -0
- package/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts.map +1 -1
- package/src/command-line/release/version/derive-specifier-from-conventional-commits.js +10 -1
- package/src/command-line/release/version/release-group-processor.d.ts +3 -152
- package/src/command-line/release/version/release-group-processor.d.ts.map +1 -1
- package/src/command-line/release/version/release-group-processor.js +50 -570
- package/src/command-line/release/version/resolve-current-version.d.ts +1 -1
- package/src/command-line/release/version/resolve-current-version.d.ts.map +1 -1
- package/src/command-line/release/version/resolve-current-version.js +1 -1
- package/src/command-line/release/version/test-utils.d.ts +13 -4
- package/src/command-line/release/version/test-utils.d.ts.map +1 -1
- package/src/command-line/release/version/test-utils.js +26 -15
- package/src/command-line/release/version/version-actions.d.ts +12 -5
- package/src/command-line/release/version/version-actions.d.ts.map +1 -1
- package/src/command-line/release/version/version-actions.js +36 -19
- package/src/command-line/release/version.d.ts +6 -1
- package/src/command-line/release/version.d.ts.map +1 -1
- package/src/command-line/release/version.js +58 -36
- package/src/config/nx-json.d.ts +28 -35
- package/src/config/nx-json.d.ts.map +1 -1
- package/src/config/nx-json.js +8 -8
- package/src/config/workspace-json-project-json.d.ts +2 -2
- package/src/config/workspace-json-project-json.d.ts.map +1 -1
- package/src/core/graph/main.js +1 -1
- package/src/devkit-exports.d.ts +1 -1
- package/src/devkit-exports.d.ts.map +1 -1
- package/src/migrations/update-21-0-0/release-changelog-config-changes.d.ts.map +1 -1
- package/src/migrations/update-21-0-0/release-version-config-changes.d.ts.map +1 -1
- package/src/migrations/update-21-0-0/release-version-config-changes.js +5 -15
- package/src/migrations/update-22-0-0/release-version-config-changes.d.ts +3 -0
- package/src/migrations/update-22-0-0/release-version-config-changes.d.ts.map +1 -0
- package/src/migrations/update-22-0-0/release-version-config-changes.js +101 -0
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/plugins/js/index.d.ts +1 -2
- package/src/plugins/js/index.d.ts.map +1 -1
- package/src/plugins/js/index.js +28 -32
- package/src/plugins/js/lock-file/lock-file.d.ts +2 -2
- package/src/plugins/js/lock-file/lock-file.d.ts.map +1 -1
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +1 -1
- package/src/project-graph/plugins/loaded-nx-plugin.d.ts.map +1 -1
- package/src/project-graph/plugins/loaded-nx-plugin.js +8 -6
- package/src/project-graph/plugins/public-api.d.ts +1 -36
- package/src/project-graph/plugins/public-api.d.ts.map +1 -1
- package/src/project-graph/plugins/utils.d.ts +4 -2
- package/src/project-graph/plugins/utils.d.ts.map +1 -1
- package/src/tasks-runner/run-command.js +2 -2
- package/src/command-line/release/config/use-legacy-versioning.d.ts +0 -3
- package/src/command-line/release/config/use-legacy-versioning.d.ts.map +0 -1
- package/src/command-line/release/config/use-legacy-versioning.js +0 -9
- package/src/command-line/release/utils/batch-projects-by-generator-config.d.ts +0 -8
- package/src/command-line/release/utils/batch-projects-by-generator-config.d.ts.map +0 -1
- package/src/command-line/release/utils/batch-projects-by-generator-config.js +0 -39
- package/src/command-line/release/version-legacy.d.ts +0 -47
- package/src/command-line/release/version-legacy.d.ts.map +0 -1
- package/src/command-line/release/version-legacy.js +0 -453
|
@@ -197,18 +197,7 @@
|
|
|
197
197
|
"description": "Configuration for the nx release commands.",
|
|
198
198
|
"properties": {
|
|
199
199
|
"version": {
|
|
200
|
-
"
|
|
201
|
-
"description": "Configuration for the nx release version command.",
|
|
202
|
-
"properties": {
|
|
203
|
-
"generator": {
|
|
204
|
-
"type": "string",
|
|
205
|
-
"description": "The version generator to use. Defaults to @nx/js:release-version."
|
|
206
|
-
},
|
|
207
|
-
"generatorOptions": {
|
|
208
|
-
"type": "object",
|
|
209
|
-
"description": "Options for the version generator."
|
|
210
|
-
}
|
|
211
|
-
}
|
|
200
|
+
"$ref": "#/definitions/NxReleaseVersionConfiguration"
|
|
212
201
|
}
|
|
213
202
|
}
|
|
214
203
|
}
|
|
@@ -331,6 +320,77 @@
|
|
|
331
320
|
}
|
|
332
321
|
]
|
|
333
322
|
}
|
|
323
|
+
},
|
|
324
|
+
"NxReleaseVersionConfiguration": {
|
|
325
|
+
"type": "object",
|
|
326
|
+
"description": "Project-specific configuration for the versioning phase of releases. This is a subset of the version configuration options available at the workspace level.",
|
|
327
|
+
"additionalProperties": false,
|
|
328
|
+
"properties": {
|
|
329
|
+
"manifestRootsToUpdate": {
|
|
330
|
+
"type": "array",
|
|
331
|
+
"items": {
|
|
332
|
+
"oneOf": [
|
|
333
|
+
{
|
|
334
|
+
"type": "string",
|
|
335
|
+
"description": "Path to the directory containing a manifest file to update. Supports placeholders like {projectRoot} and {projectName}."
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"type": "object",
|
|
339
|
+
"properties": {
|
|
340
|
+
"path": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"description": "Path to the directory containing a manifest file to update. Supports placeholders like {projectRoot} and {projectName}."
|
|
343
|
+
},
|
|
344
|
+
"preserveLocalDependencyProtocols": {
|
|
345
|
+
"type": "boolean",
|
|
346
|
+
"description": "Whether to preserve local dependency references using protocols like 'workspace:' or 'file:'. Set this to false for dist files that need to be published if not using a package manager that swaps references at publish time like pnpm or bun.",
|
|
347
|
+
"default": true
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"required": ["path"],
|
|
351
|
+
"additionalProperties": false
|
|
352
|
+
}
|
|
353
|
+
]
|
|
354
|
+
},
|
|
355
|
+
"description": "A list of directories containing manifest files (such as package.json) to apply updates to when versioning. By default, only the project root will be used, but you could customize this to only version a manifest in a dist directory, or even version multiple manifests in different directories, such as both source and dist."
|
|
356
|
+
},
|
|
357
|
+
"currentVersionResolver": {
|
|
358
|
+
"type": "string",
|
|
359
|
+
"enum": ["registry", "disk", "git-tag", "none"],
|
|
360
|
+
"description": "The resolver to use for determining the current version of a project during versioning. This is needed for versioning approaches which involve relatively modifying a current version to arrive at a new version, such as semver bumps like 'patch', 'minor' etc. Using 'none' explicitly declares that the current version is not needed to compute the new version, and should only be used with appropriate version actions implementations that support it."
|
|
361
|
+
},
|
|
362
|
+
"currentVersionResolverMetadata": {
|
|
363
|
+
"type": "object",
|
|
364
|
+
"additionalProperties": true,
|
|
365
|
+
"description": "Metadata to provide to the configured currentVersionResolver to help it in determining the current version. What to pass here is specific to each resolver."
|
|
366
|
+
},
|
|
367
|
+
"fallbackCurrentVersionResolver": {
|
|
368
|
+
"type": "string",
|
|
369
|
+
"enum": ["disk"],
|
|
370
|
+
"description": "The fallback version resolver to use when the configured currentVersionResolver fails to resolve the current version."
|
|
371
|
+
},
|
|
372
|
+
"versionPrefix": {
|
|
373
|
+
"type": "string",
|
|
374
|
+
"enum": ["auto", "", "~", "^", "="],
|
|
375
|
+
"default": "auto",
|
|
376
|
+
"description": "The prefix to use when versioning dependencies. This can be one of the following: auto, '', '~', '^', '=', where auto means the existing prefix will be preserved."
|
|
377
|
+
},
|
|
378
|
+
"preserveLocalDependencyProtocols": {
|
|
379
|
+
"type": "boolean",
|
|
380
|
+
"description": "Whether to preserve local dependency protocols (e.g. file references, or the `workspace:` protocol in package.json files) of local dependencies when updating them during versioning.",
|
|
381
|
+
"default": true
|
|
382
|
+
},
|
|
383
|
+
"versionActions": {
|
|
384
|
+
"type": "string",
|
|
385
|
+
"description": "The path to the version actions implementation to use for releasing all projects by default. This can also be overridden on the release group and project levels.",
|
|
386
|
+
"default": "@nx/js/src/release"
|
|
387
|
+
},
|
|
388
|
+
"versionActionsOptions": {
|
|
389
|
+
"type": "object",
|
|
390
|
+
"description": "The specific options that are defined by each version actions implementation. They will be passed to the version actions implementation when running a release.",
|
|
391
|
+
"additionalProperties": true
|
|
392
|
+
}
|
|
393
|
+
}
|
|
334
394
|
}
|
|
335
395
|
}
|
|
336
396
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-json.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/adapter/angular-json.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,
|
|
1
|
+
{"version":3,"file":"angular-json.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/adapter/angular-json.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAiB,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAErE,eAAO,MAAM,2BAA2B,2BAA2B,CAAC;AAcpE,eAAO,MAAM,mBAAmB,EAAE,UAIjC,CAAC;AAEF,eAAe,mBAAmB,CAAC;AAEnC,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,MAAM,EACZ,8BAA8B,EAAE,OAAO,GACtC,OAAO,CAaT;AAED,wBAAgB,wBAAwB,YAQvC;AAQD,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,GAAG,sBAAsB,CA+B1D;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,OA+BjC;AAID,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,QAaX"}
|
|
@@ -10,25 +10,21 @@ const fs_1 = require("fs");
|
|
|
10
10
|
const path = require("path");
|
|
11
11
|
const fileutils_1 = require("../utils/fileutils");
|
|
12
12
|
exports.NX_ANGULAR_JSON_PLUGIN_NAME = 'nx-angular-json-plugin';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
createNodesV2: [
|
|
22
|
-
'angular.json',
|
|
23
|
-
(f, _, ctx) => [
|
|
24
|
-
[
|
|
25
|
-
'angular.json',
|
|
26
|
-
{
|
|
27
|
-
projects: readAngularJson(ctx.workspaceRoot),
|
|
28
|
-
},
|
|
29
|
-
],
|
|
13
|
+
const createNodes = [
|
|
14
|
+
'angular.json',
|
|
15
|
+
(f, _, ctx) => [
|
|
16
|
+
[
|
|
17
|
+
'angular.json',
|
|
18
|
+
{
|
|
19
|
+
projects: readAngularJson(ctx.workspaceRoot),
|
|
20
|
+
},
|
|
30
21
|
],
|
|
31
22
|
],
|
|
23
|
+
];
|
|
24
|
+
exports.NxAngularJsonPlugin = {
|
|
25
|
+
name: exports.NX_ANGULAR_JSON_PLUGIN_NAME,
|
|
26
|
+
createNodes,
|
|
27
|
+
createNodesV2: createNodes,
|
|
32
28
|
};
|
|
33
29
|
exports.default = exports.NxAngularJsonPlugin;
|
|
34
30
|
function shouldMergeAngularProjects(root, includeProjectsFromAngularJson) {
|
|
@@ -3,7 +3,7 @@ export interface ConfigureAiAgentsOptions {
|
|
|
3
3
|
agents?: string[];
|
|
4
4
|
interactive?: boolean;
|
|
5
5
|
verbose?: boolean;
|
|
6
|
-
check?: boolean;
|
|
6
|
+
check?: boolean | 'outdated' | 'all';
|
|
7
7
|
}
|
|
8
8
|
export declare const yargsConfigureAiAgentsCommand: CommandModule<{}, ConfigureAiAgentsOptions>;
|
|
9
9
|
//# sourceMappingURL=command-object.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/configure-ai-agents/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/configure-ai-agents/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,KAAK,CAAC;CACtC;AAED,eAAO,MAAM,6BAA6B,EAAE,aAAa,CACvD,EAAE,EACF,wBAAwB,CA2DzB,CAAC"}
|
|
@@ -18,14 +18,28 @@ exports.yargsConfigureAiAgentsCommand = {
|
|
|
18
18
|
default: true,
|
|
19
19
|
})
|
|
20
20
|
.option('check', {
|
|
21
|
-
type: '
|
|
22
|
-
description: 'Check
|
|
23
|
-
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'Check agent configurations. Use --check or --check=outdated to check only configured agents, or --check=all to include unconfigured/partial configurations. Does not make any changes.',
|
|
23
|
+
coerce: (value) => {
|
|
24
|
+
// --check (no value)
|
|
25
|
+
if (value === '')
|
|
26
|
+
return 'outdated';
|
|
27
|
+
// --check=true
|
|
28
|
+
if (value === 'true')
|
|
29
|
+
return 'outdated';
|
|
30
|
+
// --no-check or --check=false
|
|
31
|
+
if (value === 'false')
|
|
32
|
+
return false;
|
|
33
|
+
// --check=all or --check=outdated
|
|
34
|
+
return value;
|
|
35
|
+
},
|
|
36
|
+
choices: ['outdated', 'all'],
|
|
24
37
|
})
|
|
25
38
|
.example('$0 configure-ai-agents', 'Interactively select AI agents to update and configure')
|
|
26
39
|
.example('$0 configure-ai-agents --agents claude gemini', 'Prompts for updates and and configuration of Claude and Gemini AI agents')
|
|
27
40
|
.example('$0 configure-ai-agents --check', 'Checks if any configured agents are out of date and need to be updated')
|
|
28
|
-
.example('$0 configure-ai-agents --
|
|
41
|
+
.example('$0 configure-ai-agents --check=all', 'Checks if any agents are not configured, out of date or partially configured')
|
|
42
|
+
.example('$0 configure-ai-agents --agents claude gemini --no-interactive', 'Configures and updates Claude and Gemini AI agents without prompts'), // because of the coerce function
|
|
29
43
|
handler: async (args) => {
|
|
30
44
|
await (await Promise.resolve().then(() => require('./configure-ai-agents'))).configureAiAgentsHandler(args);
|
|
31
45
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure-ai-agents.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/configure-ai-agents/configure-ai-agents.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAI5D,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,wBAAwB,EAC9B,KAAK,UAAQ,GACZ,OAAO,CAAC,IAAI,CAAC,CA+Bf;AAED,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"configure-ai-agents.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/configure-ai-agents/configure-ai-agents.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAI5D,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,wBAAwB,EAC9B,KAAK,UAAQ,GACZ,OAAO,CAAC,IAAI,CAAC,CA+Bf;AAED,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,IAAI,CAAC,CAyOf"}
|
|
@@ -64,38 +64,64 @@ async function configureAiAgentsHandlerImpl(options) {
|
|
|
64
64
|
});
|
|
65
65
|
process.exit(1);
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
title: 'No AI agents are configured',
|
|
71
|
-
bodyLines: [
|
|
72
|
-
'You can configure AI agents by running `nx configure-ai-agents`.',
|
|
73
|
-
],
|
|
74
|
-
});
|
|
75
|
-
process.exit(0);
|
|
76
|
-
}
|
|
67
|
+
// important for wording
|
|
68
|
+
const usingAllAgents = normalizedOptions.agents.length === utils_1.supportedAgents.length;
|
|
69
|
+
if (normalizedOptions.check) {
|
|
77
70
|
const outOfDateAgents = fullyConfiguredAgents.filter((a) => a?.outdated);
|
|
78
|
-
if
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
71
|
+
// only error if something is fully configured but outdated
|
|
72
|
+
if (normalizedOptions.check === 'outdated') {
|
|
73
|
+
if (fullyConfiguredAgents.length === 0) {
|
|
74
|
+
output_1.output.log({
|
|
75
|
+
title: 'No AI agents are configured',
|
|
76
|
+
bodyLines: [
|
|
77
|
+
'You can configure AI agents by running `nx configure-ai-agents`.',
|
|
78
|
+
],
|
|
79
|
+
});
|
|
80
|
+
process.exit(0);
|
|
81
|
+
}
|
|
82
|
+
if (outOfDateAgents.length === 0) {
|
|
83
|
+
output_1.output.success({
|
|
84
|
+
title: 'All configured AI agents are up to date',
|
|
85
|
+
bodyLines: fullyConfiguredAgents.map((a) => `- ${a.displayName}`),
|
|
86
|
+
});
|
|
87
|
+
process.exit(0);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
output_1.output.log({
|
|
91
|
+
title: 'The following AI agents are out of date:',
|
|
92
|
+
bodyLines: [
|
|
93
|
+
...outOfDateAgents.map((a) => {
|
|
94
|
+
const rulesPath = a.rulesPath;
|
|
95
|
+
const displayPath = rulesPath.startsWith(workspace_root_1.workspaceRoot)
|
|
96
|
+
? (0, path_1.relative)(workspace_root_1.workspaceRoot, rulesPath)
|
|
97
|
+
: rulesPath;
|
|
98
|
+
return `- ${a.displayName} (${displayPath})`;
|
|
99
|
+
}),
|
|
100
|
+
'',
|
|
101
|
+
'You can update them by running `nx configure-ai-agents`.',
|
|
102
|
+
],
|
|
103
|
+
});
|
|
104
|
+
process.exit(1);
|
|
105
|
+
}
|
|
106
|
+
// error on any partial, outdated or non-configured agent
|
|
84
107
|
}
|
|
85
|
-
else {
|
|
86
|
-
|
|
87
|
-
|
|
108
|
+
else if (normalizedOptions.check === 'all') {
|
|
109
|
+
if (partiallyConfiguredAgents.length === 0 &&
|
|
110
|
+
outOfDateAgents.length === 0 &&
|
|
111
|
+
nonConfiguredAgents.length === 0) {
|
|
112
|
+
output_1.output.success({
|
|
113
|
+
title: `All ${!usingAllAgents ? 'selected' : 'supported'} AI agents are fully configured and up to date`,
|
|
114
|
+
bodyLines: fullyConfiguredAgents.map((a) => `- ${a.displayName}`),
|
|
115
|
+
});
|
|
116
|
+
process.exit(0);
|
|
117
|
+
}
|
|
118
|
+
output_1.output.error({
|
|
119
|
+
title: 'The following agents are not fully configured or up to date:',
|
|
88
120
|
bodyLines: [
|
|
89
|
-
...
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
: rulesPath;
|
|
94
|
-
return `- ${a.displayName} (${displayPath})`;
|
|
95
|
-
}),
|
|
96
|
-
'',
|
|
97
|
-
'You can update them by running `nx configure-ai-agents`.',
|
|
98
|
-
],
|
|
121
|
+
...partiallyConfiguredAgents,
|
|
122
|
+
...outOfDateAgents,
|
|
123
|
+
...nonConfiguredAgents,
|
|
124
|
+
].map((a) => getAgentChoiceForPrompt(a).message),
|
|
99
125
|
});
|
|
100
126
|
process.exit(1);
|
|
101
127
|
}
|
|
@@ -123,7 +149,6 @@ async function configureAiAgentsHandlerImpl(options) {
|
|
|
123
149
|
currentIndex++;
|
|
124
150
|
});
|
|
125
151
|
if (allAgentChoices.length === 0) {
|
|
126
|
-
const usingAllAgents = normalizedOptions.agents.length === utils_1.supportedAgents.length;
|
|
127
152
|
output_1.output.success({
|
|
128
153
|
title: `No new agents to configure. All ${!usingAllAgents ? 'selected' : 'supported'} AI agents are already configured:`,
|
|
129
154
|
bodyLines: fullyConfiguredAgents.map((agent) => `- ${agent.displayName}`),
|
|
@@ -228,9 +253,11 @@ function getAgentChoiceForPrompt(agent) {
|
|
|
228
253
|
}
|
|
229
254
|
function normalizeOptions(options) {
|
|
230
255
|
const agents = (options.agents ?? utils_1.supportedAgents).filter((a) => utils_1.supportedAgents.includes(a));
|
|
256
|
+
// it used to be just --check which was implicitly 'outdated'
|
|
257
|
+
const check = (options.check === true ? 'outdated' : options.check) ?? false;
|
|
231
258
|
return {
|
|
232
259
|
...options,
|
|
233
260
|
agents,
|
|
234
|
-
check
|
|
261
|
+
check,
|
|
235
262
|
};
|
|
236
263
|
}
|
|
@@ -127,7 +127,7 @@ async function initHandler(options) {
|
|
|
127
127
|
if (selectedAgents && selectedAgents.length > 0) {
|
|
128
128
|
const tree = new tree_1.FsTree(repoRoot, false);
|
|
129
129
|
const aiAgentsCallback = await (0, set_up_ai_agents_1.setupAiAgentsGenerator)(tree, {
|
|
130
|
-
directory:
|
|
130
|
+
directory: '.',
|
|
131
131
|
writeNxCloudRules: options.nxCloud !== false,
|
|
132
132
|
packageVersion: 'latest',
|
|
133
133
|
agents: [...selectedAgents],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/login/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,eAAO,MAAM,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/login/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,eAAO,MAAM,iBAAiB,EAAE,aAkB/B,CAAC"}
|
|
@@ -4,9 +4,9 @@ exports.yargsLoginCommand = void 0;
|
|
|
4
4
|
const shared_options_1 = require("../../yargs-utils/shared-options");
|
|
5
5
|
exports.yargsLoginCommand = {
|
|
6
6
|
command: 'login [nxCloudUrl]',
|
|
7
|
-
describe: 'Login to Nx Cloud. This command is an alias for
|
|
7
|
+
describe: 'Login to Nx Cloud. This command is an alias for `nx-cloud login`.',
|
|
8
8
|
builder: (yargs) => (0, shared_options_1.withVerbose)(yargs.positional('nxCloudUrl', {
|
|
9
|
-
describe: 'The Nx Cloud URL of the instance you are trying to connect to. If no positional argument is provided, this command will connect to
|
|
9
|
+
describe: 'The Nx Cloud URL of the instance you are trying to connect to. If no positional argument is provided, this command will connect to your configured Nx Cloud instance by default.',
|
|
10
10
|
type: 'string',
|
|
11
11
|
required: false,
|
|
12
12
|
}))
|
|
@@ -4,7 +4,7 @@ exports.yargsLogoutCommand = void 0;
|
|
|
4
4
|
const shared_options_1 = require("../../yargs-utils/shared-options");
|
|
5
5
|
exports.yargsLogoutCommand = {
|
|
6
6
|
command: 'logout',
|
|
7
|
-
describe: 'Logout from Nx Cloud. This command is an alias for
|
|
7
|
+
describe: 'Logout from Nx Cloud. This command is an alias for `nx-cloud logout`.',
|
|
8
8
|
builder: (yargs) => (0, shared_options_1.withVerbose)(yargs)
|
|
9
9
|
.help(false)
|
|
10
10
|
.showHelpOnFail(false)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/changelog.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAc,MAAM,sBAAsB,CAAC;AAkB1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"changelog.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/changelog.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,sBAAsB,EAAc,MAAM,sBAA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BAAwB,CAAC,CAsqBrC"}
|
|
@@ -19,19 +19,18 @@ const path_1 = require("../../utils/path");
|
|
|
19
19
|
const workspace_root_1 = require("../../utils/workspace-root");
|
|
20
20
|
const config_1 = require("./config/config");
|
|
21
21
|
const deep_merge_json_1 = require("./config/deep-merge-json");
|
|
22
|
-
const filter_release_groups_1 = require("./config/filter-release-groups");
|
|
23
|
-
const use_legacy_versioning_1 = require("./config/use-legacy-versioning");
|
|
24
22
|
const version_plans_1 = require("./config/version-plans");
|
|
25
23
|
const git_1 = require("./utils/git");
|
|
26
24
|
const launch_editor_1 = require("./utils/launch-editor");
|
|
27
25
|
const markdown_1 = require("./utils/markdown");
|
|
28
26
|
const print_changes_1 = require("./utils/print-changes");
|
|
29
27
|
const print_config_1 = require("./utils/print-config");
|
|
28
|
+
const release_graph_1 = require("./utils/release-graph");
|
|
30
29
|
const remote_release_client_1 = require("./utils/remote-release-clients/remote-release-client");
|
|
31
30
|
const resolve_changelog_renderer_1 = require("./utils/resolve-changelog-renderer");
|
|
32
31
|
const resolve_nx_json_error_message_1 = require("./utils/resolve-nx-json-error-message");
|
|
33
|
-
const version_plan_utils_1 = require("./utils/version-plan-utils");
|
|
34
32
|
const shared_1 = require("./utils/shared");
|
|
33
|
+
const version_plan_utils_1 = require("./utils/version-plan-utils");
|
|
35
34
|
const releaseChangelogCLIHandler = (args) => (0, handle_errors_1.handleErrors)(args.verbose, () => createAPI({})(args));
|
|
36
35
|
exports.releaseChangelogCLIHandler = releaseChangelogCLIHandler;
|
|
37
36
|
function createAPI(overrideReleaseConfig) {
|
|
@@ -47,8 +46,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
47
46
|
// Apply default configuration to any optional user configuration
|
|
48
47
|
const { error: configError, nxReleaseConfig } = await (0, config_1.createNxReleaseConfig)(projectGraph, await (0, file_map_utils_1.createProjectFileMapUsingProjectGraph)(projectGraph), userProvidedReleaseConfig);
|
|
49
48
|
if (configError) {
|
|
50
|
-
|
|
51
|
-
return await (0, config_1.handleNxReleaseConfigError)(configError, USE_LEGACY_VERSIONING);
|
|
49
|
+
return await (0, config_1.handleNxReleaseConfigError)(configError);
|
|
52
50
|
}
|
|
53
51
|
// --print-config exits directly as it is not designed to be combined with any other programmatic operations
|
|
54
52
|
if (args.printConfig) {
|
|
@@ -76,19 +74,30 @@ function createAPI(overrideReleaseConfig) {
|
|
|
76
74
|
});
|
|
77
75
|
process.exit(1);
|
|
78
76
|
}
|
|
79
|
-
const
|
|
80
|
-
if
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
77
|
+
const tree = new tree_1.FsTree(workspace_root_1.workspaceRoot, args.verbose);
|
|
78
|
+
// Use pre-built release graph if provided, otherwise create a new one
|
|
79
|
+
const releaseGraph = args.releaseGraph ||
|
|
80
|
+
(await (0, release_graph_1.createReleaseGraph)({
|
|
81
|
+
tree,
|
|
82
|
+
projectGraph,
|
|
83
|
+
nxReleaseConfig,
|
|
84
|
+
filters: {
|
|
85
|
+
projects: args.projects,
|
|
86
|
+
groups: args.groups,
|
|
87
|
+
},
|
|
88
|
+
firstRelease: args.firstRelease,
|
|
89
|
+
verbose: args.verbose,
|
|
90
|
+
}));
|
|
91
|
+
// Display filter log if filters were applied (only when graph was created, not reused)
|
|
92
|
+
if (!args.releaseGraph &&
|
|
93
|
+
releaseGraph.filterLog &&
|
|
85
94
|
process.env.NX_RELEASE_INTERNAL_SUPPRESS_FILTER_LOG !== 'true') {
|
|
86
|
-
output_1.output.note(filterLog);
|
|
95
|
+
output_1.output.note(releaseGraph.filterLog);
|
|
87
96
|
}
|
|
88
97
|
const rawVersionPlans = await (0, version_plans_1.readRawVersionPlans)();
|
|
89
|
-
await (0, version_plans_1.setResolvedVersionPlansOnGroups)(rawVersionPlans, releaseGroups, Object.keys(projectGraph.nodes), args.verbose);
|
|
98
|
+
await (0, version_plans_1.setResolvedVersionPlansOnGroups)(rawVersionPlans, releaseGraph.releaseGroups, Object.keys(projectGraph.nodes), args.verbose);
|
|
90
99
|
// Validate version plans against the filter after resolution
|
|
91
|
-
const versionPlanValidationError = (0, version_plan_utils_1.validateResolvedVersionPlansAgainstFilter)(releaseGroups, releaseGroupToFilteredProjects);
|
|
100
|
+
const versionPlanValidationError = (0, version_plan_utils_1.validateResolvedVersionPlansAgainstFilter)(releaseGraph.releaseGroups, releaseGraph.releaseGroupToFilteredProjects);
|
|
92
101
|
if (versionPlanValidationError) {
|
|
93
102
|
output_1.output.error(versionPlanValidationError);
|
|
94
103
|
process.exit(1);
|
|
@@ -108,7 +117,6 @@ function createAPI(overrideReleaseConfig) {
|
|
|
108
117
|
});
|
|
109
118
|
return {};
|
|
110
119
|
}
|
|
111
|
-
const tree = new tree_1.FsTree(workspace_root_1.workspaceRoot, args.verbose);
|
|
112
120
|
const useAutomaticFromRef = nxReleaseConfig.changelog?.automaticFromRef || args.firstRelease;
|
|
113
121
|
/**
|
|
114
122
|
* For determining the versions to use within changelog files, there are a few different possibilities:
|
|
@@ -124,7 +132,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
124
132
|
* - in this case, the version property will be used as the reference for the workspace changelog, and the versionData object will be used
|
|
125
133
|
* to generate project changelogs
|
|
126
134
|
*/
|
|
127
|
-
const { workspaceChangelogVersion, projectsVersionData } = resolveChangelogVersions(args,
|
|
135
|
+
const { workspaceChangelogVersion, projectsVersionData } = resolveChangelogVersions(args, releaseGraph);
|
|
128
136
|
const to = args.to || 'HEAD';
|
|
129
137
|
const toSHA = await (0, git_1.getCommitHash)(to);
|
|
130
138
|
const headSHA = to === 'HEAD' ? toSHA : await (0, git_1.getCommitHash)('HEAD');
|
|
@@ -147,19 +155,19 @@ function createAPI(overrideReleaseConfig) {
|
|
|
147
155
|
throw new Error(`You are attempting to recreate the changelog for an old release, but you have enabled auto-commit mode. Please disable auto-commit mode by updating your nx.json, or passing --git-commit=false`);
|
|
148
156
|
}
|
|
149
157
|
const commitMessage = args.gitCommitMessage || nxReleaseConfig.changelog.git.commitMessage;
|
|
150
|
-
const commitMessageValues = (0, shared_1.createCommitMessageValues)(releaseGroups, releaseGroupToFilteredProjects, projectsVersionData, commitMessage);
|
|
158
|
+
const commitMessageValues = (0, shared_1.createCommitMessageValues)(releaseGraph.releaseGroups, releaseGraph.releaseGroupToFilteredProjects, projectsVersionData, commitMessage);
|
|
151
159
|
// Resolve any git tags as early as possible so that we can hard error in case of any duplicates before reaching the actual git command
|
|
152
160
|
const gitTagValues = args.gitTag ?? nxReleaseConfig.changelog.git.tag
|
|
153
|
-
? (0, shared_1.createGitTagValues)(releaseGroups, releaseGroupToFilteredProjects, projectsVersionData)
|
|
161
|
+
? (0, shared_1.createGitTagValues)(releaseGraph.releaseGroups, releaseGraph.releaseGroupToFilteredProjects, projectsVersionData)
|
|
154
162
|
: [];
|
|
155
163
|
(0, shared_1.handleDuplicateGitTags)(gitTagValues);
|
|
156
164
|
const postGitTasks = [];
|
|
157
165
|
let workspaceChangelogChanges = [];
|
|
158
166
|
// If there are multiple release groups, we'll just skip the workspace changelog anyway.
|
|
159
|
-
const versionPlansEnabledForWorkspaceChangelog = releaseGroups[0].resolvedVersionPlans;
|
|
167
|
+
const versionPlansEnabledForWorkspaceChangelog = releaseGraph.releaseGroups[0].resolvedVersionPlans;
|
|
160
168
|
if (versionPlansEnabledForWorkspaceChangelog) {
|
|
161
|
-
if (releaseGroups.length === 1) {
|
|
162
|
-
const releaseGroup = releaseGroups[0];
|
|
169
|
+
if (releaseGraph.releaseGroups.length === 1) {
|
|
170
|
+
const releaseGroup = releaseGraph.releaseGroups[0];
|
|
163
171
|
if (releaseGroup.projectsRelationship === 'fixed') {
|
|
164
172
|
const versionPlans = releaseGroup.resolvedVersionPlans;
|
|
165
173
|
workspaceChangelogChanges = versionPlans
|
|
@@ -256,7 +264,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
256
264
|
* and figuring them out during the main iteration would be too late.
|
|
257
265
|
*/
|
|
258
266
|
const projectToAdditionalDependencyBumps = new Map();
|
|
259
|
-
for (const releaseGroup of releaseGroups) {
|
|
267
|
+
for (const releaseGroup of releaseGraph.releaseGroups) {
|
|
260
268
|
if (releaseGroup.projectsRelationship !== 'independent') {
|
|
261
269
|
continue;
|
|
262
270
|
}
|
|
@@ -287,7 +295,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
287
295
|
}
|
|
288
296
|
}
|
|
289
297
|
const allProjectChangelogs = {};
|
|
290
|
-
for (const releaseGroup of releaseGroups) {
|
|
298
|
+
for (const releaseGroup of releaseGraph.releaseGroups) {
|
|
291
299
|
const config = releaseGroup.changelog;
|
|
292
300
|
// The entire feature is disabled at the release group level, exit early
|
|
293
301
|
if (config === false) {
|
|
@@ -295,7 +303,7 @@ function createAPI(overrideReleaseConfig) {
|
|
|
295
303
|
}
|
|
296
304
|
const projects = args.projects?.length
|
|
297
305
|
? // If the user has passed a list of projects, we need to use the filtered list of projects within the release group, plus any dependents
|
|
298
|
-
Array.from(releaseGroupToFilteredProjects.get(releaseGroup)).flatMap((project) => {
|
|
306
|
+
Array.from(releaseGraph.releaseGroupToFilteredProjects.get(releaseGroup)).flatMap((project) => {
|
|
299
307
|
return [
|
|
300
308
|
project,
|
|
301
309
|
...(projectsVersionData[project]?.dependentProjects.map((dep) => dep.source) || []),
|
|
@@ -511,19 +519,19 @@ function createAPI(overrideReleaseConfig) {
|
|
|
511
519
|
}
|
|
512
520
|
}
|
|
513
521
|
}
|
|
514
|
-
await applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTasks, commitMessageValues, gitTagValues,
|
|
522
|
+
await applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTasks, commitMessageValues, gitTagValues, releaseGraph);
|
|
515
523
|
return {
|
|
516
524
|
workspaceChangelog,
|
|
517
525
|
projectChangelogs: allProjectChangelogs,
|
|
518
526
|
};
|
|
519
527
|
};
|
|
520
528
|
}
|
|
521
|
-
function resolveChangelogVersions(args,
|
|
529
|
+
function resolveChangelogVersions(args, releaseGraph) {
|
|
522
530
|
if (!args.version && !args.versionData) {
|
|
523
531
|
throw new Error(`You must provide a version string and/or a versionData object.`);
|
|
524
532
|
}
|
|
525
|
-
const versionData = releaseGroups.reduce((versionData, releaseGroup) => {
|
|
526
|
-
const releaseGroupProjectNames = Array.from(releaseGroupToFilteredProjects.get(releaseGroup));
|
|
533
|
+
const versionData = releaseGraph.releaseGroups.reduce((versionData, releaseGroup) => {
|
|
534
|
+
const releaseGroupProjectNames = Array.from(releaseGraph.releaseGroupToFilteredProjects.get(releaseGroup));
|
|
527
535
|
for (const projectName of releaseGroupProjectNames) {
|
|
528
536
|
if (!args.versionData) {
|
|
529
537
|
versionData[projectName] = {
|
|
@@ -562,7 +570,7 @@ function applyRemoteReleaseProviderName(newRemoteReleaseProviderName) {
|
|
|
562
570
|
remoteReleaseProviderName = newRemoteReleaseProviderName;
|
|
563
571
|
}
|
|
564
572
|
}
|
|
565
|
-
async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTasks, commitMessageValues, gitTagValues,
|
|
573
|
+
async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTasks, commitMessageValues, gitTagValues, releaseGraph) {
|
|
566
574
|
let latestCommit = toSHA;
|
|
567
575
|
const changes = tree.listChanges();
|
|
568
576
|
/**
|
|
@@ -605,8 +613,8 @@ async function applyChangesAndExit(args, nxReleaseConfig, tree, toSHA, postGitTa
|
|
|
605
613
|
let deletedFiles = [];
|
|
606
614
|
if (args.deleteVersionPlans) {
|
|
607
615
|
const planFiles = new Set();
|
|
608
|
-
releaseGroups.forEach((group) => {
|
|
609
|
-
const filteredProjects = releaseGroupToFilteredProjects.get(group);
|
|
616
|
+
releaseGraph.releaseGroups.forEach((group) => {
|
|
617
|
+
const filteredProjects = releaseGraph.releaseGroupToFilteredProjects.get(group);
|
|
610
618
|
if (group.resolvedVersionPlans) {
|
|
611
619
|
// Check each version plan individually to see if it should be deleted
|
|
612
620
|
const plansToDelete = [];
|
|
@@ -837,7 +845,8 @@ async function generateChangelogForProjects({ tree, args, changes, projectsVersi
|
|
|
837
845
|
}
|
|
838
846
|
const preferDockerVersion = (0, shared_1.shouldPreferDockerVersionForReleaseGroup)(releaseGroup);
|
|
839
847
|
const releaseVersion = new shared_1.ReleaseVersion({
|
|
840
|
-
version: preferDockerVersion &&
|
|
848
|
+
version: (preferDockerVersion === true || preferDockerVersion === 'both') &&
|
|
849
|
+
projectsVersionData[project.name].dockerVersion
|
|
841
850
|
? projectsVersionData[project.name].dockerVersion
|
|
842
851
|
: projectsVersionData[project.name].newVersion,
|
|
843
852
|
releaseTagPattern: releaseGroup.releaseTagPattern,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CommandModule } from 'yargs';
|
|
2
|
-
import { OutputStyle, RunManyOptions } from '../yargs-utils/shared-options';
|
|
3
|
-
import {
|
|
1
|
+
import { type CommandModule } from 'yargs';
|
|
2
|
+
import { type OutputStyle, type RunManyOptions } from '../yargs-utils/shared-options';
|
|
3
|
+
import type { ReleaseGraph } from './utils/release-graph';
|
|
4
|
+
import type { VersionData } from './utils/shared';
|
|
4
5
|
export interface BaseNxReleaseArgs {
|
|
5
6
|
verbose?: boolean;
|
|
6
7
|
printConfig?: boolean | 'debug';
|
|
@@ -30,13 +31,8 @@ export type VersionOptions = NxReleaseArgs & GitOptions & VersionPlanArgs & Firs
|
|
|
30
31
|
specifier?: string;
|
|
31
32
|
preid?: string;
|
|
32
33
|
stageChanges?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* @deprecated Use versionActionsOptionsOverrides instead.
|
|
35
|
-
*
|
|
36
|
-
* Using generatorOptionsOverrides is only valid when release.version.useLegacyVersioning is set to true.
|
|
37
|
-
*/
|
|
38
|
-
generatorOptionsOverrides?: Record<string, unknown>;
|
|
39
34
|
versionActionsOptionsOverrides?: Record<string, unknown>;
|
|
35
|
+
releaseGraph?: ReleaseGraph;
|
|
40
36
|
};
|
|
41
37
|
export type ChangelogOptions = NxReleaseArgs & GitOptions & VersionPlanArgs & FirstReleaseArgs & {
|
|
42
38
|
version?: string | null;
|
|
@@ -45,6 +41,7 @@ export type ChangelogOptions = NxReleaseArgs & GitOptions & VersionPlanArgs & Fi
|
|
|
45
41
|
from?: string;
|
|
46
42
|
interactive?: string;
|
|
47
43
|
createRelease?: false | 'github' | 'gitlab';
|
|
44
|
+
releaseGraph?: ReleaseGraph;
|
|
48
45
|
};
|
|
49
46
|
export type PublishOptions = NxReleaseArgs & Partial<RunManyOptions> & {
|
|
50
47
|
outputStyle?: OutputStyle;
|
|
@@ -54,6 +51,7 @@ export type PublishOptions = NxReleaseArgs & Partial<RunManyOptions> & {
|
|
|
54
51
|
access?: string;
|
|
55
52
|
otp?: number;
|
|
56
53
|
versionData?: VersionData;
|
|
54
|
+
releaseGraph?: ReleaseGraph;
|
|
57
55
|
};
|
|
58
56
|
export type PlanOptions = NxReleaseArgs & {
|
|
59
57
|
bump?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/release/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,aAAa,EAAY,MAAM,OAAO,CAAC;AAEhE,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,cAAc,EAQpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACjC;AAED,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IACtD,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,C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AAG;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,aAAa,CAC7C,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,aAAa,CA0Ed,CAAC"}
|
|
@@ -57,7 +57,7 @@ export declare function createNxReleaseConfig(projectGraph: ProjectGraph, projec
|
|
|
57
57
|
error: null | CreateNxReleaseConfigError;
|
|
58
58
|
nxReleaseConfig: NxReleaseConfig | null;
|
|
59
59
|
}>;
|
|
60
|
-
export declare function handleNxReleaseConfigError(error: CreateNxReleaseConfigError
|
|
60
|
+
export declare function handleNxReleaseConfigError(error: CreateNxReleaseConfigError): Promise<never>;
|
|
61
61
|
/**
|
|
62
62
|
* Full form of the createRelease config, with the provider, hostname, and apiBaseUrl resolved.
|
|
63
63
|
*/
|