@ohos-ports/nx 19.8.4-beta.2 → 20.8.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +146 -0
- package/LICENSE +1 -1
- package/bin/init-local.js +0 -39
- package/bin/nx.js +28 -15
- package/bin/post-install.js +7 -5
- package/migrations.json +11 -37
- package/ohos-build/build-Cargo.toml.patch +12 -0
- package/ohos-build/build-cargo-config.patch +20 -0
- package/ohos-build/index.js.patch +18 -0
- package/ohos-build/native-bindings.js.patch +25 -0
- package/ohos-build/nix-0.25.1-ohos.patch +539 -0
- package/ohos-build/nix-0.27.1-ohos.patch +436 -0
- package/package.json +25 -62
- package/plugins/package-json.d.ts +5 -1
- package/plugins/package-json.js +27 -2
- package/release/changelog-renderer/index.d.ts +102 -0
- package/release/changelog-renderer/index.js +339 -0
- package/release/index.d.ts +4 -0
- package/release/index.js +13 -0
- package/schemas/nx-schema.json +964 -0
- package/schemas/project-schema.json +331 -0
- package/schemas/workspace-schema.json +185 -0
- package/src/adapter/angular-json.js +2 -8
- package/src/adapter/compat.d.ts +1 -1
- package/src/adapter/compat.js +3 -1
- package/src/adapter/ngcli-adapter.js +7 -7
- package/src/command-line/add/add.js +21 -48
- package/src/command-line/affected/affected.js +3 -3
- package/src/command-line/connect/view-logs.js +1 -1
- package/src/command-line/examples.js +0 -4
- package/src/command-line/exec/exec.js +3 -3
- package/src/command-line/format/command-object.js +9 -0
- package/src/command-line/format/format.js +10 -6
- package/src/command-line/generate/command-object.js +1 -2
- package/src/command-line/generate/generate.d.ts +1 -1
- package/src/command-line/generate/generate.js +3 -1
- package/src/command-line/generate/generator-utils.js +10 -5
- package/src/command-line/graph/graph.js +6 -9
- package/src/command-line/import/import.js +110 -71
- package/src/command-line/init/command-object.js +25 -9
- package/src/command-line/init/configure-plugins.d.ts +34 -0
- package/src/command-line/init/configure-plugins.js +203 -0
- 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/angular/integrated-workspace.js +1 -1
- package/src/command-line/init/implementation/angular/legacy-angular-versions.js +4 -3
- package/src/command-line/init/implementation/angular/standalone-workspace.js +8 -5
- package/src/command-line/init/implementation/check-compatible-with-plugins.d.ts +15 -0
- package/src/command-line/init/implementation/check-compatible-with-plugins.js +134 -0
- 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/dot-nx/add-nx-scripts.js +1 -1
- package/src/command-line/init/implementation/dot-nx/nxw.js +1 -1
- package/src/command-line/init/implementation/react/add-vite-commands-to-package-scripts.js +6 -4
- package/src/command-line/init/implementation/react/check-for-uncommitted-changes.js +1 -1
- package/src/command-line/init/implementation/react/index.d.ts +1 -1
- package/src/command-line/init/implementation/react/index.js +33 -186
- package/src/command-line/init/implementation/react/write-vite-config.js +19 -3
- package/src/command-line/init/implementation/utils.d.ts +6 -2
- package/src/command-line/init/implementation/utils.js +116 -37
- package/src/command-line/init/init-v1.js +2 -2
- package/src/command-line/init/init-v2.d.ts +2 -2
- package/src/command-line/init/init-v2.js +73 -55
- package/src/command-line/login/login.js +3 -0
- package/src/command-line/logout/logout.js +3 -0
- package/src/command-line/migrate/command-object.js +2 -96
- package/src/command-line/migrate/migrate.d.ts +1 -0
- package/src/command-line/migrate/migrate.js +111 -19
- package/src/command-line/nx-commands.js +20 -6
- 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.d.ts +5 -4
- package/src/command-line/release/changelog.js +64 -79
- package/src/command-line/release/command-object.d.ts +7 -4
- package/src/command-line/release/command-object.js +24 -13
- package/src/command-line/release/config/config.d.ts +8 -7
- package/src/command-line/release/config/config.js +173 -43
- package/src/command-line/release/config/conventional-commits.js +7 -0
- package/src/command-line/release/config/filter-release-groups.d.ts +4 -0
- package/src/command-line/release/config/filter-release-groups.js +10 -3
- 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/config/version-plans.js +1 -1
- package/src/command-line/release/index.d.ts +9 -2
- 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 +8 -4
- package/src/command-line/release/publish.d.ts +6 -1
- package/src/command-line/release/publish.js +50 -27
- package/src/command-line/release/release.js +33 -20
- package/src/command-line/release/utils/batch-projects-by-generator-config.js +6 -3
- package/src/command-line/release/utils/exec-command.js +1 -1
- package/src/command-line/release/utils/git.d.ts +3 -2
- package/src/command-line/release/utils/git.js +104 -19
- package/src/command-line/release/utils/github.d.ts +1 -0
- package/src/command-line/release/utils/github.js +6 -2
- package/src/command-line/release/utils/launch-editor.js +2 -2
- package/src/command-line/release/utils/resolve-changelog-renderer.d.ts +2 -2
- package/src/command-line/release/utils/resolve-changelog-renderer.js +3 -3
- 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 +1048 -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 +93 -255
- package/src/command-line/report/report.d.ts +7 -3
- package/src/command-line/report/report.js +52 -16
- package/src/command-line/run/executor-utils.js +4 -4
- package/src/command-line/run/run-one.js +37 -15
- package/src/command-line/run/run.js +1 -2
- package/src/command-line/run-many/run-many.js +1 -4
- package/src/command-line/show/project.js +25 -3
- package/src/command-line/show/projects.js +4 -0
- package/src/command-line/sync/sync.js +3 -3
- package/src/command-line/watch/watch.js +1 -1
- package/src/command-line/yargs-utils/shared-options.d.ts +4 -0
- package/src/command-line/yargs-utils/shared-options.js +26 -0
- package/src/config/misc-interfaces.d.ts +3 -15
- package/src/config/nx-json.d.ts +145 -19
- package/src/config/project-graph.d.ts +4 -4
- package/src/config/project-graph.js +8 -0
- package/src/config/schema-utils.d.ts +4 -3
- package/src/config/schema-utils.js +71 -4
- package/src/config/workspace-json-project-json.d.ts +23 -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 +5 -0
- package/src/daemon/client/client.js +42 -4
- package/src/daemon/client/generate-help-output.js +1 -1
- 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/message-types/run-tasks-execution-hooks.d.ts +13 -0
- package/src/daemon/message-types/run-tasks-execution-hooks.js +19 -0
- 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/handle-hash-tasks.js +1 -1
- package/src/daemon/server/handle-tasks-execution-hooks.d.ts +19 -0
- package/src/daemon/server/handle-tasks-execution-hooks.js +35 -0
- package/src/daemon/server/logger.js +2 -1
- package/src/daemon/server/project-graph-incremental-recomputation.js +5 -5
- package/src/daemon/server/server.js +26 -2
- package/src/daemon/server/shutdown-utils.js +4 -2
- package/src/devkit-exports.d.ts +10 -7
- package/src/devkit-exports.js +4 -6
- package/src/devkit-internals.d.ts +4 -2
- package/src/devkit-internals.js +8 -3
- package/src/executors/run-commands/run-commands.impl.d.ts +1 -0
- package/src/executors/run-commands/run-commands.impl.js +11 -4
- package/src/executors/run-commands/schema.json +14 -0
- package/src/executors/run-script/run-script.impl.js +1 -1
- package/src/executors/utils/convert-nx-executor.js +2 -4
- 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/generators/utils/nx-json.d.ts +1 -1
- package/src/generators/utils/project-configuration.js +15 -4
- package/src/hasher/create-task-hasher.js +1 -1
- package/src/hasher/file-hasher.d.ts +1 -0
- package/src/hasher/file-hasher.js +5 -0
- package/src/hasher/hash-task.js +1 -1
- package/src/hasher/task-hasher.d.ts +2 -6
- package/src/hasher/task-hasher.js +6 -32
- package/src/migrations/update-20-0-0/move-use-daemon-process.d.ts +2 -0
- package/src/migrations/update-20-0-0/move-use-daemon-process.js +25 -0
- package/src/migrations/update-20-0-1/use-legacy-cache.d.ts +2 -0
- package/src/migrations/update-20-0-1/use-legacy-cache.js +20 -0
- package/src/native/index.d.ts +49 -20
- package/src/native/index.js +18 -3
- package/src/native/native-bindings.js +12 -2
- package/src/native/nx.openharmony-arm64.node +0 -0
- package/src/native/nx.wasi-browser.js +11 -8
- package/src/native/nx.wasi.cjs +11 -8
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/native/tests/__fixtures__/file-lock.fixture.js +20 -0
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +3 -2
- package/src/nx-cloud/update-manager.js +13 -1
- package/src/plugins/js/index.js +2 -2
- 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 +3 -1
- package/src/plugins/js/lock-file/yarn-parser.js +102 -44
- package/src/plugins/js/project-graph/affected/lock-file-changes.js +1 -0
- package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts +2 -2
- package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +6 -20
- 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 +14 -2
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +81 -19
- package/src/plugins/js/utils/config.js +2 -9
- package/src/plugins/js/utils/packages.d.ts +8 -0
- package/src/plugins/js/utils/packages.js +91 -0
- package/src/plugins/js/utils/register.d.ts +5 -1
- package/src/plugins/js/utils/register.js +2 -1
- package/src/plugins/js/utils/typescript.d.ts +1 -0
- package/src/plugins/js/utils/typescript.js +4 -3
- package/src/plugins/js/versions.d.ts +1 -1
- package/src/plugins/js/versions.js +1 -1
- package/src/plugins/package-json/create-nodes.d.ts +7 -8
- package/src/plugins/package-json/create-nodes.js +34 -12
- package/src/project-graph/affected/affected-project-graph.js +3 -0
- package/src/project-graph/affected/locators/project-glob-changes.js +16 -4
- package/src/project-graph/build-project-graph.d.ts +2 -1
- package/src/project-graph/build-project-graph.js +66 -43
- package/src/project-graph/error-types.d.ts +15 -12
- package/src/project-graph/error-types.js +109 -23
- package/src/project-graph/file-utils.d.ts +3 -3
- package/src/project-graph/file-utils.js +8 -7
- package/src/project-graph/nx-deps-cache.d.ts +6 -3
- package/src/project-graph/nx-deps-cache.js +66 -11
- package/src/project-graph/plugins/get-plugins.d.ts +4 -0
- package/src/project-graph/plugins/get-plugins.js +144 -0
- package/src/project-graph/plugins/in-process-loader.d.ts +10 -0
- package/src/project-graph/plugins/in-process-loader.js +60 -0
- package/src/project-graph/plugins/index.d.ts +2 -1
- package/src/project-graph/plugins/index.js +5 -3
- package/src/project-graph/plugins/isolation/enabled.d.ts +1 -0
- package/src/project-graph/plugins/isolation/enabled.js +19 -0
- package/src/project-graph/plugins/isolation/index.d.ts +2 -2
- package/src/project-graph/plugins/isolation/index.js +1 -7
- package/src/project-graph/plugins/isolation/messaging.d.ts +39 -21
- package/src/project-graph/plugins/isolation/messaging.js +5 -1
- package/src/project-graph/plugins/isolation/plugin-pool.d.ts +1 -1
- package/src/project-graph/plugins/isolation/plugin-pool.js +58 -49
- package/src/project-graph/plugins/isolation/plugin-worker.js +79 -29
- package/src/project-graph/plugins/load-resolved-plugin.d.ts +3 -0
- package/src/project-graph/plugins/load-resolved-plugin.js +22 -0
- package/src/project-graph/plugins/loaded-nx-plugin.d.ts +20 -0
- package/src/project-graph/plugins/loaded-nx-plugin.js +80 -0
- package/src/project-graph/plugins/public-api.d.ts +32 -13
- package/src/project-graph/plugins/resolve-plugin.d.ts +15 -0
- package/src/project-graph/plugins/resolve-plugin.js +134 -0
- package/src/project-graph/plugins/tasks-execution-hooks.d.ts +3 -0
- package/src/project-graph/plugins/tasks-execution-hooks.js +65 -0
- package/src/project-graph/plugins/transpiler.d.ts +8 -0
- package/src/project-graph/plugins/transpiler.js +47 -0
- package/src/project-graph/plugins/utils.d.ts +2 -8
- package/src/project-graph/plugins/utils.js +2 -39
- package/src/project-graph/project-graph.d.ts +3 -1
- package/src/project-graph/project-graph.js +86 -20
- package/src/project-graph/utils/project-configuration-utils.d.ts +2 -2
- package/src/project-graph/utils/project-configuration-utils.js +55 -25
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +3 -7
- package/src/project-graph/utils/retrieve-workspace-files.js +17 -23
- package/src/tasks-runner/batch/batch-messages.d.ts +2 -0
- package/src/tasks-runner/batch/run-batch.js +2 -4
- package/src/tasks-runner/cache.d.ts +22 -4
- package/src/tasks-runner/cache.js +160 -18
- package/src/tasks-runner/create-task-graph.d.ts +13 -1
- package/src/tasks-runner/create-task-graph.js +50 -22
- package/src/tasks-runner/default-tasks-runner.d.ts +1 -0
- package/src/tasks-runner/default-tasks-runner.js +20 -2
- package/src/tasks-runner/forked-process-task-runner.d.ts +4 -1
- package/src/tasks-runner/forked-process-task-runner.js +62 -40
- package/src/tasks-runner/init-tasks-runner.js +0 -2
- package/src/tasks-runner/life-cycle.d.ts +7 -0
- package/src/tasks-runner/run-command.d.ts +2 -4
- package/src/tasks-runner/run-command.js +51 -18
- package/src/tasks-runner/task-graph-utils.d.ts +11 -0
- package/src/tasks-runner/task-graph-utils.js +23 -0
- package/src/tasks-runner/task-orchestrator.js +14 -4
- package/src/tasks-runner/utils.js +2 -0
- package/src/utils/ab-testing.js +1 -1
- package/src/utils/assert-workspace-validity.js +4 -0
- 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 +5 -3
- package/src/utils/command-line-utils.js +37 -57
- package/src/utils/db-connection.d.ts +2 -1
- package/src/utils/db-connection.js +7 -0
- package/src/utils/default-base.js +1 -1
- package/src/utils/delayed-spinner.d.ts +42 -0
- package/src/utils/delayed-spinner.js +80 -0
- package/src/utils/find-matching-projects.js +13 -1
- package/src/utils/git-utils.index-filter.js +2 -2
- package/src/utils/git-utils.js +4 -4
- package/src/utils/git-utils.tree-filter.js +1 -1
- package/src/utils/handle-errors.js +24 -13
- 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-cloud-utils.js +3 -0
- package/src/utils/nx-key.d.ts +7 -0
- package/src/utils/nx-key.js +52 -0
- package/src/utils/package-json.d.ts +5 -1
- package/src/utils/package-json.js +9 -3
- package/src/utils/package-manager.d.ts +14 -0
- package/src/utils/package-manager.js +89 -3
- package/src/utils/path.js +1 -1
- package/src/utils/plugins/core-plugins.js +4 -0
- package/src/utils/plugins/plugin-capabilities.js +4 -5
- package/src/utils/print-help.js +3 -9
- package/src/utils/require-nx-key.d.ts +1 -0
- package/src/utils/require-nx-key.js +22 -0
- package/src/utils/sync-generators.js +9 -14
- package/src/utils/task-history.d.ts +1 -1
- package/src/utils/task-history.js +2 -2
- package/src/utils/workspace-context.d.ts +2 -0
- package/src/utils/workspace-context.js +16 -0
- package/tasks-runners/default.d.ts +1 -0
- package/tasks-runners/default.js +5 -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/import/utils/needs-install.d.ts +0 -3
- package/src/command-line/import/utils/needs-install.js +0 -31
- 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/daemon/server/plugins.d.ts +0 -3
- package/src/daemon/server/plugins.js +0 -32
- package/src/hasher/node-task-hasher-impl.d.ts +0 -48
- package/src/hasher/node-task-hasher-impl.js +0 -449
- package/src/migrations/update-15-0-0/migrate-to-inputs.d.ts +0 -2
- package/src/migrations/update-15-0-0/migrate-to-inputs.js +0 -102
- package/src/migrations/update-15-0-0/prefix-outputs.d.ts +0 -2
- package/src/migrations/update-15-0-0/prefix-outputs.js +0 -49
- package/src/migrations/update-16-0-0/remove-nrwl-cli.d.ts +0 -2
- package/src/migrations/update-16-0-0/remove-nrwl-cli.js +0 -16
- package/src/migrations/update-16-0-0/update-depends-on-to-tokens.d.ts +0 -2
- package/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +0 -97
- package/src/migrations/update-16-0-0/update-nx-cloud-runner.d.ts +0 -2
- package/src/migrations/update-16-0-0/update-nx-cloud-runner.js +0 -29
- package/src/migrations/update-16-2-0/remove-run-commands-output-path.d.ts +0 -2
- package/src/migrations/update-16-2-0/remove-run-commands-output-path.js +0 -45
- package/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.d.ts +0 -12
- package/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.js +0 -67
- package/src/migrations/update-16-9-0/remove-project-name-and-root-format.d.ts +0 -2
- package/src/migrations/update-16-9-0/remove-project-name-and-root-format.js +0 -21
- package/src/native/nx.ohos-arm64.node +0 -0
- package/src/project-graph/plugins/internal-api.d.ts +0 -29
- package/src/project-graph/plugins/internal-api.js +0 -134
- package/src/project-graph/plugins/loader.d.ts +0 -24
- package/src/project-graph/plugins/loader.js +0 -220
- package/src/utils/app-root.d.ts +0 -8
- package/src/utils/app-root.js +0 -12
- package/src/utils/nx-plugin.deprecated.d.ts +0 -31
- package/src/utils/nx-plugin.deprecated.js +0 -20
- package/src/utils/powerpack.d.ts +0 -5
- package/src/utils/powerpack.js +0 -33
- package/src/utils/workspace-configuration-check.d.ts +0 -1
- package/src/utils/workspace-configuration-check.js +0 -36
|
@@ -11,15 +11,14 @@ const split_target_1 = require("../../utils/split-target");
|
|
|
11
11
|
const output_1 = require("../../utils/output");
|
|
12
12
|
const configuration_1 = require("../../config/configuration");
|
|
13
13
|
const calculate_default_project_name_1 = require("../../config/calculate-default-project-name");
|
|
14
|
-
const workspace_configuration_check_1 = require("../../utils/workspace-configuration-check");
|
|
15
14
|
const graph_1 = require("../graph/graph");
|
|
15
|
+
const find_matching_projects_1 = require("../../utils/find-matching-projects");
|
|
16
16
|
async function runOne(cwd, args, extraTargetDependencies = {}, extraOptions = {
|
|
17
17
|
excludeTaskDependencies: args.excludeTaskDependencies,
|
|
18
18
|
loadDotEnvFiles: process.env.NX_LOAD_DOT_ENV_FILES !== 'false',
|
|
19
19
|
}) {
|
|
20
20
|
perf_hooks_1.performance.mark('code-loading:end');
|
|
21
21
|
perf_hooks_1.performance.measure('code-loading', 'init-local', 'code-loading:end');
|
|
22
|
-
(0, workspace_configuration_check_1.workspaceConfigurationCheck)();
|
|
23
22
|
const nxJson = (0, configuration_1.readNxJson)();
|
|
24
23
|
const projectGraph = await (0, project_graph_1.createProjectGraphAsync)();
|
|
25
24
|
const opts = parseRunOneOptions(cwd, args, projectGraph, nxJson);
|
|
@@ -33,7 +32,7 @@ async function runOne(cwd, args, extraTargetDependencies = {}, extraOptions = {
|
|
|
33
32
|
process.exit(0);
|
|
34
33
|
}
|
|
35
34
|
await (0, connect_to_nx_cloud_1.connectToNxCloudIfExplicitlyAsked)(nxArgs);
|
|
36
|
-
const { projects } = getProjects(projectGraph, opts.project);
|
|
35
|
+
const { projects, projectName } = getProjects(projectGraph, opts.project);
|
|
37
36
|
if (nxArgs.graph) {
|
|
38
37
|
const projectNames = projects.map((t) => t.name);
|
|
39
38
|
const file = (0, command_line_utils_1.readGraphFileFromGraphArg)(nxArgs);
|
|
@@ -47,22 +46,45 @@ async function runOne(cwd, args, extraTargetDependencies = {}, extraOptions = {
|
|
|
47
46
|
}, projectNames);
|
|
48
47
|
}
|
|
49
48
|
else {
|
|
50
|
-
const status = await (0, run_command_1.runCommand)(projects, projectGraph, { nxJson }, nxArgs, overrides,
|
|
49
|
+
const status = await (0, run_command_1.runCommand)(projects, projectGraph, { nxJson }, nxArgs, overrides, projectName, extraTargetDependencies, extraOptions);
|
|
51
50
|
process.exit(status);
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
|
-
function getProjects(projectGraph,
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
function getProjects(projectGraph, projectName) {
|
|
54
|
+
if (projectGraph.nodes[projectName]) {
|
|
55
|
+
return {
|
|
56
|
+
projectName: projectName,
|
|
57
|
+
projects: [projectGraph.nodes[projectName]],
|
|
58
|
+
projectsMap: {
|
|
59
|
+
[projectName]: projectGraph.nodes[projectName],
|
|
60
|
+
},
|
|
61
|
+
};
|
|
60
62
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
else {
|
|
64
|
+
const projects = (0, find_matching_projects_1.findMatchingProjects)([projectName], projectGraph.nodes);
|
|
65
|
+
if (projects.length === 1) {
|
|
66
|
+
const projectName = projects[0];
|
|
67
|
+
const project = projectGraph.nodes[projectName];
|
|
68
|
+
return {
|
|
69
|
+
projectName,
|
|
70
|
+
projects: [project],
|
|
71
|
+
projectsMap: {
|
|
72
|
+
[project.data.name]: project,
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
else if (projects.length > 1) {
|
|
77
|
+
output_1.output.error({
|
|
78
|
+
title: `Multiple projects matched:`,
|
|
79
|
+
bodyLines: projects.length > 100 ? [...projects.slice(0, 100), '...'] : projects,
|
|
80
|
+
});
|
|
81
|
+
process.exit(1);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
output_1.output.error({
|
|
85
|
+
title: `Cannot find project '${projectName}'`,
|
|
86
|
+
});
|
|
87
|
+
process.exit(1);
|
|
66
88
|
}
|
|
67
89
|
const targetAliases = {
|
|
68
90
|
b: 'build',
|
|
@@ -77,7 +77,7 @@ async function printTargetRunHelpInternal({ project, target }, root, projectsCon
|
|
|
77
77
|
else {
|
|
78
78
|
const cp = (0, child_process_1.exec)(helpCommand, {
|
|
79
79
|
env,
|
|
80
|
-
windowsHide:
|
|
80
|
+
windowsHide: false,
|
|
81
81
|
});
|
|
82
82
|
cp.on('exit', (code) => {
|
|
83
83
|
process.exit(code);
|
|
@@ -100,7 +100,6 @@ async function runExecutorInternal({ project, target, configuration }, overrides
|
|
|
100
100
|
target: targetConfig,
|
|
101
101
|
projectsConfigurations,
|
|
102
102
|
nxJsonConfiguration,
|
|
103
|
-
workspace: { ...projectsConfigurations, ...nxJsonConfiguration },
|
|
104
103
|
projectName: project,
|
|
105
104
|
targetName: target,
|
|
106
105
|
configurationName: configuration,
|
|
@@ -4,7 +4,6 @@ exports.runMany = runMany;
|
|
|
4
4
|
exports.projectsToRun = projectsToRun;
|
|
5
5
|
const run_command_1 = require("../../tasks-runner/run-command");
|
|
6
6
|
const command_line_utils_1 = require("../../utils/command-line-utils");
|
|
7
|
-
const command_line_utils_2 = require("../../utils/command-line-utils");
|
|
8
7
|
const project_graph_utils_1 = require("../../utils/project-graph-utils");
|
|
9
8
|
const connect_to_nx_cloud_1 = require("../connect/connect-to-nx-cloud");
|
|
10
9
|
const perf_hooks_1 = require("perf_hooks");
|
|
@@ -12,7 +11,6 @@ const project_graph_1 = require("../../project-graph/project-graph");
|
|
|
12
11
|
const configuration_1 = require("../../config/configuration");
|
|
13
12
|
const output_1 = require("../../utils/output");
|
|
14
13
|
const find_matching_projects_1 = require("../../utils/find-matching-projects");
|
|
15
|
-
const workspace_configuration_check_1 = require("../../utils/workspace-configuration-check");
|
|
16
14
|
const graph_1 = require("../graph/graph");
|
|
17
15
|
async function runMany(args, extraTargetDependencies = {}, extraOptions = {
|
|
18
16
|
excludeTaskDependencies: args.excludeTaskDependencies,
|
|
@@ -20,9 +18,8 @@ async function runMany(args, extraTargetDependencies = {}, extraOptions = {
|
|
|
20
18
|
}) {
|
|
21
19
|
perf_hooks_1.performance.mark('code-loading:end');
|
|
22
20
|
perf_hooks_1.performance.measure('code-loading', 'init-local', 'code-loading:end');
|
|
23
|
-
(0, workspace_configuration_check_1.workspaceConfigurationCheck)();
|
|
24
21
|
const nxJson = (0, configuration_1.readNxJson)();
|
|
25
|
-
const { nxArgs, overrides } = (0,
|
|
22
|
+
const { nxArgs, overrides } = (0, command_line_utils_1.splitArgsIntoNxArgsAndOverrides)(args, 'run-many', { printWarnings: args.graph !== 'stdout' }, nxJson);
|
|
26
23
|
if (nxArgs.verbose) {
|
|
27
24
|
process.env.NX_VERBOSE_LOGGING = 'true';
|
|
28
25
|
}
|
|
@@ -4,12 +4,32 @@ exports.showProjectHandler = showProjectHandler;
|
|
|
4
4
|
const output_1 = require("../../utils/output");
|
|
5
5
|
const project_graph_1 = require("../../project-graph/project-graph");
|
|
6
6
|
const graph_1 = require("../graph/graph");
|
|
7
|
+
const find_matching_projects_1 = require("../../utils/find-matching-projects");
|
|
7
8
|
async function showProjectHandler(args) {
|
|
9
|
+
performance.mark('code-loading:end');
|
|
10
|
+
performance.measure('code-loading', 'init-local', 'code-loading:end');
|
|
8
11
|
const graph = await (0, project_graph_1.createProjectGraphAsync)();
|
|
9
|
-
|
|
12
|
+
let node = graph.nodes[args.projectName];
|
|
10
13
|
if (!node) {
|
|
11
|
-
|
|
12
|
-
|
|
14
|
+
const projects = (0, find_matching_projects_1.findMatchingProjects)([args.projectName], graph.nodes);
|
|
15
|
+
if (projects.length === 1) {
|
|
16
|
+
const projectName = projects[0];
|
|
17
|
+
node = graph.nodes[projectName];
|
|
18
|
+
}
|
|
19
|
+
else if (projects.length > 1) {
|
|
20
|
+
output_1.output.error({
|
|
21
|
+
title: `Multiple projects matched:`,
|
|
22
|
+
bodyLines: projects.length > 100 ? [...projects.slice(0, 100), '...'] : projects,
|
|
23
|
+
});
|
|
24
|
+
console.log(`Multiple projects matched:\n ${(projects.length > 100
|
|
25
|
+
? [...projects.slice(0, 100), '...']
|
|
26
|
+
: projects).join(' \n')}`);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
console.log(`Could not find project ${args.projectName}`);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
13
33
|
}
|
|
14
34
|
if (args.json) {
|
|
15
35
|
console.log(JSON.stringify(node.data));
|
|
@@ -56,5 +76,7 @@ async function showProjectHandler(args) {
|
|
|
56
76
|
}
|
|
57
77
|
}
|
|
58
78
|
}
|
|
79
|
+
// TODO: Find a better fix for this
|
|
80
|
+
await new Promise((res) => setImmediate(res));
|
|
59
81
|
await output_1.output.drain();
|
|
60
82
|
}
|
|
@@ -11,6 +11,8 @@ const all_file_data_1 = require("../../utils/all-file-data");
|
|
|
11
11
|
const command_line_utils_1 = require("../../utils/command-line-utils");
|
|
12
12
|
const find_matching_projects_1 = require("../../utils/find-matching-projects");
|
|
13
13
|
async function showProjectsHandler(args) {
|
|
14
|
+
performance.mark('code-loading:end');
|
|
15
|
+
performance.measure('code-loading', 'init-local', 'code-loading:end');
|
|
14
16
|
let graph = await (0, project_graph_1.createProjectGraphAsync)();
|
|
15
17
|
const nxJson = (0, nx_json_1.readNxJson)();
|
|
16
18
|
const { nxArgs } = (0, command_line_utils_1.splitArgsIntoNxArgsAndOverrides)(args, 'affected', {
|
|
@@ -59,6 +61,8 @@ async function showProjectsHandler(args) {
|
|
|
59
61
|
console.log(project);
|
|
60
62
|
}
|
|
61
63
|
}
|
|
64
|
+
// TODO: Find a better fix for this
|
|
65
|
+
await new Promise((res) => setImmediate(res));
|
|
62
66
|
await output_1.output.drain();
|
|
63
67
|
}
|
|
64
68
|
function getGraphNodesMatchingPatterns(graph, patterns) {
|
|
@@ -29,7 +29,7 @@ function syncHandler(options) {
|
|
|
29
29
|
title: options.check
|
|
30
30
|
? 'The workspace is up to date'
|
|
31
31
|
: 'The workspace is already up to date',
|
|
32
|
-
bodyLines: syncGenerators.map((generator) => `
|
|
32
|
+
bodyLines: syncGenerators.map((generator) => `[${chalk.bold(generator)}]: All files are up to date.`),
|
|
33
33
|
});
|
|
34
34
|
return 0;
|
|
35
35
|
}
|
|
@@ -85,9 +85,9 @@ function syncHandler(options) {
|
|
|
85
85
|
'Syncing the workspace failed with the following error:',
|
|
86
86
|
'',
|
|
87
87
|
e.message,
|
|
88
|
-
...(
|
|
88
|
+
...(!!e.stack ? [`\n${e.stack}`] : []),
|
|
89
89
|
'',
|
|
90
|
-
'Please
|
|
90
|
+
'Please report the error at: https://github.com/nrwl/nx/issues/new/choose',
|
|
91
91
|
],
|
|
92
92
|
});
|
|
93
93
|
return 1;
|
|
@@ -97,7 +97,7 @@ class BatchCommandRunner extends BatchFunctionRunner {
|
|
|
97
97
|
[this.projectNameEnv]: env[this.projectNameEnv],
|
|
98
98
|
[this.fileChangesEnv]: env[this.fileChangesEnv],
|
|
99
99
|
},
|
|
100
|
-
windowsHide:
|
|
100
|
+
windowsHide: false,
|
|
101
101
|
});
|
|
102
102
|
commandExec.on('close', () => {
|
|
103
103
|
resolve();
|
|
@@ -15,6 +15,7 @@ export interface RunOptions {
|
|
|
15
15
|
nxBail: boolean;
|
|
16
16
|
nxIgnoreCycles: boolean;
|
|
17
17
|
skipNxCache: boolean;
|
|
18
|
+
skipRemoteCache: boolean;
|
|
18
19
|
cloud: boolean;
|
|
19
20
|
dte: boolean;
|
|
20
21
|
batch: boolean;
|
|
@@ -72,4 +73,7 @@ export declare function withRunOneOptions(yargs: Argv): Argv<{
|
|
|
72
73
|
help: boolean;
|
|
73
74
|
}>;
|
|
74
75
|
export declare function parseCSV(args: string[] | string): string[];
|
|
76
|
+
export declare function readParallelFromArgsAndEnv(args: {
|
|
77
|
+
[k: string]: any;
|
|
78
|
+
}): number;
|
|
75
79
|
export {};
|
|
@@ -13,6 +13,7 @@ exports.withOverrides = withOverrides;
|
|
|
13
13
|
exports.withOutputStyleOption = withOutputStyleOption;
|
|
14
14
|
exports.withRunOneOptions = withRunOneOptions;
|
|
15
15
|
exports.parseCSV = parseCSV;
|
|
16
|
+
exports.readParallelFromArgsAndEnv = readParallelFromArgsAndEnv;
|
|
16
17
|
exports.defaultYargsParserConfiguration = {
|
|
17
18
|
'strip-dashed': true,
|
|
18
19
|
'unknown-options-as-args': true,
|
|
@@ -74,6 +75,13 @@ function withRunOptions(yargs) {
|
|
|
74
75
|
describe: 'Rerun the tasks even when the results are available in the cache.',
|
|
75
76
|
type: 'boolean',
|
|
76
77
|
default: false,
|
|
78
|
+
alias: 'disableNxCache',
|
|
79
|
+
})
|
|
80
|
+
.options('skipRemoteCache', {
|
|
81
|
+
type: 'boolean',
|
|
82
|
+
describe: 'Disables the remote cache.',
|
|
83
|
+
default: false,
|
|
84
|
+
alias: 'disableRemoteCache',
|
|
77
85
|
})
|
|
78
86
|
.options('excludeTaskDependencies', {
|
|
79
87
|
describe: 'Skips running dependent tasks first.',
|
|
@@ -251,3 +259,21 @@ function parseCSV(args) {
|
|
|
251
259
|
const items = args.split(',');
|
|
252
260
|
return items.map((i) => i.startsWith('"') && i.endsWith('"') ? i.slice(1, -1) : i);
|
|
253
261
|
}
|
|
262
|
+
function readParallelFromArgsAndEnv(args) {
|
|
263
|
+
if (args['parallel'] === 'false' || args['parallel'] === false) {
|
|
264
|
+
return 1;
|
|
265
|
+
}
|
|
266
|
+
else if (args['parallel'] === 'true' ||
|
|
267
|
+
args['parallel'] === true ||
|
|
268
|
+
args['parallel'] === '' ||
|
|
269
|
+
// dont require passing --parallel if NX_PARALLEL is set, but allow overriding it
|
|
270
|
+
(process.env.NX_PARALLEL && args['parallel'] === undefined)) {
|
|
271
|
+
return Number(args['maxParallel'] ||
|
|
272
|
+
args['max-parallel'] ||
|
|
273
|
+
process.env.NX_PARALLEL ||
|
|
274
|
+
3);
|
|
275
|
+
}
|
|
276
|
+
else if (args['parallel'] !== undefined) {
|
|
277
|
+
return Number(args['parallel']);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
@@ -173,16 +173,12 @@ export interface ExecutorContext {
|
|
|
173
173
|
target?: TargetConfiguration;
|
|
174
174
|
/**
|
|
175
175
|
* Projects config
|
|
176
|
-
*
|
|
177
|
-
* @todo(vsavkin): mark this as required for v17
|
|
178
176
|
*/
|
|
179
|
-
projectsConfigurations
|
|
177
|
+
projectsConfigurations: ProjectsConfigurations;
|
|
180
178
|
/**
|
|
181
179
|
* The contents of nx.json.
|
|
182
|
-
*
|
|
183
|
-
* @todo(vsavkin): mark this as required for v17
|
|
184
180
|
*/
|
|
185
|
-
nxJsonConfiguration
|
|
181
|
+
nxJsonConfiguration: NxJsonConfiguration;
|
|
186
182
|
/**
|
|
187
183
|
* The current working directory
|
|
188
184
|
*/
|
|
@@ -194,19 +190,11 @@ export interface ExecutorContext {
|
|
|
194
190
|
/**
|
|
195
191
|
* A snapshot of the project graph as
|
|
196
192
|
* it existed when the Nx command was kicked off
|
|
197
|
-
*
|
|
198
|
-
* @todo(vsavkin) mark this required for v17
|
|
199
193
|
*/
|
|
200
|
-
projectGraph
|
|
194
|
+
projectGraph: ProjectGraph;
|
|
201
195
|
/**
|
|
202
196
|
* A snapshot of the task graph as
|
|
203
197
|
* it existed when the Nx command was kicked off
|
|
204
198
|
*/
|
|
205
199
|
taskGraph?: TaskGraph;
|
|
206
|
-
/**
|
|
207
|
-
* Deprecated. Use projectsConfigurations or nxJsonConfiguration
|
|
208
|
-
* The full workspace configuration
|
|
209
|
-
* @todo(vsavkin): remove after v17
|
|
210
|
-
*/
|
|
211
|
-
workspace?: ProjectsConfigurations & NxJsonConfiguration;
|
|
212
200
|
}
|
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 type { 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
|
|
@@ -124,9 +225,17 @@ export interface NxReleaseGitConfiguration {
|
|
|
124
225
|
*/
|
|
125
226
|
tagMessage?: string;
|
|
126
227
|
/**
|
|
127
|
-
* Additional arguments to pass to the `git tag` command invoked behind the scenes.
|
|
228
|
+
* Additional arguments to pass to the `git tag` command invoked behind the scenes. May be a string or array of strings.
|
|
128
229
|
*/
|
|
129
230
|
tagArgs?: string | string[];
|
|
231
|
+
/**
|
|
232
|
+
* Whether or not to automatically push the changes made by this command to the remote git repository.
|
|
233
|
+
*/
|
|
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[];
|
|
130
239
|
}
|
|
131
240
|
export interface NxReleaseConventionalCommitsConfiguration {
|
|
132
241
|
types?: Record<string,
|
|
@@ -186,7 +295,7 @@ export interface NxReleaseConfiguration {
|
|
|
186
295
|
*
|
|
187
296
|
* NOTE: git configuration is not supported at the group level, only the root/command level
|
|
188
297
|
*/
|
|
189
|
-
version?:
|
|
298
|
+
version?: (LegacyNxReleaseVersionConfiguration | NxReleaseVersionV2Configuration) & {
|
|
190
299
|
/**
|
|
191
300
|
* A command to run after validation of nx release configuration, but before versioning begins.
|
|
192
301
|
* Used for preparing build artifacts. If --dry-run is passed, the command is still executed, but
|
|
@@ -211,6 +320,15 @@ export interface NxReleaseConfiguration {
|
|
|
211
320
|
* Optionally override the git/release tag pattern to use for this group.
|
|
212
321
|
*/
|
|
213
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[];
|
|
214
332
|
/**
|
|
215
333
|
* Enables using version plans as a specifier source for versioning and
|
|
216
334
|
* to determine changes for changelog generation.
|
|
@@ -251,19 +369,12 @@ export interface NxReleaseConfiguration {
|
|
|
251
369
|
automaticFromRef?: boolean;
|
|
252
370
|
};
|
|
253
371
|
/**
|
|
254
|
-
* If no version
|
|
255
|
-
*
|
|
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.
|
|
256
374
|
*/
|
|
257
|
-
version?:
|
|
258
|
-
|
|
259
|
-
* Enable or override configuration for git operations as part of the version subcommand
|
|
260
|
-
*/
|
|
375
|
+
version?: (LegacyNxReleaseVersionConfiguration | NxReleaseVersionV2Configuration) & {
|
|
376
|
+
useLegacyVersioning?: boolean;
|
|
261
377
|
git?: NxReleaseGitConfiguration;
|
|
262
|
-
/**
|
|
263
|
-
* A command to run after validation of nx release configuration, but before versioning begins.
|
|
264
|
-
* Used for preparing build artifacts. If --dry-run is passed, the command is still executed, but
|
|
265
|
-
* with the NX_DRY_RUN environment variable set to 'true'.
|
|
266
|
-
*/
|
|
267
378
|
preVersionCommand?: string;
|
|
268
379
|
};
|
|
269
380
|
/**
|
|
@@ -277,6 +388,15 @@ export interface NxReleaseConfiguration {
|
|
|
277
388
|
* The default releaseTagPattern for independent releases at the project level is: "{projectName}@{version}"
|
|
278
389
|
*/
|
|
279
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[];
|
|
280
400
|
/**
|
|
281
401
|
* Enable and configure automatic git operations as part of the release
|
|
282
402
|
*/
|
|
@@ -317,6 +437,7 @@ export interface NxSyncConfiguration {
|
|
|
317
437
|
* @note: when adding properties here add them to `allowedWorkspaceExtensions` in adapter/compat.ts
|
|
318
438
|
*/
|
|
319
439
|
export interface NxJsonConfiguration<T = '*' | string[]> {
|
|
440
|
+
$schema?: string;
|
|
320
441
|
/**
|
|
321
442
|
* Optional (additional) Nx.json configuration file which becomes a base for this one
|
|
322
443
|
*/
|
|
@@ -353,7 +474,8 @@ export interface NxJsonConfiguration<T = '*' | string[]> {
|
|
|
353
474
|
appsDir?: string;
|
|
354
475
|
};
|
|
355
476
|
/**
|
|
356
|
-
*
|
|
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
|
|
478
|
+
* Available Task Runners for Nx to use
|
|
357
479
|
*/
|
|
358
480
|
tasksRunnerOptions?: {
|
|
359
481
|
[tasksRunnerName: string]: {
|
|
@@ -455,7 +577,7 @@ export interface NxJsonConfiguration<T = '*' | string[]> {
|
|
|
455
577
|
*/
|
|
456
578
|
useInferencePlugins?: boolean;
|
|
457
579
|
/**
|
|
458
|
-
* Set this to
|
|
580
|
+
* Set this to true to disable connection to Nx Cloud
|
|
459
581
|
*/
|
|
460
582
|
neverConnectToCloud?: boolean;
|
|
461
583
|
/**
|
|
@@ -463,9 +585,13 @@ export interface NxJsonConfiguration<T = '*' | string[]> {
|
|
|
463
585
|
*/
|
|
464
586
|
sync?: NxSyncConfiguration;
|
|
465
587
|
/**
|
|
466
|
-
*
|
|
588
|
+
* Use the legacy file system cache instead of the db cache
|
|
589
|
+
*/
|
|
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.
|
|
467
593
|
*/
|
|
468
|
-
|
|
594
|
+
maxCacheSize?: string;
|
|
469
595
|
}
|
|
470
596
|
export type PluginConfiguration = string | ExpandedPluginConfiguration;
|
|
471
597
|
export type ExpandedPluginConfiguration<T = unknown> = {
|
|
@@ -61,8 +61,6 @@ export declare enum DependencyType {
|
|
|
61
61
|
*/
|
|
62
62
|
implicit = "implicit"
|
|
63
63
|
}
|
|
64
|
-
/** @deprecated this type will be removed in v16. Use {@link ProjectGraphProjectNode} or {@link ProjectGraphExternalNode} instead */
|
|
65
|
-
export type ProjectGraphNode = ProjectGraphProjectNode | ProjectGraphExternalNode;
|
|
66
64
|
/**
|
|
67
65
|
* A node describing a project in a workspace
|
|
68
66
|
*/
|
|
@@ -76,6 +74,7 @@ export interface ProjectGraphProjectNode {
|
|
|
76
74
|
description?: string;
|
|
77
75
|
};
|
|
78
76
|
}
|
|
77
|
+
export declare function isProjectGraphProjectNode(node: ProjectGraphProjectNode | ProjectGraphExternalNode): node is ProjectGraphProjectNode;
|
|
79
78
|
/**
|
|
80
79
|
* A node describing an external dependency
|
|
81
80
|
* `name` has as form of:
|
|
@@ -87,14 +86,15 @@ export interface ProjectGraphProjectNode {
|
|
|
87
86
|
*
|
|
88
87
|
*/
|
|
89
88
|
export interface ProjectGraphExternalNode {
|
|
90
|
-
type:
|
|
91
|
-
name:
|
|
89
|
+
type: string;
|
|
90
|
+
name: string;
|
|
92
91
|
data: {
|
|
93
92
|
version: string;
|
|
94
93
|
packageName: string;
|
|
95
94
|
hash?: string;
|
|
96
95
|
};
|
|
97
96
|
}
|
|
97
|
+
export declare function isProjectGraphExternalNode(node: ProjectGraphProjectNode | ProjectGraphExternalNode): node is ProjectGraphExternalNode;
|
|
98
98
|
/**
|
|
99
99
|
* A dependency between two projects
|
|
100
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,15 +1,16 @@
|
|
|
1
|
+
import type { ProjectConfiguration } from './workspace-json-project-json';
|
|
1
2
|
/**
|
|
2
3
|
* This function is used to get the implementation factory of an executor or generator.
|
|
3
4
|
* @param implementation path to the implementation
|
|
4
5
|
* @param directory path to the directory
|
|
5
6
|
* @returns a function that returns the implementation
|
|
6
7
|
*/
|
|
7
|
-
export declare function getImplementationFactory<T>(implementation: string, directory: string): () => T;
|
|
8
|
+
export declare function getImplementationFactory<T>(implementation: string, directory: string, packageName: string, projects: Record<string, ProjectConfiguration>): () => T;
|
|
8
9
|
/**
|
|
9
10
|
* This function is used to resolve the implementation of an executor or generator.
|
|
10
11
|
* @param implementationModulePath
|
|
11
12
|
* @param directory
|
|
12
13
|
* @returns path to the implementation
|
|
13
14
|
*/
|
|
14
|
-
export declare function resolveImplementation(implementationModulePath: string, directory: string): string;
|
|
15
|
-
export declare function resolveSchema(schemaPath: string, directory: string): string;
|
|
15
|
+
export declare function resolveImplementation(implementationModulePath: string, directory: string, packageName: string, projects: Record<string, ProjectConfiguration>): string;
|
|
16
|
+
export declare function resolveSchema(schemaPath: string, directory: string, packageName: string, projects: Record<string, ProjectConfiguration>): string;
|