nx 21.0.0-beta.1 → 21.0.0-beta.2
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/.eslintrc.json +5 -1
- package/package.json +12 -12
- package/release/index.d.ts +1 -1
- package/release/index.js +2 -1
- package/schemas/nx-schema.json +186 -35
- package/src/adapter/compat.d.ts +1 -1
- package/src/adapter/compat.js +3 -0
- package/src/command-line/add/add.js +6 -16
- package/src/command-line/affected/command-object.js +6 -6
- package/src/command-line/examples.js +0 -4
- package/src/command-line/exec/command-object.js +1 -1
- package/src/command-line/generate/generator-utils.js +8 -3
- package/src/command-line/import/import.js +1 -1
- package/src/command-line/init/command-object.js +18 -6
- package/src/command-line/init/configure-plugins.d.ts +6 -7
- package/src/command-line/init/configure-plugins.js +47 -35
- package/src/command-line/init/implementation/add-nx-to-turborepo.d.ts +4 -0
- package/src/command-line/init/implementation/add-nx-to-turborepo.js +49 -0
- package/src/command-line/init/implementation/check-compatible-with-plugins.js +7 -1
- package/src/command-line/init/implementation/deduce-default-base.d.ts +1 -0
- package/src/command-line/init/implementation/deduce-default-base.js +53 -0
- package/src/command-line/init/implementation/react/add-vite-commands-to-package-scripts.js +6 -4
- package/src/command-line/init/implementation/react/index.d.ts +1 -1
- package/src/command-line/init/implementation/react/index.js +32 -185
- package/src/command-line/init/implementation/react/write-vite-config.js +19 -3
- package/src/command-line/init/implementation/utils.d.ts +4 -1
- package/src/command-line/init/implementation/utils.js +108 -44
- package/src/command-line/init/init-v1.js +1 -1
- package/src/command-line/init/init-v2.d.ts +1 -0
- package/src/command-line/init/init-v2.js +68 -38
- package/src/command-line/nx-commands.js +19 -5
- package/src/command-line/register/command-object.d.ts +6 -0
- package/src/command-line/{activate-powerpack → register}/command-object.js +9 -9
- package/src/command-line/register/register.d.ts +2 -0
- package/src/command-line/register/register.js +9 -0
- package/src/command-line/release/changelog.js +18 -15
- package/src/command-line/release/command-object.d.ts +2 -0
- package/src/command-line/release/command-object.js +9 -0
- package/src/command-line/release/config/config.d.ts +8 -7
- package/src/command-line/release/config/config.js +129 -42
- package/src/command-line/release/config/use-legacy-versioning.d.ts +2 -0
- package/src/command-line/release/config/use-legacy-versioning.js +9 -0
- package/src/command-line/release/index.d.ts +4 -0
- package/src/command-line/release/index.js +6 -1
- package/src/command-line/release/plan-check.js +6 -3
- package/src/command-line/release/plan.js +7 -3
- package/src/command-line/release/publish.js +7 -3
- package/src/command-line/release/release.js +8 -3
- package/src/command-line/release/utils/batch-projects-by-generator-config.js +6 -3
- package/src/command-line/release/utils/git.d.ts +3 -2
- package/src/command-line/release/utils/git.js +65 -9
- package/src/command-line/release/utils/github.js +3 -1
- package/src/command-line/release/utils/resolve-semver-specifier.d.ts +2 -1
- package/src/command-line/release/utils/resolve-semver-specifier.js +2 -1
- package/src/command-line/release/utils/semver.d.ts +8 -0
- package/src/command-line/release/utils/semver.js +8 -0
- package/src/command-line/release/utils/shared-legacy.d.ts +25 -0
- package/src/command-line/release/utils/shared-legacy.js +2 -0
- package/src/command-line/release/utils/shared.d.ts +11 -17
- package/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts +7 -0
- package/src/command-line/release/version/derive-specifier-from-conventional-commits.js +47 -0
- package/src/command-line/release/version/deriver-specifier-from-version-plans.d.ts +8 -0
- package/src/command-line/release/version/deriver-specifier-from-version-plans.js +59 -0
- package/src/command-line/release/version/project-logger.d.ts +8 -0
- package/src/command-line/release/version/project-logger.js +45 -0
- package/src/command-line/release/version/release-group-processor.d.ts +251 -0
- package/src/command-line/release/version/release-group-processor.js +1040 -0
- package/src/command-line/release/version/resolve-current-version.d.ts +32 -0
- package/src/command-line/release/version/resolve-current-version.js +241 -0
- package/src/command-line/release/version/test-utils.d.ts +95 -0
- package/src/command-line/release/version/test-utils.js +416 -0
- package/src/command-line/release/version/topological-sort.d.ts +9 -0
- package/src/command-line/release/version/topological-sort.js +41 -0
- package/src/command-line/release/version/version-actions.d.ts +170 -0
- package/src/command-line/release/version/version-actions.js +183 -0
- package/src/command-line/release/version-legacy.d.ts +46 -0
- package/src/command-line/release/version-legacy.js +453 -0
- package/src/command-line/release/version.d.ts +0 -40
- package/src/command-line/release/version.js +80 -262
- package/src/command-line/report/report.d.ts +7 -3
- package/src/command-line/report/report.js +52 -18
- package/src/command-line/run/command-object.js +2 -2
- package/src/command-line/run/run.js +1 -1
- package/src/command-line/run-many/command-object.js +2 -2
- package/src/command-line/yargs-utils/shared-options.d.ts +4 -0
- package/src/command-line/yargs-utils/shared-options.js +20 -0
- package/src/config/nx-json.d.ts +153 -15
- package/src/config/project-graph.d.ts +4 -2
- package/src/config/project-graph.js +8 -0
- package/src/config/workspace-json-project-json.d.ts +2 -2
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/runtime.js +1 -1
- package/src/core/graph/styles.css +2 -2
- package/src/core/graph/styles.js +1 -1
- package/src/daemon/client/client.d.ts +2 -0
- package/src/daemon/client/client.js +15 -0
- package/src/daemon/message-types/glob.d.ts +7 -0
- package/src/daemon/message-types/glob.js +9 -1
- package/src/daemon/message-types/hash-glob.d.ts +6 -0
- package/src/daemon/message-types/hash-glob.js +9 -1
- package/src/daemon/server/handle-glob.d.ts +1 -0
- package/src/daemon/server/handle-glob.js +8 -0
- package/src/daemon/server/handle-hash-glob.d.ts +1 -0
- package/src/daemon/server/handle-hash-glob.js +8 -0
- package/src/daemon/server/logger.js +2 -1
- package/src/daemon/server/server.js +7 -0
- package/src/devkit-internals.d.ts +2 -1
- package/src/devkit-internals.js +4 -1
- package/src/executors/run-commands/run-commands.impl.d.ts +3 -5
- package/src/executors/run-commands/run-commands.impl.js +14 -42
- package/src/executors/run-commands/running-tasks.d.ts +7 -5
- package/src/executors/run-commands/running-tasks.js +64 -27
- package/src/executors/run-script/run-script.impl.js +3 -3
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +8 -0
- package/src/generators/testing-utils/create-tree.js +5 -1
- package/src/native/index.d.ts +93 -19
- package/src/native/native-bindings.js +6 -0
- package/src/native/nx.wasi-browser.js +20 -19
- package/src/native/nx.wasi.cjs +20 -19
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/nx-cloud/nx-cloud-tasks-runner-shell.js +3 -3
- package/src/plugins/js/lock-file/lock-file.js +28 -13
- package/src/plugins/js/lock-file/utils/package-json.d.ts +1 -1
- package/src/plugins/js/lock-file/utils/package-json.js +2 -1
- package/src/plugins/js/lock-file/yarn-parser.js +85 -39
- package/src/plugins/js/project-graph/affected/lock-file-changes.js +1 -0
- package/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +1 -1
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts +10 -1
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +59 -6
- package/src/plugins/js/utils/packages.js +22 -3
- package/src/plugins/js/utils/register.js +1 -0
- package/src/plugins/js/utils/typescript.js +3 -3
- package/src/plugins/package-json/create-nodes.js +3 -1
- package/src/project-graph/affected/locators/project-glob-changes.js +2 -2
- package/src/project-graph/error-types.js +32 -2
- package/src/project-graph/plugins/get-plugins.js +2 -1
- package/src/project-graph/plugins/in-process-loader.js +1 -1
- package/src/project-graph/plugins/isolation/plugin-worker.js +12 -6
- package/src/project-graph/plugins/loaded-nx-plugin.d.ts +2 -1
- package/src/project-graph/plugins/utils.d.ts +2 -2
- package/src/project-graph/plugins/utils.js +2 -2
- package/src/project-graph/project-graph.js +1 -1
- package/src/project-graph/utils/project-configuration-utils.d.ts +1 -1
- package/src/project-graph/utils/project-configuration-utils.js +25 -11
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +1 -1
- package/src/project-graph/utils/retrieve-workspace-files.js +14 -18
- package/src/tasks-runner/batch/batch-messages.d.ts +2 -0
- package/src/tasks-runner/batch/run-batch.js +2 -3
- package/src/tasks-runner/cache.d.ts +20 -6
- package/src/tasks-runner/cache.js +104 -20
- package/src/tasks-runner/create-task-graph.d.ts +1 -1
- package/src/tasks-runner/create-task-graph.js +12 -11
- package/src/tasks-runner/default-tasks-runner.js +4 -13
- package/src/tasks-runner/forked-process-task-runner.d.ts +6 -3
- package/src/tasks-runner/forked-process-task-runner.js +29 -28
- package/src/tasks-runner/init-tasks-runner.d.ts +15 -1
- package/src/tasks-runner/init-tasks-runner.js +55 -2
- package/src/tasks-runner/is-tui-enabled.d.ts +2 -0
- package/src/tasks-runner/is-tui-enabled.js +58 -0
- package/src/tasks-runner/life-cycle.d.ts +10 -3
- package/src/tasks-runner/life-cycle.js +23 -2
- package/src/tasks-runner/life-cycles/task-history-life-cycle-old.js +7 -2
- package/src/tasks-runner/life-cycles/task-history-life-cycle.js +6 -1
- package/src/tasks-runner/life-cycles/tui-summary-life-cycle.d.ts +17 -0
- package/src/tasks-runner/life-cycles/tui-summary-life-cycle.js +221 -0
- package/src/tasks-runner/pseudo-terminal.d.ts +10 -7
- package/src/tasks-runner/pseudo-terminal.js +37 -35
- package/src/tasks-runner/run-command.d.ts +1 -0
- package/src/tasks-runner/run-command.js +180 -23
- package/src/tasks-runner/task-env.d.ts +1 -4
- package/src/tasks-runner/task-env.js +2 -0
- package/src/tasks-runner/task-orchestrator.d.ts +21 -9
- package/src/tasks-runner/task-orchestrator.js +126 -44
- package/src/tasks-runner/utils.d.ts +2 -2
- package/src/tasks-runner/utils.js +15 -11
- package/src/utils/child-process.d.ts +4 -0
- package/src/utils/child-process.js +23 -30
- package/src/utils/command-line-utils.d.ts +1 -1
- package/src/utils/find-matching-projects.js +2 -2
- package/src/utils/handle-errors.js +15 -0
- package/src/utils/is-ci.js +4 -1
- package/src/utils/is-using-prettier.d.ts +3 -0
- package/src/utils/is-using-prettier.js +62 -0
- package/src/utils/nx-key.d.ts +7 -0
- package/src/utils/nx-key.js +52 -0
- package/src/utils/package-manager.js +2 -2
- package/src/utils/path.js +1 -1
- package/src/utils/require-nx-key.d.ts +1 -0
- package/src/utils/require-nx-key.js +22 -0
- package/src/utils/workspace-context.d.ts +2 -0
- package/src/utils/workspace-context.js +16 -0
- package/src/command-line/activate-powerpack/activate-powerpack.d.ts +0 -2
- package/src/command-line/activate-powerpack/activate-powerpack.js +0 -34
- package/src/command-line/activate-powerpack/command-object.d.ts +0 -6
- package/src/command-line/init/implementation/react/write-craco-config.d.ts +0 -1
- package/src/command-line/init/implementation/react/write-craco-config.js +0 -61
- package/src/utils/powerpack.d.ts +0 -5
- package/src/utils/powerpack.js +0 -33
@@ -1,13 +1,13 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.yargsRunManyCommand = void 0;
|
4
|
+
const handle_errors_1 = require("../../utils/handle-errors");
|
4
5
|
const documentation_1 = require("../yargs-utils/documentation");
|
5
6
|
const shared_options_1 = require("../yargs-utils/shared-options");
|
6
|
-
const handle_errors_1 = require("../../utils/handle-errors");
|
7
7
|
exports.yargsRunManyCommand = {
|
8
8
|
command: 'run-many',
|
9
9
|
describe: 'Run target for multiple listed projects.',
|
10
|
-
builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withRunManyOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withTargetAndConfigurationOption)((0, shared_options_1.withBatch)(yargs)))), 'run-many'),
|
10
|
+
builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withTuiOptions)((0, shared_options_1.withRunManyOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withTargetAndConfigurationOption)((0, shared_options_1.withBatch)(yargs))))), 'run-many'),
|
11
11
|
handler: async (args) => {
|
12
12
|
const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
|
13
13
|
await Promise.resolve().then(() => require('./run-many')).then((m) => m.runMany((0, shared_options_1.withOverrides)(args)));
|
@@ -23,6 +23,10 @@ export interface RunOptions {
|
|
23
23
|
excludeTaskDependencies: boolean;
|
24
24
|
skipSync: boolean;
|
25
25
|
}
|
26
|
+
export interface TuiOptions {
|
27
|
+
tuiAutoExit: boolean | number;
|
28
|
+
}
|
29
|
+
export declare function withTuiOptions<T>(yargs: Argv<T>): Argv<T & TuiOptions>;
|
26
30
|
export declare function withRunOptions<T>(yargs: Argv<T>): Argv<T & RunOptions>;
|
27
31
|
export declare function withTargetAndConfigurationOption(yargs: Argv, demandOption?: boolean): Argv<{
|
28
32
|
configuration: string;
|
@@ -2,6 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.defaultYargsParserConfiguration = void 0;
|
4
4
|
exports.withExcludeOption = withExcludeOption;
|
5
|
+
exports.withTuiOptions = withTuiOptions;
|
5
6
|
exports.withRunOptions = withRunOptions;
|
6
7
|
exports.withTargetAndConfigurationOption = withTargetAndConfigurationOption;
|
7
8
|
exports.withConfiguration = withConfiguration;
|
@@ -28,6 +29,25 @@ function withExcludeOption(yargs) {
|
|
28
29
|
coerce: parseCSV,
|
29
30
|
});
|
30
31
|
}
|
32
|
+
function withTuiOptions(yargs) {
|
33
|
+
return yargs.options('tuiAutoExit', {
|
34
|
+
describe: 'Whether or not to exit the TUI automatically after all tasks finish, and after how long. If set to `true`, the TUI will exit immediately. If set to `false` the TUI will not automatically exit. If set to a number, an interruptible countdown popup will be shown for that many seconds before the TUI exits.',
|
35
|
+
type: 'string',
|
36
|
+
coerce: (value) => {
|
37
|
+
if (value === 'true') {
|
38
|
+
return true;
|
39
|
+
}
|
40
|
+
if (value === 'false') {
|
41
|
+
return false;
|
42
|
+
}
|
43
|
+
const num = Number(value);
|
44
|
+
if (!Number.isNaN(num)) {
|
45
|
+
return num;
|
46
|
+
}
|
47
|
+
throw new Error(`Invalid value for --tui-auto-exit: ${value}`);
|
48
|
+
},
|
49
|
+
});
|
50
|
+
}
|
31
51
|
function withRunOptions(yargs) {
|
32
52
|
return withVerbose(withExcludeOption(yargs))
|
33
53
|
.option('parallel', {
|
package/src/config/nx-json.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { ChangelogRenderOptions } from '../../release/changelog-renderer';
|
2
|
-
import {
|
3
|
-
import {
|
2
|
+
import { validReleaseVersionPrefixes } from '../command-line/release/version';
|
3
|
+
import type { PackageManager } from '../utils/package-manager';
|
4
|
+
import type { InputDefinition, TargetConfiguration, TargetDependencyConfig } from './workspace-json-project-json';
|
4
5
|
export type ImplicitDependencyEntry<T = '*' | string[]> = {
|
5
6
|
[key: string]: T | ImplicitJsonSubsetDependency<T>;
|
6
7
|
};
|
@@ -35,6 +36,12 @@ interface NxInstallationConfiguration {
|
|
35
36
|
*/
|
36
37
|
plugins?: Record<string, string>;
|
37
38
|
}
|
39
|
+
/**
|
40
|
+
* This named configuration interface will be changing in Nx v21. This interface will be made available
|
41
|
+
* under LegacyNxReleaseVersionConfiguration, which is already available as an alias.
|
42
|
+
*
|
43
|
+
* In Nx v22, this configuration interface will no longer be valid.
|
44
|
+
*/
|
38
45
|
export interface NxReleaseVersionConfiguration {
|
39
46
|
generator?: string;
|
40
47
|
generatorOptions?: Record<string, unknown>;
|
@@ -50,6 +57,100 @@ export interface NxReleaseVersionConfiguration {
|
|
50
57
|
*/
|
51
58
|
conventionalCommits?: boolean;
|
52
59
|
}
|
60
|
+
export type LegacyNxReleaseVersionConfiguration = NxReleaseVersionConfiguration;
|
61
|
+
export interface NxReleaseVersionV2Configuration {
|
62
|
+
/**
|
63
|
+
* Whether to use the legacy versioning strategy. This value will be true in Nx v20 and false in Nx v21.
|
64
|
+
* The legacy versioning implementation will be removed in Nx v22, as will this flag.
|
65
|
+
*/
|
66
|
+
useLegacyVersioning?: boolean;
|
67
|
+
/**
|
68
|
+
* Shorthand for enabling the current version of projects to be resolved from git tags,
|
69
|
+
* and the next version to be determined by analyzing commit messages according to the
|
70
|
+
* Conventional Commits specification.
|
71
|
+
*/
|
72
|
+
conventionalCommits?: boolean;
|
73
|
+
/**
|
74
|
+
* A command to run after validation of nx release configuration, but before versioning begins.
|
75
|
+
* Useful for preparing build artifacts. If --dry-run is passed, the command is still executed,
|
76
|
+
* but with the NX_DRY_RUN environment variable set to 'true'.
|
77
|
+
*/
|
78
|
+
preVersionCommand?: string;
|
79
|
+
/**
|
80
|
+
* The source to use for determining the specifier to use when versioning.
|
81
|
+
* 'prompt' is the default and will interactively prompt the user for an explicit/imperative specifier.
|
82
|
+
* 'conventional-commits' will attempt determine a specifier from commit messages conforming to the Conventional Commits specification.
|
83
|
+
* 'version-plans' will determine the specifier from the version plan files available on disk.
|
84
|
+
*/
|
85
|
+
specifierSource?: 'prompt' | 'conventional-commits' | 'version-plans';
|
86
|
+
/**
|
87
|
+
* A list of directories containing manifest files (such as package.json) to apply updates to when versioning.
|
88
|
+
*
|
89
|
+
* By default, only the project root will be used, but you could customize this to only version a manifest in a
|
90
|
+
* dist directory, or even version multiple manifests in different directories, such as both source and dist.
|
91
|
+
*/
|
92
|
+
manifestRootsToUpdate?: string[];
|
93
|
+
/**
|
94
|
+
* The resolver to use for determining the current version of a project during versioning.
|
95
|
+
* This is needed for versioning approaches which involve relatively modifying a current version
|
96
|
+
* to arrive at a new version, such as semver bumps like 'patch', 'minor' etc.
|
97
|
+
*
|
98
|
+
* Using 'none' explicitly declares that the current version is not needed to compute the new version, and
|
99
|
+
* should only be used with appropriate version actions implementations that support it.
|
100
|
+
*/
|
101
|
+
currentVersionResolver?: 'registry' | 'disk' | 'git-tag' | 'none';
|
102
|
+
/**
|
103
|
+
* Metadata to provide to the configured currentVersionResolver to help it in determining the current version.
|
104
|
+
* What to pass here is specific to each resolver.
|
105
|
+
*/
|
106
|
+
currentVersionResolverMetadata?: Record<string, unknown>;
|
107
|
+
/**
|
108
|
+
* The fallback version resolver to use when the configured currentVersionResolver fails to resolve the current version.
|
109
|
+
*/
|
110
|
+
fallbackCurrentVersionResolver?: 'disk';
|
111
|
+
/**
|
112
|
+
* Whether or not this is the first release of one of more projects.
|
113
|
+
* This removes certain validation checks that are not possible to enforce if the project has never been released before.
|
114
|
+
*/
|
115
|
+
firstRelease?: boolean;
|
116
|
+
/**
|
117
|
+
* The prefix to use when versioning dependencies.
|
118
|
+
* This can be one of the following: auto, '', '~', '^', '=', where auto means the existing prefix will be preserved.
|
119
|
+
*/
|
120
|
+
versionPrefix?: (typeof validReleaseVersionPrefixes)[number];
|
121
|
+
/**
|
122
|
+
* Whether to delete the processed version plans file after versioning is complete. This is false by default because the
|
123
|
+
* version plans are also needed for changelog generation.
|
124
|
+
*/
|
125
|
+
deleteVersionPlans?: boolean;
|
126
|
+
/**
|
127
|
+
* When versioning independent projects, this controls whether to update their dependents (i.e. the things that depend on them).
|
128
|
+
* 'never' means no dependents will be updated (unless they happen to be versioned directly as well).
|
129
|
+
* 'auto' is the default and will cause dependents to be updated (a patch version bump) when a dependency is versioned.
|
130
|
+
*/
|
131
|
+
updateDependents?: 'auto' | 'never';
|
132
|
+
/**
|
133
|
+
* Whether to log projects that have not changed during versioning.
|
134
|
+
*/
|
135
|
+
logUnchangedProjects?: boolean;
|
136
|
+
/**
|
137
|
+
* The path to the version actions implementation to use for releasing all projects by default.
|
138
|
+
* This can also be overridden on the release group and project levels.
|
139
|
+
*/
|
140
|
+
versionActions?: string;
|
141
|
+
/**
|
142
|
+
* The specific options that are defined by each version actions implementation.
|
143
|
+
* They will be passed to the version actions implementation when running a release.
|
144
|
+
*/
|
145
|
+
versionActionsOptions?: Record<string, unknown>;
|
146
|
+
/**
|
147
|
+
* Whether to preserve local dependency protocols (e.g. file references, or the `workspace:` protocol in package.json files)
|
148
|
+
* of local dependencies when updating them during versioning.
|
149
|
+
*
|
150
|
+
* This was false by default in legacy versioning, but is true by default now.
|
151
|
+
*/
|
152
|
+
preserveLocalDependencyProtocols?: boolean;
|
153
|
+
}
|
53
154
|
export interface NxReleaseChangelogConfiguration {
|
54
155
|
/**
|
55
156
|
* Optionally create a release containing all relevant changes on a supported version control system, it
|
@@ -131,6 +232,10 @@ export interface NxReleaseGitConfiguration {
|
|
131
232
|
* Whether or not to automatically push the changes made by this command to the remote git repository.
|
132
233
|
*/
|
133
234
|
push?: boolean;
|
235
|
+
/**
|
236
|
+
* Additional arguments to pass to the `git push` command invoked behind the scenes. May be a string or array of strings.
|
237
|
+
*/
|
238
|
+
pushArgs?: string | string[];
|
134
239
|
}
|
135
240
|
export interface NxReleaseConventionalCommitsConfiguration {
|
136
241
|
types?: Record<string,
|
@@ -190,7 +295,7 @@ export interface NxReleaseConfiguration {
|
|
190
295
|
*
|
191
296
|
* NOTE: git configuration is not supported at the group level, only the root/command level
|
192
297
|
*/
|
193
|
-
version?:
|
298
|
+
version?: (LegacyNxReleaseVersionConfiguration | NxReleaseVersionV2Configuration) & {
|
194
299
|
/**
|
195
300
|
* A command to run after validation of nx release configuration, but before versioning begins.
|
196
301
|
* Used for preparing build artifacts. If --dry-run is passed, the command is still executed, but
|
@@ -215,6 +320,15 @@ export interface NxReleaseConfiguration {
|
|
215
320
|
* Optionally override the git/release tag pattern to use for this group.
|
216
321
|
*/
|
217
322
|
releaseTagPattern?: string;
|
323
|
+
/**
|
324
|
+
* By default, we will try and resolve the latest match for the releaseTagPattern from the current branch,
|
325
|
+
* falling back to all branches if no match is found on the current branch.
|
326
|
+
*
|
327
|
+
* - Setting this to true will cause us to ALWAYS check all branches for the latest match.
|
328
|
+
* - Setting it to false will cause us to ONLY check the current branch for the latest match.
|
329
|
+
* - Setting it to an array of strings will cause us to check all branches WHEN the current branch matches one of the strings in the array. Glob patterns are supported.
|
330
|
+
*/
|
331
|
+
releaseTagPatternCheckAllBranchesWhen?: boolean | string[];
|
218
332
|
/**
|
219
333
|
* Enables using version plans as a specifier source for versioning and
|
220
334
|
* to determine changes for changelog generation.
|
@@ -255,19 +369,12 @@ export interface NxReleaseConfiguration {
|
|
255
369
|
automaticFromRef?: boolean;
|
256
370
|
};
|
257
371
|
/**
|
258
|
-
* If no version
|
259
|
-
*
|
372
|
+
* If no version configuration is provided, we will assume that TypeScript/JavaScript experience is what is desired,
|
373
|
+
* allowing for terser release configuration for the common case.
|
260
374
|
*/
|
261
|
-
version?:
|
262
|
-
|
263
|
-
* Enable or override configuration for git operations as part of the version subcommand
|
264
|
-
*/
|
375
|
+
version?: (LegacyNxReleaseVersionConfiguration | NxReleaseVersionV2Configuration) & {
|
376
|
+
useLegacyVersioning?: boolean;
|
265
377
|
git?: NxReleaseGitConfiguration;
|
266
|
-
/**
|
267
|
-
* A command to run after validation of nx release configuration, but before versioning begins.
|
268
|
-
* Used for preparing build artifacts. If --dry-run is passed, the command is still executed, but
|
269
|
-
* with the NX_DRY_RUN environment variable set to 'true'.
|
270
|
-
*/
|
271
378
|
preVersionCommand?: string;
|
272
379
|
};
|
273
380
|
/**
|
@@ -281,6 +388,15 @@ export interface NxReleaseConfiguration {
|
|
281
388
|
* The default releaseTagPattern for independent releases at the project level is: "{projectName}@{version}"
|
282
389
|
*/
|
283
390
|
releaseTagPattern?: string;
|
391
|
+
/**
|
392
|
+
* By default, we will try and resolve the latest match for the releaseTagPattern from the current branch,
|
393
|
+
* falling back to all branches if no match is found on the current branch.
|
394
|
+
*
|
395
|
+
* - Setting this to true will cause us to ALWAYS check all branches for the latest match.
|
396
|
+
* - Setting it to false will cause us to ONLY check the current branch for the latest match.
|
397
|
+
* - Setting it to an array of strings will cause us to check all branches WHEN the current branch matches one of the strings in the array. Glob patterns are supported.
|
398
|
+
*/
|
399
|
+
releaseTagPatternCheckAllBranchesWhen?: boolean | string[];
|
284
400
|
/**
|
285
401
|
* Enable and configure automatic git operations as part of the release
|
286
402
|
*/
|
@@ -321,6 +437,7 @@ export interface NxSyncConfiguration {
|
|
321
437
|
* @note: when adding properties here add them to `allowedWorkspaceExtensions` in adapter/compat.ts
|
322
438
|
*/
|
323
439
|
export interface NxJsonConfiguration<T = '*' | string[]> {
|
440
|
+
$schema?: string;
|
324
441
|
/**
|
325
442
|
* Optional (additional) Nx.json configuration file which becomes a base for this one
|
326
443
|
*/
|
@@ -357,7 +474,7 @@ export interface NxJsonConfiguration<T = '*' | string[]> {
|
|
357
474
|
appsDir?: string;
|
358
475
|
};
|
359
476
|
/**
|
360
|
-
* @deprecated Custom task runners will
|
477
|
+
* @deprecated Custom task runners will be replaced by a new API starting with Nx 21. More info: https://nx.dev/deprecated/custom-tasks-runner
|
361
478
|
* Available Task Runners for Nx to use
|
362
479
|
*/
|
363
480
|
tasksRunnerOptions?: {
|
@@ -471,6 +588,27 @@ export interface NxJsonConfiguration<T = '*' | string[]> {
|
|
471
588
|
* Use the legacy file system cache instead of the db cache
|
472
589
|
*/
|
473
590
|
useLegacyCache?: boolean;
|
591
|
+
/**
|
592
|
+
* Sets the maximum size of the local cache. Accepts a number followed by a unit (e.g. 100MB). Accepted units are B, KB, MB, and GB.
|
593
|
+
*/
|
594
|
+
maxCacheSize?: string;
|
595
|
+
/**
|
596
|
+
* Settings for the Nx Terminal User Interface (TUI)
|
597
|
+
*/
|
598
|
+
tui?: {
|
599
|
+
/**
|
600
|
+
* Whether to enable the TUI whenever possible (based on the current environment and terminal).
|
601
|
+
*/
|
602
|
+
enabled?: boolean;
|
603
|
+
/**
|
604
|
+
* Whether to exit the TUI automatically after all tasks finish.
|
605
|
+
*
|
606
|
+
* - If set to `true`, the TUI will exit immediately.
|
607
|
+
* - If set to `false` the TUI will not automatically exit.
|
608
|
+
* - If set to a number, an interruptible countdown popup will be shown for that many seconds before the TUI exits.
|
609
|
+
*/
|
610
|
+
autoExit?: boolean | number;
|
611
|
+
};
|
474
612
|
}
|
475
613
|
export type PluginConfiguration = string | ExpandedPluginConfiguration;
|
476
614
|
export type ExpandedPluginConfiguration<T = unknown> = {
|
@@ -74,6 +74,7 @@ export interface ProjectGraphProjectNode {
|
|
74
74
|
description?: string;
|
75
75
|
};
|
76
76
|
}
|
77
|
+
export declare function isProjectGraphProjectNode(node: ProjectGraphProjectNode | ProjectGraphExternalNode): node is ProjectGraphProjectNode;
|
77
78
|
/**
|
78
79
|
* A node describing an external dependency
|
79
80
|
* `name` has as form of:
|
@@ -85,14 +86,15 @@ export interface ProjectGraphProjectNode {
|
|
85
86
|
*
|
86
87
|
*/
|
87
88
|
export interface ProjectGraphExternalNode {
|
88
|
-
type:
|
89
|
-
name:
|
89
|
+
type: string;
|
90
|
+
name: string;
|
90
91
|
data: {
|
91
92
|
version: string;
|
92
93
|
packageName: string;
|
93
94
|
hash?: string;
|
94
95
|
};
|
95
96
|
}
|
97
|
+
export declare function isProjectGraphExternalNode(node: ProjectGraphProjectNode | ProjectGraphExternalNode): node is ProjectGraphExternalNode;
|
96
98
|
/**
|
97
99
|
* A dependency between two projects
|
98
100
|
*/
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DependencyType = void 0;
|
4
4
|
exports.fileDataDepTarget = fileDataDepTarget;
|
5
5
|
exports.fileDataDepType = fileDataDepType;
|
6
|
+
exports.isProjectGraphProjectNode = isProjectGraphProjectNode;
|
7
|
+
exports.isProjectGraphExternalNode = isProjectGraphExternalNode;
|
6
8
|
function fileDataDepTarget(dep) {
|
7
9
|
return typeof dep === 'string'
|
8
10
|
? dep
|
@@ -35,3 +37,9 @@ var DependencyType;
|
|
35
37
|
*/
|
36
38
|
DependencyType["implicit"] = "implicit";
|
37
39
|
})(DependencyType || (exports.DependencyType = DependencyType = {}));
|
40
|
+
function isProjectGraphProjectNode(node) {
|
41
|
+
return node.type === 'app' || node.type === 'e2e' || node.type === 'lib';
|
42
|
+
}
|
43
|
+
function isProjectGraphExternalNode(node) {
|
44
|
+
return isProjectGraphProjectNode(node) === false;
|
45
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { PackageJson } from '../utils/package-json';
|
2
|
-
import type { NxJsonConfiguration, NxReleaseVersionConfiguration } from './nx-json';
|
2
|
+
import type { NxJsonConfiguration, NxReleaseVersionConfiguration, NxReleaseVersionV2Configuration } from './nx-json';
|
3
3
|
/**
|
4
4
|
* @deprecated use ProjectsConfigurations or NxJsonConfiguration
|
5
5
|
*/
|
@@ -98,7 +98,7 @@ export interface ProjectConfiguration {
|
|
98
98
|
* Project specific configuration for `nx release`
|
99
99
|
*/
|
100
100
|
release?: {
|
101
|
-
version?: Pick<NxReleaseVersionConfiguration, 'generator' | 'generatorOptions'>;
|
101
|
+
version?: Pick<NxReleaseVersionConfiguration, 'generator' | 'generatorOptions'> | Pick<NxReleaseVersionV2Configuration, 'versionActions' | 'versionActionsOptions' | 'manifestRootsToUpdate' | 'currentVersionResolver' | 'currentVersionResolverMetadata' | 'fallbackCurrentVersionResolver' | 'versionPrefix' | 'preserveLocalDependencyProtocols'>;
|
102
102
|
};
|
103
103
|
/**
|
104
104
|
* Metadata about the project
|