nx 17.0.3 → 17.0.5
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/LICENSE +1 -1
- package/README.md +9 -4
- package/bin/init-local.js +10 -60
- package/bin/nx-cloud.js +6 -0
- package/bin/nx.js +1 -9
- package/bin/post-install.js +5 -1
- package/bin/run-executor.js +1 -1
- package/migrations.json +18 -0
- package/package.json +21 -18
- package/plugins/package-json.js +1 -1
- package/{changelog-renderer → release/changelog-renderer}/index.d.ts +18 -3
- package/{changelog-renderer → release/changelog-renderer}/index.js +78 -34
- package/release/index.d.ts +4 -0
- package/release/index.js +11 -0
- package/schemas/nx-schema.json +203 -19
- package/schemas/project-schema.json +20 -0
- package/src/adapter/angular-json.js +28 -18
- package/src/adapter/compat.d.ts +2 -2
- package/src/adapter/compat.js +6 -1
- package/src/adapter/ngcli-adapter.d.ts +16 -4
- package/src/adapter/ngcli-adapter.js +85 -28
- package/src/command-line/add/add.d.ts +2 -0
- package/src/command-line/add/add.js +169 -0
- package/src/command-line/add/command-object.d.ts +7 -0
- package/src/command-line/add/command-object.js +24 -0
- package/src/command-line/affected/affected.js +0 -3
- package/src/command-line/affected/command-object.d.ts +4 -4
- package/src/command-line/affected/command-object.js +53 -26
- package/src/command-line/affected/print-affected.js +10 -1
- package/src/command-line/connect/command-object.d.ts +1 -2
- package/src/command-line/connect/command-object.js +3 -7
- package/src/command-line/connect/connect-to-nx-cloud.d.ts +4 -5
- package/src/command-line/connect/connect-to-nx-cloud.js +43 -31
- package/src/command-line/connect/view-logs.js +5 -21
- package/src/command-line/examples.js +18 -0
- package/src/command-line/exec/command-object.js +2 -1
- package/src/command-line/exec/exec.d.ts +1 -1
- package/src/command-line/exec/exec.js +78 -35
- package/src/command-line/format/format.js +13 -4
- package/src/command-line/generate/generate.js +9 -9
- package/src/command-line/generate/generator-utils.d.ts +3 -2
- package/src/command-line/generate/generator-utils.js +5 -5
- package/src/command-line/graph/graph.d.ts +1 -1
- package/src/command-line/graph/graph.js +82 -37
- package/src/command-line/init/command-object.js +70 -43
- package/src/command-line/init/implementation/add-nx-to-monorepo.d.ts +4 -2
- package/src/command-line/init/implementation/add-nx-to-monorepo.js +11 -2
- package/src/command-line/init/implementation/add-nx-to-nest.d.ts +1 -1
- package/src/command-line/init/implementation/add-nx-to-nest.js +9 -6
- package/src/command-line/init/implementation/add-nx-to-npm-repo.d.ts +4 -2
- package/src/command-line/init/implementation/add-nx-to-npm-repo.js +14 -4
- package/src/command-line/init/implementation/angular/index.js +4 -1
- package/src/command-line/init/implementation/angular/legacy-angular-versions.js +10 -5
- package/src/command-line/init/implementation/angular/standalone-workspace.js +1 -1
- package/src/command-line/init/implementation/angular/types.d.ts +1 -1
- package/src/command-line/init/implementation/dot-nx/nxw.js +47 -16
- package/src/command-line/init/implementation/react/index.d.ts +1 -1
- package/src/command-line/init/implementation/react/index.js +4 -2
- package/src/command-line/init/implementation/react/rename-js-to-jsx.js +4 -2
- package/src/command-line/init/implementation/utils.d.ts +5 -5
- package/src/command-line/init/implementation/utils.js +46 -44
- package/src/command-line/init/{init.js → init-v1.js} +5 -13
- package/src/command-line/init/init-v2.d.ts +7 -0
- package/src/command-line/init/init-v2.js +201 -0
- package/src/command-line/list/list.js +6 -5
- package/src/command-line/migrate/command-object.js +19 -4
- package/src/command-line/migrate/migrate.js +21 -17
- package/src/command-line/new/new.js +1 -1
- package/src/command-line/nx-commands.js +4 -1
- package/src/command-line/release/changelog.d.ts +22 -1
- package/src/command-line/release/changelog.js +459 -257
- package/src/command-line/release/command-object.d.ts +29 -7
- package/src/command-line/release/command-object.js +120 -20
- package/src/command-line/release/config/config.d.ts +26 -21
- package/src/command-line/release/config/config.js +416 -59
- package/src/command-line/release/config/conventional-commits.d.ts +2 -0
- package/src/command-line/release/config/conventional-commits.js +98 -0
- package/src/command-line/release/config/filter-release-groups.d.ts +1 -2
- package/src/command-line/release/config/filter-release-groups.js +38 -1
- package/src/command-line/release/index.d.ts +16 -0
- package/src/command-line/release/index.js +23 -0
- package/src/command-line/release/publish.d.ts +7 -3
- package/src/command-line/release/publish.js +89 -37
- package/src/command-line/release/release.d.ts +4 -0
- package/src/command-line/release/release.js +176 -0
- package/src/command-line/release/utils/batch-projects-by-generator-config.d.ts +7 -0
- package/src/command-line/release/utils/batch-projects-by-generator-config.js +37 -0
- package/src/command-line/release/utils/exec-command.d.ts +1 -0
- package/src/command-line/release/utils/exec-command.js +34 -0
- package/src/command-line/release/utils/git.d.ts +34 -1
- package/src/command-line/release/utils/git.js +238 -34
- package/src/command-line/release/utils/github.d.ts +5 -5
- package/src/command-line/release/utils/github.js +155 -8
- package/src/command-line/release/utils/markdown.js +6 -1
- package/src/command-line/release/utils/print-changes.d.ts +1 -1
- package/src/command-line/release/utils/print-changes.js +3 -3
- package/src/command-line/release/utils/resolve-nx-json-error-message.js +4 -1
- package/src/command-line/release/utils/resolve-semver-specifier.d.ts +4 -0
- package/src/command-line/release/utils/resolve-semver-specifier.js +58 -0
- package/src/command-line/release/utils/semver.d.ts +8 -0
- package/src/command-line/release/utils/semver.js +30 -1
- package/src/command-line/release/utils/shared.d.ts +39 -0
- package/src/command-line/release/utils/shared.js +213 -0
- package/src/command-line/release/version.d.ts +37 -3
- package/src/command-line/release/version.js +312 -117
- package/src/command-line/repair/repair.js +13 -9
- package/src/command-line/report/report.d.ts +3 -0
- package/src/command-line/report/report.js +22 -5
- package/src/command-line/run/command-object.d.ts +4 -0
- package/src/command-line/run/command-object.js +18 -2
- package/src/command-line/run/executor-utils.d.ts +2 -1
- package/src/command-line/run/executor-utils.js +4 -4
- package/src/command-line/run/run-one.js +3 -6
- package/src/command-line/run/run.js +34 -9
- package/src/command-line/run-many/command-object.js +4 -1
- package/src/command-line/run-many/run-many.js +0 -3
- package/src/command-line/show/command-object.d.ts +3 -0
- package/src/command-line/show/command-object.js +29 -2
- package/src/command-line/show/show.js +9 -0
- package/src/command-line/yargs-utils/shared-options.d.ts +4 -1
- package/src/command-line/yargs-utils/shared-options.js +23 -9
- package/src/commands-runner/command-graph.d.ts +13 -0
- package/src/commands-runner/command-graph.js +2 -0
- package/src/commands-runner/create-command-graph.d.ts +4 -0
- package/src/commands-runner/create-command-graph.js +44 -0
- package/src/commands-runner/get-command-projects.d.ts +3 -0
- package/src/commands-runner/get-command-projects.js +19 -0
- package/src/config/nx-json.d.ts +160 -25
- package/src/config/project-graph.d.ts +3 -3
- package/src/config/workspace-json-project-json.d.ts +23 -1
- package/src/config/workspaces.d.ts +1 -1
- package/src/config/workspaces.js +4 -6
- package/src/core/graph/3rdpartylicenses.txt +144 -74
- package/src/core/graph/environment.js +1 -1
- package/src/core/graph/index.html +4 -6
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/runtime.js +1 -1
- package/src/core/graph/styles.css +3 -3
- package/src/core/graph/styles.js +1 -1
- package/src/daemon/client/client.d.ts +5 -1
- package/src/daemon/client/client.js +27 -8
- package/src/daemon/client/{socket-messenger.d.ts → daemon-socket-messenger.d.ts} +1 -1
- package/src/daemon/client/{socket-messenger.js → daemon-socket-messenger.js} +3 -3
- package/src/daemon/daemon-project-graph-error.d.ts +8 -0
- package/src/daemon/daemon-project-graph-error.js +13 -0
- package/src/daemon/server/handle-hash-tasks.js +12 -2
- package/src/daemon/server/handle-request-project-graph.js +1 -1
- package/src/daemon/server/project-graph-incremental-recomputation.d.ts +14 -13
- package/src/daemon/server/project-graph-incremental-recomputation.js +98 -33
- package/src/daemon/server/shutdown-utils.js +2 -4
- package/src/daemon/server/watcher.js +0 -3
- package/src/daemon/socket-utils.d.ts +2 -1
- package/src/daemon/socket-utils.js +15 -4
- package/src/daemon/tmp-dir.d.ts +1 -0
- package/src/daemon/tmp-dir.js +4 -4
- package/src/devkit-exports.d.ts +2 -2
- package/src/devkit-exports.js +3 -2
- package/src/devkit-internals.d.ts +3 -0
- package/src/devkit-internals.js +7 -1
- package/src/executors/noop/schema.json +1 -1
- package/src/executors/run-commands/run-commands.impl.d.ts +10 -2
- package/src/executors/run-commands/run-commands.impl.js +152 -48
- package/src/executors/run-commands/schema.json +11 -1
- package/src/executors/run-script/run-script.impl.js +43 -11
- package/src/executors/utils/convert-nx-executor.js +1 -1
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.d.ts +3 -1
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +4 -2
- package/src/generators/testing-utils/create-tree-with-empty-workspace.js +0 -6
- package/src/generators/tree.d.ts +1 -0
- package/src/generators/utils/glob.js +2 -2
- package/src/generators/utils/project-configuration.js +28 -9
- package/src/hasher/create-task-hasher.d.ts +4 -0
- package/src/hasher/create-task-hasher.js +16 -0
- package/src/hasher/hash-task.js +9 -3
- package/src/hasher/native-task-hasher-impl.d.ts +19 -0
- package/src/hasher/native-task-hasher-impl.js +37 -0
- package/src/hasher/node-task-hasher-impl.d.ts +49 -0
- package/src/hasher/node-task-hasher-impl.js +431 -0
- package/src/hasher/task-hasher.d.ts +33 -21
- package/src/hasher/task-hasher.js +30 -428
- package/src/migrations/update-15-0-0/migrate-to-inputs.js +5 -5
- package/src/migrations/update-15-1-0/set-project-names.js +2 -1
- package/src/migrations/update-15-8-2/update-nxw.js +2 -6
- package/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +3 -3
- package/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +49 -13
- package/src/migrations/update-17-2-0/move-default-base.d.ts +5 -0
- package/src/migrations/update-17-2-0/move-default-base.js +21 -0
- package/src/migrations/update-17-3-0/nx-release-path.d.ts +3 -0
- package/src/migrations/update-17-3-0/nx-release-path.js +48 -0
- package/src/migrations/update-17-3-0/update-nxw.d.ts +2 -0
- package/src/migrations/update-17-3-0/update-nxw.js +7 -0
- package/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.d.ts +2 -0
- package/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +9 -0
- package/src/native/index.d.ts +65 -15
- package/src/native/index.js +6 -2
- package/src/native/transform-objects.js +2 -0
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts +1 -0
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +13 -12
- package/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +6 -1
- package/src/nx-cloud/update-manager.js +2 -1
- package/src/plugins/js/index.d.ts +1 -1
- package/src/plugins/js/index.js +3 -3
- package/src/plugins/js/lock-file/lock-file.d.ts +2 -2
- package/src/plugins/js/lock-file/lock-file.js +15 -3
- package/src/plugins/js/package-json/create-package-json.js +1 -1
- package/src/plugins/js/project-graph/build-dependencies/strip-source-code.d.ts +1 -1
- package/src/plugins/js/project-graph/build-dependencies/strip-source-code.js +1 -1
- package/src/plugins/js/project-graph/build-dependencies/typescript-import-locator.d.ts +1 -1
- package/src/plugins/js/project-graph/build-dependencies/typescript-import-locator.js +1 -1
- package/src/plugins/js/utils/register.d.ts +1 -1
- package/src/plugins/js/utils/register.js +28 -8
- package/src/plugins/js/versions.d.ts +1 -1
- package/src/plugins/js/versions.js +1 -1
- package/{plugins/package-json-workspaces.d.ts → src/plugins/package-json-workspaces/create-nodes.d.ts} +4 -4
- package/{plugins/package-json-workspaces.js → src/plugins/package-json-workspaces/create-nodes.js} +34 -12
- package/src/plugins/package-json-workspaces/index.d.ts +1 -0
- package/src/plugins/package-json-workspaces/index.js +4 -0
- package/src/plugins/project-json/build-nodes/package-json-next-to-project-json.d.ts +2 -0
- package/src/plugins/project-json/build-nodes/package-json-next-to-project-json.js +47 -0
- package/src/plugins/project-json/build-nodes/project-json.d.ts +2 -5
- package/src/plugins/project-json/build-nodes/project-json.js +6 -44
- package/src/plugins/target-defaults/target-defaults-plugin.d.ts +66 -0
- package/src/plugins/target-defaults/target-defaults-plugin.js +182 -0
- package/src/project-graph/affected/locators/project-glob-changes.js +3 -3
- package/src/project-graph/affected/locators/workspace-projects.d.ts +0 -2
- package/src/project-graph/affected/locators/workspace-projects.js +16 -29
- package/src/project-graph/build-project-graph.d.ts +20 -1
- package/src/project-graph/build-project-graph.js +91 -33
- package/src/project-graph/file-map-utils.d.ts +9 -5
- package/src/project-graph/file-map-utils.js +16 -63
- package/src/project-graph/file-utils.d.ts +1 -1
- package/src/project-graph/file-utils.js +44 -2
- package/src/project-graph/nx-deps-cache.js +1 -1
- package/src/project-graph/project-graph-builder.d.ts +1 -1
- package/src/project-graph/project-graph-builder.js +1 -1
- package/src/project-graph/project-graph.d.ts +32 -1
- package/src/project-graph/project-graph.js +147 -23
- package/src/project-graph/utils/build-all-workspace-files.d.ts +2 -0
- package/src/project-graph/utils/build-all-workspace-files.js +15 -0
- package/src/project-graph/utils/normalize-project-nodes.d.ts +2 -3
- package/src/project-graph/utils/normalize-project-nodes.js +7 -33
- package/src/project-graph/utils/project-configuration-utils.d.ts +66 -4
- package/src/project-graph/utils/project-configuration-utils.js +509 -62
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +12 -31
- package/src/project-graph/utils/retrieve-workspace-files.js +27 -90
- package/src/tasks-runner/batch/run-batch.js +3 -3
- package/src/tasks-runner/cache.js +6 -3
- package/src/tasks-runner/create-task-graph.js +1 -1
- package/src/tasks-runner/fork.d.ts +1 -0
- package/src/tasks-runner/fork.js +23 -0
- package/src/tasks-runner/forked-process-task-runner.d.ts +13 -5
- package/src/tasks-runner/forked-process-task-runner.js +112 -21
- package/src/tasks-runner/init-tasks-runner.js +1 -1
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +28 -28
- package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +19 -22
- package/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.js +1 -3
- package/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.js +1 -3
- package/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +2 -4
- package/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.d.ts +1 -0
- package/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +11 -5
- package/src/tasks-runner/life-cycles/view-logs-utils.js +1 -1
- package/src/tasks-runner/pseudo-ipc.d.ts +49 -0
- package/src/tasks-runner/pseudo-ipc.js +140 -0
- package/src/tasks-runner/pseudo-terminal.d.ts +43 -0
- package/src/tasks-runner/pseudo-terminal.js +159 -0
- package/src/tasks-runner/run-command.d.ts +1 -1
- package/src/tasks-runner/run-command.js +13 -19
- package/src/tasks-runner/task-env.js +1 -2
- package/src/tasks-runner/task-graph-utils.d.ts +7 -3
- package/src/tasks-runner/task-graph-utils.js +15 -15
- package/src/tasks-runner/task-orchestrator.js +68 -12
- package/src/tasks-runner/tasks-schedule.js +3 -3
- package/src/tasks-runner/utils.d.ts +16 -7
- package/src/tasks-runner/utils.js +30 -16
- package/src/utils/ab-testing.d.ts +36 -2
- package/src/utils/ab-testing.js +34 -16
- package/src/utils/assert-workspace-validity.js +1 -1
- package/src/utils/cache-directory.d.ts +1 -0
- package/src/utils/cache-directory.js +5 -1
- package/src/utils/child-process.d.ts +15 -1
- package/src/utils/child-process.js +91 -1
- package/src/utils/command-line-utils.js +2 -1
- package/src/utils/exit-codes.d.ts +6 -0
- package/src/utils/exit-codes.js +20 -0
- package/src/utils/fileutils.d.ts +1 -0
- package/src/utils/find-matching-projects.js +5 -5
- package/src/utils/find-workspace-root.js +1 -0
- package/src/utils/ignore.js +8 -1
- package/src/utils/json-diff.d.ts +1 -0
- package/src/utils/json-diff.js +2 -1
- package/src/utils/json.js +3 -1
- package/src/utils/logger.js +1 -1
- package/src/utils/nx-cloud-utils.d.ts +1 -1
- package/src/utils/nx-cloud-utils.js +9 -4
- package/src/utils/nx-plugin.d.ts +32 -15
- package/src/utils/nx-plugin.deprecated.d.ts +10 -5
- package/src/utils/nx-plugin.deprecated.js +23 -0
- package/src/utils/nx-plugin.js +71 -80
- package/src/utils/output.d.ts +4 -2
- package/src/utils/output.js +44 -9
- package/src/utils/package-json.d.ts +4 -4
- package/src/utils/package-json.js +18 -12
- package/src/utils/package-manager.d.ts +7 -0
- package/src/utils/package-manager.js +24 -4
- package/src/utils/params.d.ts +12 -4
- package/src/utils/params.js +37 -4
- package/src/utils/plugins/core-plugins.js +8 -0
- package/src/utils/plugins/installed-plugins.d.ts +2 -1
- package/src/utils/plugins/installed-plugins.js +2 -2
- package/src/utils/plugins/local-plugins.js +1 -1
- package/src/utils/plugins/plugin-capabilities.d.ts +3 -2
- package/src/utils/plugins/plugin-capabilities.js +7 -7
- package/src/utils/typescript.js +1 -1
- package/src/utils/update-nxw.d.ts +2 -0
- package/src/utils/update-nxw.js +12 -0
- package/src/utils/workspace-configuration-check.js +1 -1
- package/src/utils/workspace-context.d.ts +6 -4
- package/src/utils/workspace-context.js +19 -9
- package/src/core/graph/polyfills.js +0 -1
- /package/src/command-line/init/{init.d.ts → init-v1.d.ts} +0 -0
package/src/config/nx-json.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChangelogRenderOptions } from '../../changelog-renderer';
|
|
1
|
+
import type { ChangelogRenderOptions } from '../../release/changelog-renderer';
|
|
2
2
|
import { PackageManager } from '../utils/package-manager';
|
|
3
3
|
import { InputDefinition, TargetConfiguration, TargetDependencyConfig } from './workspace-json-project-json';
|
|
4
4
|
export type ImplicitDependencyEntry<T = '*' | string[]> = {
|
|
@@ -7,6 +7,9 @@ export type ImplicitDependencyEntry<T = '*' | string[]> = {
|
|
|
7
7
|
export interface ImplicitJsonSubsetDependency<T = '*' | string[]> {
|
|
8
8
|
[key: string]: T | ImplicitJsonSubsetDependency<T>;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Use {@link NxJsonConfiguration#defaultBase } instead
|
|
12
|
+
*/
|
|
10
13
|
export interface NxAffectedConfig {
|
|
11
14
|
/**
|
|
12
15
|
* Default based branch used by affected commands.
|
|
@@ -31,23 +34,28 @@ interface NxInstallationConfiguration {
|
|
|
31
34
|
*/
|
|
32
35
|
plugins?: Record<string, string>;
|
|
33
36
|
}
|
|
34
|
-
|
|
35
|
-
* **ALPHA**
|
|
36
|
-
*/
|
|
37
|
-
interface NxReleaseVersionConfiguration {
|
|
37
|
+
export interface NxReleaseVersionConfiguration {
|
|
38
38
|
generator?: string;
|
|
39
39
|
generatorOptions?: Record<string, unknown>;
|
|
40
|
+
/**
|
|
41
|
+
* Enabling support for parsing semver bumps via conventional commits and reading the current version from
|
|
42
|
+
* git tags is so common that we have a first class shorthand for it, which is false by default.
|
|
43
|
+
*
|
|
44
|
+
* Setting this to true is the same as adding the following to version.generatorOptions:
|
|
45
|
+
* - currentVersionResolver: "git-tag"
|
|
46
|
+
* - specifierSource: "conventional-commits"
|
|
47
|
+
*
|
|
48
|
+
* If the user attempts to mix and match these options with the shorthand, we will provide a helpful error.
|
|
49
|
+
*/
|
|
50
|
+
conventionalCommits?: boolean;
|
|
40
51
|
}
|
|
41
|
-
/**
|
|
42
|
-
* **ALPHA**
|
|
43
|
-
*/
|
|
44
52
|
export interface NxReleaseChangelogConfiguration {
|
|
45
53
|
/**
|
|
46
54
|
* Optionally create a release containing all relevant changes on a supported version control system, it
|
|
47
55
|
* is false by default.
|
|
48
56
|
*
|
|
49
57
|
* NOTE: if createRelease is set on a group of projects, it will cause the default releaseTagPattern of
|
|
50
|
-
* "{projectName}@
|
|
58
|
+
* "{projectName}@{version}" to be used for those projects, even when versioning everything together.
|
|
51
59
|
*/
|
|
52
60
|
createRelease?: 'github' | false;
|
|
53
61
|
/**
|
|
@@ -77,21 +85,82 @@ export interface NxReleaseChangelogConfiguration {
|
|
|
77
85
|
* A path to a valid changelog renderer function used to transform commit messages and other metadata into
|
|
78
86
|
* the final changelog (usually in markdown format). Its output can be modified using the optional `renderOptions`.
|
|
79
87
|
*
|
|
80
|
-
* By default, the renderer is set to "nx/changelog-renderer" which nx provides out of the box.
|
|
88
|
+
* By default, the renderer is set to "nx/release/changelog-renderer" which nx provides out of the box.
|
|
81
89
|
*/
|
|
82
90
|
renderer?: string;
|
|
83
91
|
renderOptions?: ChangelogRenderOptions;
|
|
84
92
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
93
|
+
export interface NxReleaseGitConfiguration {
|
|
94
|
+
/**
|
|
95
|
+
* Whether or not to automatically commit the changes made by current command
|
|
96
|
+
*/
|
|
97
|
+
commit?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Custom git commit message to use when committing the changes made by this command {version} will be dynamically interpolated when performing fixed releases, interpolated tags will be appended to the commit body when performing independent releases.
|
|
100
|
+
*/
|
|
101
|
+
commitMessage?: string;
|
|
102
|
+
/**
|
|
103
|
+
* Additional arguments (added after the --message argument, which may or may not be customized with --git-commit-message) to pass to the `git commit` command invoked behind the scenes
|
|
104
|
+
*/
|
|
105
|
+
commitArgs?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Whether or not to stage the changes made by this command. Always treated as true if commit is true.
|
|
108
|
+
*/
|
|
109
|
+
stageChanges?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Whether or not to automatically tag the changes made by this command
|
|
112
|
+
*/
|
|
113
|
+
tag?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Custom git tag message to use when tagging the changes made by this command. This defaults to be the same value as the tag itself.
|
|
116
|
+
*/
|
|
117
|
+
tagMessage?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Additional arguments to pass to the `git tag` command invoked behind the scenes
|
|
120
|
+
*/
|
|
121
|
+
tagArgs?: string;
|
|
122
|
+
}
|
|
123
|
+
export interface NxReleaseConventionalCommitsConfiguration {
|
|
124
|
+
types?: Record<string,
|
|
125
|
+
/**
|
|
126
|
+
* A map of commit types to their configuration.
|
|
127
|
+
* If a type is set to 'true', then it will be enabled with the default 'semverBump' of 'patch' and will appear in the changelog.
|
|
128
|
+
* If a type is set to 'false', then it will not trigger a version bump and will be hidden from the changelog.
|
|
129
|
+
*/
|
|
130
|
+
{
|
|
131
|
+
/**
|
|
132
|
+
* The semver bump to apply when a commit of this type is found.
|
|
133
|
+
* If set to "none", the commit will be ignored for versioning purposes.
|
|
134
|
+
*/
|
|
135
|
+
semverBump?: 'patch' | 'minor' | 'major' | 'none';
|
|
136
|
+
/**
|
|
137
|
+
* Configuration for the changelog section for commits of this type.
|
|
138
|
+
* If set to 'true', then commits of this type will be included in the changelog with their default title for the type.
|
|
139
|
+
* If set to 'false', then commits of this type will not be included in the changelog.
|
|
140
|
+
*/
|
|
141
|
+
changelog?: {
|
|
142
|
+
title?: string;
|
|
143
|
+
hidden?: boolean;
|
|
144
|
+
} | boolean;
|
|
145
|
+
} | boolean>;
|
|
146
|
+
}
|
|
88
147
|
interface NxReleaseConfiguration {
|
|
89
148
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
149
|
+
* Shorthand for amending the projects which will be included in the implicit default release group (all projects by default).
|
|
150
|
+
* @note Only one of `projects` or `groups` can be specified, the cannot be used together.
|
|
151
|
+
*/
|
|
152
|
+
projects?: string[] | string;
|
|
153
|
+
/**
|
|
154
|
+
* @note When no projects or groups are configured at all (the default), all projects in the workspace are treated as
|
|
155
|
+
* if they were in a release group together with a fixed relationship.
|
|
92
156
|
*/
|
|
93
157
|
groups?: Record<string, // group name
|
|
94
158
|
{
|
|
159
|
+
/**
|
|
160
|
+
* Whether to version and release projects within the group independently, or together in lock step ("fixed").
|
|
161
|
+
* If not set on the group, this will be informed by the projectsRelationship config at the top level.
|
|
162
|
+
*/
|
|
163
|
+
projectsRelationship?: 'fixed' | 'independent';
|
|
95
164
|
/**
|
|
96
165
|
* Required list of one or more projects to include in the release group. Any single project can
|
|
97
166
|
* only be used in a maximum of one release group.
|
|
@@ -99,37 +168,92 @@ interface NxReleaseConfiguration {
|
|
|
99
168
|
projects: string[] | string;
|
|
100
169
|
/**
|
|
101
170
|
* Optionally override version configuration for this group.
|
|
171
|
+
*
|
|
172
|
+
* NOTE: git configuration is not supported at the group level, only the root/command level
|
|
102
173
|
*/
|
|
103
174
|
version?: NxReleaseVersionConfiguration;
|
|
104
175
|
/**
|
|
105
|
-
*
|
|
176
|
+
* Project changelogs are disabled by default.
|
|
177
|
+
*
|
|
178
|
+
* Here you can optionally override project changelog configuration for this group.
|
|
179
|
+
* Notes about boolean values:
|
|
180
|
+
*
|
|
181
|
+
* - true = enable project level changelogs using default configuration
|
|
182
|
+
* - false = explicitly disable project level changelogs
|
|
183
|
+
*
|
|
184
|
+
* NOTE: git configuration is not supported at the group level, only the root/command level
|
|
106
185
|
*/
|
|
107
|
-
changelog?: NxReleaseChangelogConfiguration |
|
|
186
|
+
changelog?: NxReleaseChangelogConfiguration | boolean;
|
|
108
187
|
/**
|
|
109
188
|
* Optionally override the git/release tag pattern to use for this group.
|
|
110
189
|
*/
|
|
111
190
|
releaseTagPattern?: string;
|
|
112
191
|
}>;
|
|
192
|
+
/**
|
|
193
|
+
* Configures the default value for all groups that don't explicitly state their own projectsRelationship.
|
|
194
|
+
*
|
|
195
|
+
* By default, this is set to "fixed" which means all projects in the workspace will be versioned and
|
|
196
|
+
* released together in lock step.
|
|
197
|
+
*/
|
|
198
|
+
projectsRelationship?: 'fixed' | 'independent';
|
|
113
199
|
changelog?: {
|
|
114
|
-
|
|
115
|
-
|
|
200
|
+
/**
|
|
201
|
+
* Enable or override configuration for git operations as part of the changelog subcommand
|
|
202
|
+
*/
|
|
203
|
+
git?: NxReleaseGitConfiguration;
|
|
204
|
+
/**
|
|
205
|
+
* Workspace changelog is enabled by default. Notes about boolean values:
|
|
206
|
+
*
|
|
207
|
+
* - true = explicitly enable workspace changelog using default configuration
|
|
208
|
+
* - false = disable workspace changelog
|
|
209
|
+
*/
|
|
210
|
+
workspaceChangelog?: NxReleaseChangelogConfiguration | boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Project changelogs are disabled by default. Notes about boolean values:
|
|
213
|
+
*
|
|
214
|
+
* - true = enable project level changelogs using default configuration
|
|
215
|
+
* - false = explicitly disable project level changelogs
|
|
216
|
+
*/
|
|
217
|
+
projectChangelogs?: NxReleaseChangelogConfiguration | boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Whether or not to automatically look up the first commit for the workspace (or package, if versioning independently)
|
|
220
|
+
* and use that as the starting point for changelog generation. If this is not enabled, changelog generation will fail
|
|
221
|
+
* if there is no previous matching git tag to use as a starting point.
|
|
222
|
+
*/
|
|
223
|
+
automaticFromRef?: boolean;
|
|
116
224
|
};
|
|
117
225
|
/**
|
|
118
226
|
* If no version config is provided, we will assume that @nx/js:release-version
|
|
119
227
|
* is the desired generator implementation, allowing for terser config for the common case.
|
|
120
228
|
*/
|
|
121
|
-
version?: NxReleaseVersionConfiguration
|
|
229
|
+
version?: NxReleaseVersionConfiguration & {
|
|
230
|
+
/**
|
|
231
|
+
* Enable or override configuration for git operations as part of the version subcommand
|
|
232
|
+
*/
|
|
233
|
+
git?: NxReleaseGitConfiguration;
|
|
234
|
+
/**
|
|
235
|
+
* A command to run after validation of nx release configuration, but before versioning begins.
|
|
236
|
+
* Used for preparing build artifacts. If --dry-run is passed, the command is still executed, but
|
|
237
|
+
* with the NX_DRY_RUN environment variable set to 'true'.
|
|
238
|
+
*/
|
|
239
|
+
preVersionCommand?: string;
|
|
240
|
+
};
|
|
122
241
|
/**
|
|
123
|
-
*
|
|
124
|
-
* for changelog generation and release tagging, as well as for conventional
|
|
242
|
+
* Optionally override the git/release tag pattern to use. This field is the source of truth
|
|
243
|
+
* for changelog generation and release tagging, as well as for conventional commits parsing.
|
|
125
244
|
*
|
|
126
245
|
* It supports interpolating the version as {version} and (if releasing independently or forcing
|
|
127
246
|
* project level version control system releases) the project name as {projectName} within the string.
|
|
128
247
|
*
|
|
129
|
-
* The default releaseTagPattern for unified releases is: "v{version}"
|
|
130
|
-
* The default releaseTagPattern for releases at the project level is: "{projectName}@
|
|
248
|
+
* The default releaseTagPattern for fixed/unified releases is: "v{version}"
|
|
249
|
+
* The default releaseTagPattern for independent releases at the project level is: "{projectName}@{version}"
|
|
131
250
|
*/
|
|
132
251
|
releaseTagPattern?: string;
|
|
252
|
+
/**
|
|
253
|
+
* Enable and configure automatic git operations as part of the release
|
|
254
|
+
*/
|
|
255
|
+
git?: NxReleaseGitConfiguration;
|
|
256
|
+
conventionalCommits?: NxReleaseConventionalCommitsConfiguration;
|
|
133
257
|
}
|
|
134
258
|
/**
|
|
135
259
|
* Nx.json configuration
|
|
@@ -158,8 +282,13 @@ export interface NxJsonConfiguration<T = '*' | string[]> {
|
|
|
158
282
|
targetDefaults?: TargetDefaults;
|
|
159
283
|
/**
|
|
160
284
|
* Default options for `nx affected`
|
|
285
|
+
* @deprecated use {@link defaultBase} instead. For more information see https://nx.dev/deprecated/affected-config#affected-config
|
|
161
286
|
*/
|
|
162
287
|
affected?: NxAffectedConfig;
|
|
288
|
+
/**
|
|
289
|
+
* Default value for --base used by `nx affected` and `nx format`.
|
|
290
|
+
*/
|
|
291
|
+
defaultBase?: string;
|
|
163
292
|
/**
|
|
164
293
|
* Where new apps + libs should be placed
|
|
165
294
|
*/
|
|
@@ -231,7 +360,7 @@ export interface NxJsonConfiguration<T = '*' | string[]> {
|
|
|
231
360
|
*/
|
|
232
361
|
installation?: NxInstallationConfiguration;
|
|
233
362
|
/**
|
|
234
|
-
*
|
|
363
|
+
* Configuration for `nx release` (versioning and publishing of applications and libraries)
|
|
235
364
|
*/
|
|
236
365
|
release?: NxReleaseConfiguration;
|
|
237
366
|
/**
|
|
@@ -260,10 +389,16 @@ export interface NxJsonConfiguration<T = '*' | string[]> {
|
|
|
260
389
|
* Set this to false to disable the daemon.
|
|
261
390
|
*/
|
|
262
391
|
useDaemonProcess?: boolean;
|
|
392
|
+
/**
|
|
393
|
+
* Set this to false to disable adding inference plugins when generating new projects
|
|
394
|
+
*/
|
|
395
|
+
useInferencePlugins?: boolean;
|
|
263
396
|
}
|
|
264
397
|
export type PluginConfiguration = string | {
|
|
265
398
|
plugin: string;
|
|
266
399
|
options?: unknown;
|
|
400
|
+
include?: string[];
|
|
401
|
+
exclude?: string[];
|
|
267
402
|
};
|
|
268
403
|
export declare function readNxJson(root?: string): NxJsonConfiguration;
|
|
269
404
|
export declare function hasNxJson(root: string): boolean;
|
|
@@ -24,7 +24,7 @@ export interface FileData {
|
|
|
24
24
|
*/
|
|
25
25
|
export type FileDataDependency = string | [target: string, type: DependencyType] | [source: string, target: string, type: DependencyType];
|
|
26
26
|
export declare function fileDataDepTarget(dep: FileDataDependency): string;
|
|
27
|
-
export declare function fileDataDepType(dep: FileDataDependency):
|
|
27
|
+
export declare function fileDataDepType(dep: FileDataDependency): "static" | DependencyType;
|
|
28
28
|
export interface FileMap {
|
|
29
29
|
nonProjectFiles: FileData[];
|
|
30
30
|
projectFileMap: ProjectFileMap;
|
|
@@ -111,7 +111,7 @@ export interface ProjectGraphDependency {
|
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
113
|
* Additional information to be used to process a project graph
|
|
114
|
-
* @deprecated The {@link ProjectGraphProcessor} is deprecated. This will be removed in Nx
|
|
114
|
+
* @deprecated The {@link ProjectGraphProcessor} is deprecated. This will be removed in Nx 19.
|
|
115
115
|
*/
|
|
116
116
|
export interface ProjectGraphProcessorContext {
|
|
117
117
|
/**
|
|
@@ -132,6 +132,6 @@ export interface ProjectGraphProcessorContext {
|
|
|
132
132
|
}
|
|
133
133
|
/**
|
|
134
134
|
* A function that produces an updated ProjectGraph
|
|
135
|
-
* @deprecated Use {@link CreateNodes} and {@link CreateDependencies} instead. This will be removed in Nx
|
|
135
|
+
* @deprecated Use {@link CreateNodes} and {@link CreateDependencies} instead. This will be removed in Nx 19.
|
|
136
136
|
*/
|
|
137
137
|
export type ProjectGraphProcessor = (currentGraph: ProjectGraph, context: ProjectGraphProcessorContext) => ProjectGraph | Promise<ProjectGraph>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NxJsonConfiguration } from './nx-json';
|
|
1
|
+
import type { NxJsonConfiguration, NxReleaseVersionConfiguration } from './nx-json';
|
|
2
2
|
/**
|
|
3
3
|
* @deprecated use ProjectsConfigurations or NxJsonConfiguration
|
|
4
4
|
*/
|
|
@@ -93,6 +93,24 @@ export interface ProjectConfiguration {
|
|
|
93
93
|
* List of tags used by enforce-module-boundaries / project graph
|
|
94
94
|
*/
|
|
95
95
|
tags?: string[];
|
|
96
|
+
/**
|
|
97
|
+
* Project specific configuration for `nx release`
|
|
98
|
+
*/
|
|
99
|
+
release?: {
|
|
100
|
+
version?: Pick<NxReleaseVersionConfiguration, 'generator' | 'generatorOptions'>;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Metadata about the project
|
|
104
|
+
*/
|
|
105
|
+
metadata?: ProjectMetadata;
|
|
106
|
+
}
|
|
107
|
+
export interface ProjectMetadata {
|
|
108
|
+
technologies?: string[];
|
|
109
|
+
targetGroups?: Record<string, string[]>;
|
|
110
|
+
}
|
|
111
|
+
export interface TargetMetadata {
|
|
112
|
+
description?: string;
|
|
113
|
+
technologies?: string[];
|
|
96
114
|
}
|
|
97
115
|
export interface TargetDependencyConfig {
|
|
98
116
|
/**
|
|
@@ -180,4 +198,8 @@ export interface TargetConfiguration<T = any> {
|
|
|
180
198
|
* Determines if Nx is able to cache a given target.
|
|
181
199
|
*/
|
|
182
200
|
cache?: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Metadata about the target
|
|
203
|
+
*/
|
|
204
|
+
metadata?: TargetMetadata;
|
|
183
205
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NxJsonConfiguration } from './nx-json';
|
|
2
2
|
import { ProjectsConfigurations } from './workspace-json-project-json';
|
|
3
3
|
/**
|
|
4
|
-
* @deprecated This will be removed in
|
|
4
|
+
* @deprecated This will be removed in v19. Use {@link readProjectsConfigurationFromProjectGraph} instead.
|
|
5
5
|
*/
|
|
6
6
|
export declare class Workspaces {
|
|
7
7
|
private root;
|
package/src/config/workspaces.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toProjectName = exports.Workspaces = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
|
+
const project_graph_1 = require("../project-graph/project-graph");
|
|
5
6
|
const nx_json_1 = require("./nx-json");
|
|
6
|
-
|
|
7
|
-
// TODO(v18): remove this class
|
|
7
|
+
// TODO(v19): remove this class
|
|
8
8
|
/**
|
|
9
|
-
* @deprecated This will be removed in
|
|
9
|
+
* @deprecated This will be removed in v19. Use {@link readProjectsConfigurationFromProjectGraph} instead.
|
|
10
10
|
*/
|
|
11
11
|
class Workspaces {
|
|
12
12
|
constructor(root) {
|
|
@@ -18,9 +18,7 @@ class Workspaces {
|
|
|
18
18
|
readWorkspaceConfiguration() {
|
|
19
19
|
const nxJson = (0, nx_json_1.readNxJson)(this.root);
|
|
20
20
|
return {
|
|
21
|
-
|
|
22
|
-
projects: (0, retrieve_workspace_files_1.retrieveProjectConfigurationsSync)(this.root, nxJson)
|
|
23
|
-
.projectNodes,
|
|
21
|
+
...(0, project_graph_1.readProjectsConfigurationFromProjectGraph)((0, project_graph_1.readCachedProjectGraph)()),
|
|
24
22
|
...nxJson,
|
|
25
23
|
};
|
|
26
24
|
}
|