@depup/nx 23.2.1-depup.8 → 23.3.0-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -18
- package/changes.json +9 -53
- package/dist/bin/init-local.js +7 -1
- package/dist/nx-cloud-internals.d.ts +1 -0
- package/dist/nx-cloud-internals.js +9 -0
- package/dist/plugins/package-json.js +1 -1
- package/dist/src/command-line/add/add.js +5 -1
- package/dist/src/command-line/affected/affected.js +70 -9
- package/dist/src/command-line/affected/command-object.js +1 -1
- package/dist/src/command-line/format/format.js +2 -18
- package/dist/src/command-line/graph/graph.d.ts +31 -0
- package/dist/src/command-line/graph/graph.js +113 -20
- package/dist/src/command-line/init/implementation/add-nx-to-monorepo.js +0 -3
- package/dist/src/command-line/init/implementation/add-nx-to-nest.js +0 -3
- package/dist/src/command-line/init/implementation/add-nx-to-npm-repo.js +0 -3
- package/dist/src/command-line/init/implementation/angular/index.js +0 -3
- package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.js +0 -3
- package/dist/src/command-line/init/implementation/format.js +2 -3
- package/dist/src/command-line/init/implementation/utils.d.ts +0 -1
- package/dist/src/command-line/init/implementation/utils.js +6 -9
- package/dist/src/command-line/init/init-v2.js +0 -3
- package/dist/src/command-line/migrate/agentic/capture-generator-output.d.ts +25 -0
- package/dist/src/command-line/migrate/agentic/capture-generator-output.js +121 -5
- package/dist/src/command-line/migrate/agentic/close-agent-session.d.ts +21 -0
- package/dist/src/command-line/migrate/agentic/close-agent-session.js +126 -0
- package/dist/src/command-line/migrate/agentic/definitions.d.ts +24 -0
- package/dist/src/command-line/migrate/agentic/definitions.js +79 -20
- package/dist/src/command-line/migrate/agentic/format-command.d.ts +14 -0
- package/dist/src/command-line/migrate/agentic/format-command.js +44 -0
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.d.ts +3 -3
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.js +3 -3
- package/dist/src/command-line/migrate/agentic/handoff.d.ts +50 -17
- package/dist/src/command-line/migrate/agentic/handoff.js +166 -24
- package/dist/src/command-line/migrate/agentic/instruction-files.d.ts +23 -0
- package/dist/src/command-line/migrate/agentic/instruction-files.js +41 -0
- package/dist/src/command-line/migrate/agentic/master/invocations.d.ts +12 -0
- package/dist/src/command-line/migrate/agentic/master/invocations.js +54 -0
- package/dist/src/command-line/migrate/agentic/master/run-master-session.d.ts +16 -0
- package/dist/src/command-line/migrate/agentic/master/run-master-session.js +175 -0
- package/dist/src/command-line/migrate/agentic/master/spawn-master.d.ts +31 -0
- package/dist/src/command-line/migrate/agentic/master/spawn-master.js +222 -0
- package/dist/src/command-line/migrate/agentic/prompts/final-validation.d.ts +13 -0
- package/dist/src/command-line/migrate/agentic/prompts/final-validation.js +41 -0
- package/dist/src/command-line/migrate/agentic/prompts/fragments.d.ts +17 -0
- package/dist/src/command-line/migrate/agentic/prompts/fragments.js +90 -0
- package/dist/src/command-line/migrate/agentic/prompts/generic-validation.js +4 -3
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.d.ts +25 -1
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.js +57 -34
- package/dist/src/command-line/migrate/agentic/run-step.js +28 -4
- package/dist/src/command-line/migrate/agentic/runner.d.ts +3 -15
- package/dist/src/command-line/migrate/agentic/runner.js +57 -239
- package/dist/src/command-line/migrate/agentic/terminal-repair.d.ts +1 -0
- package/dist/src/command-line/migrate/agentic/terminal-repair.js +27 -0
- package/dist/src/command-line/migrate/agentic/types.d.ts +23 -8
- package/dist/src/command-line/migrate/agentic/types.js +10 -7
- package/dist/src/command-line/migrate/agentic/windows-cmd.d.ts +33 -0
- package/dist/src/command-line/migrate/agentic/windows-cmd.js +88 -0
- package/dist/src/command-line/migrate/command-object.d.ts +2 -0
- package/dist/src/command-line/migrate/command-object.js +11 -1
- package/dist/src/command-line/migrate/deferred-output.d.ts +44 -0
- package/dist/src/command-line/migrate/deferred-output.js +92 -0
- package/dist/src/command-line/migrate/execute-migration.d.ts +9 -3
- package/dist/src/command-line/migrate/execute-migration.js +53 -16
- package/dist/src/command-line/migrate/migrate-analytics.d.ts +34 -9
- package/dist/src/command-line/migrate/migrate-analytics.js +71 -10
- package/dist/src/command-line/migrate/migrate-commits.d.ts +5 -4
- package/dist/src/command-line/migrate/migrate-commits.js +16 -6
- package/dist/src/command-line/migrate/migrate-config.d.ts +5 -2
- package/dist/src/command-line/migrate/migrate-config.js +19 -11
- package/dist/src/command-line/migrate/migrate-output.d.ts +3 -7
- package/dist/src/command-line/migrate/migrate-output.js +3 -7
- package/dist/src/command-line/migrate/migrate.d.ts +3 -0
- package/dist/src/command-line/migrate/migrate.js +183 -46
- package/dist/src/command-line/migrate/resolve-package-version.js +2 -19
- package/dist/src/command-line/migrate/run/agent-output.d.ts +11 -0
- package/dist/src/command-line/migrate/run/agent-output.js +21 -2
- package/dist/src/command-line/migrate/run/agent-work-payload.d.ts +37 -0
- package/dist/src/command-line/migrate/run/agent-work-payload.js +156 -0
- package/dist/src/command-line/migrate/run/atomic-write.d.ts +8 -0
- package/dist/src/command-line/migrate/run/atomic-write.js +17 -0
- package/dist/src/command-line/migrate/run/broker.d.ts +150 -0
- package/dist/src/command-line/migrate/run/broker.js +568 -0
- package/dist/src/command-line/migrate/run/clean-retry.d.ts +12 -0
- package/dist/src/command-line/migrate/run/clean-retry.js +99 -0
- package/dist/src/command-line/migrate/run/existing-run-report.d.ts +55 -0
- package/dist/src/command-line/migrate/run/existing-run-report.js +227 -0
- package/dist/src/command-line/migrate/run/give-up.d.ts +41 -0
- package/dist/src/command-line/migrate/run/give-up.js +148 -0
- package/dist/src/command-line/migrate/run/index.d.ts +9 -6
- package/dist/src/command-line/migrate/run/index.js +21 -2
- package/dist/src/command-line/migrate/run/issues.d.ts +127 -0
- package/dist/src/command-line/migrate/run/issues.js +1121 -0
- package/dist/src/command-line/migrate/run/orchestrator.d.ts +59 -1
- package/dist/src/command-line/migrate/run/orchestrator.js +1529 -457
- package/dist/src/command-line/migrate/run/run-id.d.ts +0 -8
- package/dist/src/command-line/migrate/run/run-id.js +0 -30
- package/dist/src/command-line/migrate/run/run-state.d.ts +77 -17
- package/dist/src/command-line/migrate/run/run-state.js +263 -32
- package/dist/src/command-line/migrate/run/runbook.d.ts +18 -0
- package/dist/src/command-line/migrate/run/runbook.js +118 -0
- package/dist/src/command-line/migrate/run/state-lock.d.ts +33 -2
- package/dist/src/command-line/migrate/run/state-lock.js +128 -2
- package/dist/src/command-line/migrate/run/state-machine.d.ts +50 -1
- package/dist/src/command-line/migrate/run/state-machine.js +339 -26
- package/dist/src/command-line/migrate/run/util.d.ts +3 -1
- package/dist/src/command-line/migrate/run/util.js +24 -3
- package/dist/src/command-line/migrate/run/worker.js +290 -129
- package/dist/src/command-line/migrate/step-actions.d.ts +1 -1
- package/dist/src/command-line/migrate/step-actions.js +7 -1
- package/dist/src/command-line/migrate/text.d.ts +6 -0
- package/dist/src/command-line/migrate/text.js +25 -0
- package/dist/src/command-line/migrate/version-skew-guard.js +2 -0
- package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +5 -11
- package/dist/src/command-line/release/publish.js +11 -8
- package/dist/src/command-line/release/utils/get-touched-projects-for-group.js +3 -3
- package/dist/src/command-line/release/utils/release-graph.js +1 -1
- package/dist/src/command-line/release/utils/remote-release-clients/github.js +5 -8
- package/dist/src/command-line/release/utils/remote-release-clients/gitlab.js +3 -3
- package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.d.ts +4 -2
- package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.js +37 -3
- package/dist/src/command-line/release/version/version-actions.d.ts +3 -0
- package/dist/src/command-line/reset/reset.js +10 -4
- package/dist/src/command-line/run/run-one.js +5 -1
- package/dist/src/command-line/run-many/run-many.js +6 -12
- package/dist/src/command-line/show/command-object.js +1 -1
- package/dist/src/command-line/show/projects.js +52 -1
- package/dist/src/command-line/yargs-utils/shared-options.d.ts +5 -1
- package/dist/src/command-line/yargs-utils/shared-options.js +38 -4
- package/dist/src/config/task-graph.d.ts +1 -1
- package/dist/src/config/workspace-json-project-json.d.ts +23 -1
- package/dist/src/core/graph/main.js +1 -1
- package/dist/src/core/graph/runtime.js +1 -1
- package/dist/src/core/graph/styles.js +1 -1
- package/dist/src/daemon/client/client.d.ts +14 -8
- package/dist/src/daemon/client/client.js +41 -12
- package/dist/src/daemon/message-types/get-plugin-capabilities.d.ts +5 -0
- package/dist/src/daemon/message-types/get-plugin-capabilities.js +11 -0
- package/dist/src/daemon/message-types/run-tasks-execution-hooks.d.ts +3 -2
- package/dist/src/daemon/message-types/select-affected-tasks.d.ts +21 -0
- package/dist/src/daemon/message-types/select-affected-tasks.js +11 -0
- package/dist/src/daemon/message-types/ultracache-configuration-version.d.ts +8 -0
- package/dist/src/daemon/message-types/ultracache-configuration-version.js +2 -0
- package/dist/src/daemon/server/dotenv-graph-changes.d.ts +1 -1
- package/dist/src/daemon/server/dotenv-graph-changes.js +2 -2
- package/dist/src/daemon/server/handle-get-plugin-capabilities.d.ts +2 -0
- package/dist/src/daemon/server/handle-get-plugin-capabilities.js +13 -0
- package/dist/src/daemon/server/handle-hash-tasks.d.ts +10 -2
- package/dist/src/daemon/server/handle-hash-tasks.js +18 -3
- package/dist/src/daemon/server/handle-select-affected-tasks.d.ts +3 -0
- package/dist/src/daemon/server/handle-select-affected-tasks.js +26 -0
- package/dist/src/daemon/server/handle-tasks-execution-hooks.d.ts +3 -2
- package/dist/src/daemon/server/{handle-outputs-changes.d.ts → handle-watch-events.d.ts} +4 -4
- package/dist/src/daemon/server/{handle-outputs-changes.js → handle-watch-events.js} +36 -37
- package/dist/src/daemon/server/outputs-tracking.d.ts +7 -19
- package/dist/src/daemon/server/outputs-tracking.js +7 -107
- package/dist/src/daemon/server/planning-context.d.ts +8 -0
- package/dist/src/daemon/server/planning-context.js +18 -0
- package/dist/src/daemon/server/project-graph-incremental-recomputation.d.ts +22 -7
- package/dist/src/daemon/server/project-graph-incremental-recomputation.js +104 -74
- package/dist/src/daemon/server/restart-checks.d.ts +22 -0
- package/dist/src/daemon/server/restart-checks.js +77 -0
- package/dist/src/daemon/server/server.d.ts +1 -0
- package/dist/src/daemon/server/server.js +54 -30
- package/dist/src/daemon/server/shutdown-utils.d.ts +0 -5
- package/dist/src/daemon/server/shutdown-utils.js +3 -26
- package/dist/src/daemon/server/ultracache-configuration-state.d.ts +7 -0
- package/dist/src/daemon/server/ultracache-configuration-state.js +36 -0
- package/dist/src/devkit-internals.d.ts +3 -1
- package/dist/src/devkit-internals.js +8 -3
- package/dist/src/executors/run-commands/run-commands.impl.d.ts +2 -1
- package/dist/src/executors/run-commands/run-commands.impl.js +19 -5
- package/dist/src/executors/run-commands/running-tasks.d.ts +5 -4
- package/dist/src/executors/run-commands/running-tasks.js +13 -13
- package/dist/src/hasher/create-task-hasher.d.ts +8 -1
- package/dist/src/hasher/create-task-hasher.js +13 -3
- package/dist/src/hasher/hash-plan-inspector.js +2 -2
- package/dist/src/hasher/hash-task.d.ts +2 -2
- package/dist/src/hasher/hash-task.js +28 -17
- package/dist/src/hasher/native-task-hasher-impl.d.ts +20 -4
- package/dist/src/hasher/native-task-hasher-impl.js +75 -9
- package/dist/src/hasher/task-hasher.d.ts +24 -7
- package/dist/src/hasher/task-hasher.js +27 -8
- package/dist/src/hasher/task-planning-context.d.ts +13 -0
- package/dist/src/hasher/task-planning-context.js +12 -0
- package/dist/src/native/index.d.ts +582 -21
- package/dist/src/native/index.js +3 -3
- package/dist/src/native/native-bindings.js +13 -1
- package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
- package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
- package/dist/src/native/transform-objects.d.ts +11 -2
- package/dist/src/native/transform-objects.js +46 -0
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +15 -8
- package/dist/src/nx-cloud/update-manager.d.ts +3 -0
- package/dist/src/nx-cloud/update-manager.js +19 -13
- package/dist/src/nx-cloud/utilities/client.d.ts +1 -1
- package/dist/src/nx-cloud/utilities/client.js +1 -1
- package/dist/src/nx-cloud/utilities/is-workspace-claimed.js +2 -1
- package/dist/src/nx-cloud/utilities/nx-cloud-http-client.d.ts +5 -0
- package/dist/src/nx-cloud/utilities/nx-cloud-http-client.js +16 -0
- package/dist/src/nx-cloud/utilities/url-shorten.js +17 -10
- package/dist/src/plugins/js/index.js +45 -64
- package/dist/src/plugins/js/lock-file/lock-file.d.ts +4 -4
- package/dist/src/plugins/js/lock-file/lock-file.js +6 -7
- package/dist/src/plugins/js/lock-file/pnpm-parser.js +1 -1
- package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.d.ts +2 -0
- package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.js +22 -0
- package/dist/src/plugins/js/project-graph/affected/lock-file-changes.d.ts +10 -2
- package/dist/src/plugins/js/project-graph/affected/lock-file-changes.js +51 -29
- package/dist/src/plugins/js/project-graph/affected/npm-packages.d.ts +10 -2
- package/dist/src/plugins/js/project-graph/affected/npm-packages.js +32 -11
- package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +22 -18
- package/dist/src/plugins/js/utils/register.js +13 -4
- package/dist/src/plugins/package-json/create-nodes.d.ts +2 -2
- package/dist/src/plugins/package-json/create-nodes.js +13 -13
- package/dist/src/project-graph/affected/affected-project-graph-models.d.ts +14 -0
- package/dist/src/project-graph/affected/affected-project-graph.js +5 -18
- package/dist/src/project-graph/affected/affected-projects.d.ts +7 -0
- package/dist/src/project-graph/affected/affected-projects.js +42 -0
- package/dist/src/project-graph/affected/affected-reasons.d.ts +116 -0
- package/dist/src/project-graph/affected/affected-reasons.js +459 -0
- package/dist/src/project-graph/affected/affected-tasks.d.ts +103 -0
- package/dist/src/project-graph/affected/affected-tasks.js +386 -0
- package/dist/src/project-graph/affected/print-explanation.d.ts +11 -0
- package/dist/src/project-graph/affected/print-explanation.js +44 -0
- package/dist/src/project-graph/error-types.d.ts +5 -0
- package/dist/src/project-graph/error-types.js +44 -5
- package/dist/src/project-graph/file-utils.d.ts +2 -0
- package/dist/src/project-graph/file-utils.js +12 -3
- package/dist/src/project-graph/nx-deps-cache.d.ts +5 -2
- package/dist/src/project-graph/nx-deps-cache.js +4 -4
- package/dist/src/project-graph/plugins/get-plugins.d.ts +3 -1
- package/dist/src/project-graph/plugins/get-plugins.js +60 -82
- package/dist/src/project-graph/plugins/in-process-loader.d.ts +1 -1
- package/dist/src/project-graph/plugins/in-process-loader.js +1 -4
- package/dist/src/project-graph/plugins/isolation/index.d.ts +1 -1
- package/dist/src/project-graph/plugins/isolation/index.js +3 -1
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.d.ts +8 -0
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.js +42 -6
- package/dist/src/project-graph/plugins/isolation/load-isolated-plugin.d.ts +10 -1
- package/dist/src/project-graph/plugins/isolation/load-isolated-plugin.js +67 -17
- package/dist/src/project-graph/plugins/isolation/messaging.d.ts +3 -2
- package/dist/src/project-graph/plugins/isolation/plugin-worker.js +5 -1
- package/dist/src/project-graph/plugins/loaded-nx-plugin.d.ts +5 -2
- package/dist/src/project-graph/plugins/loaded-nx-plugin.js +14 -1
- package/dist/src/project-graph/plugins/nx-plugin-capabilities.d.ts +6 -0
- package/dist/src/project-graph/plugins/nx-plugin-capabilities.js +28 -0
- package/dist/src/project-graph/plugins/task-results-stub.d.ts +50 -0
- package/dist/src/project-graph/plugins/task-results-stub.js +111 -0
- package/dist/src/project-graph/plugins/tasks-execution-hooks.d.ts +3 -2
- package/dist/src/project-graph/plugins/tasks-execution-hooks.js +14 -1
- package/dist/src/project-graph/project-graph.js +43 -42
- package/dist/src/project-graph/utils/project-configuration/target-merging.js +67 -0
- package/dist/src/project-graph/utils/project-configuration/target-normalization.js +83 -0
- package/dist/src/project-graph/utils/project-configuration/utils.d.ts +1 -0
- package/dist/src/project-graph/utils/project-configuration/utils.js +1 -0
- package/dist/src/tasks-runner/batch/run-batch.js +15 -0
- package/dist/src/tasks-runner/cache.d.ts +37 -2
- package/dist/src/tasks-runner/cache.js +42 -1
- package/dist/src/tasks-runner/create-task-graph.d.ts +24 -1
- package/dist/src/tasks-runner/create-task-graph.js +57 -2
- package/dist/src/tasks-runner/default-tasks-runner.js +1 -1
- package/dist/src/tasks-runner/forked-process-task-runner.d.ts +1 -1
- package/dist/src/tasks-runner/forked-process-task-runner.js +11 -10
- package/dist/src/tasks-runner/init-tasks-runner.d.ts +7 -2
- package/dist/src/tasks-runner/init-tasks-runner.js +15 -7
- package/dist/src/tasks-runner/is-tui-enabled.js +4 -3
- package/dist/src/tasks-runner/life-cycle.d.ts +7 -0
- package/dist/src/tasks-runner/life-cycle.js +7 -0
- package/dist/src/tasks-runner/life-cycles/summary-terminal-output-life-cycle.d.ts +35 -0
- package/dist/src/tasks-runner/life-cycles/summary-terminal-output-life-cycle.js +146 -0
- package/dist/src/tasks-runner/prune-task-graph.d.ts +17 -0
- package/dist/src/tasks-runner/prune-task-graph.js +45 -0
- package/dist/src/tasks-runner/run-command.d.ts +41 -5
- package/dist/src/tasks-runner/run-command.js +98 -22
- package/dist/src/tasks-runner/running-tasks/batch-process.d.ts +93 -19
- package/dist/src/tasks-runner/running-tasks/batch-process.js +184 -88
- package/dist/src/tasks-runner/task-io-service.d.ts +11 -3
- package/dist/src/tasks-runner/task-io-service.js +14 -5
- package/dist/src/tasks-runner/task-orchestrator.d.ts +71 -4
- package/dist/src/tasks-runner/task-orchestrator.js +266 -66
- package/dist/src/tasks-runner/tasks-runner.d.ts +2 -0
- package/dist/src/tasks-runner/terminal-output-path.d.ts +11 -0
- package/dist/src/tasks-runner/terminal-output-path.js +18 -0
- package/dist/src/tasks-runner/utils.d.ts +5 -0
- package/dist/src/tasks-runner/utils.js +14 -2
- package/dist/src/ultracache/config.d.ts +21 -0
- package/dist/src/ultracache/config.js +29 -0
- package/dist/src/ultracache/fetch.d.ts +21 -0
- package/dist/src/ultracache/fetch.js +43 -0
- package/dist/src/ultracache/overrides.d.ts +17 -0
- package/dist/src/ultracache/overrides.js +61 -0
- package/dist/src/ultracache/report.d.ts +13 -0
- package/dist/src/ultracache/report.js +62 -0
- package/dist/src/ultracache/store.d.ts +41 -0
- package/dist/src/ultracache/store.js +158 -0
- package/dist/src/utils/ab-testing.d.ts +4 -1
- package/dist/src/utils/ab-testing.js +22 -19
- package/dist/src/utils/chunkify.d.ts +1 -7
- package/dist/src/utils/chunkify.js +2 -8
- package/dist/src/utils/command-line-utils.d.ts +20 -0
- package/dist/src/utils/command-line-utils.js +10 -3
- package/dist/src/utils/create-cli-options.d.ts +6 -0
- package/dist/src/utils/create-cli-options.js +29 -0
- package/dist/src/utils/db-connection.d.ts +2 -0
- package/dist/src/utils/db-connection.js +2 -0
- package/dist/src/utils/formatters/index.d.ts +6 -0
- package/dist/src/utils/formatters/index.js +5 -0
- package/dist/src/utils/formatters/prettier.d.ts +0 -8
- package/dist/src/utils/formatters/prettier.js +4 -26
- package/dist/src/utils/git-utils.d.ts +19 -0
- package/dist/src/utils/git-utils.js +97 -39
- package/dist/src/utils/handle-errors.js +5 -43
- package/dist/src/utils/http-client.d.ts +27 -0
- package/dist/src/utils/http-client.js +193 -0
- package/dist/src/utils/installed-nx-version.js +2 -48
- package/dist/src/utils/json-diff.d.ts +4 -2
- package/dist/src/utils/json-diff.js +6 -94
- package/dist/src/utils/min-release-age/packument.js +1 -1
- package/dist/src/utils/nx-cloud-utils.d.ts +2 -0
- package/dist/src/utils/nx-cloud-utils.js +6 -1
- package/dist/src/utils/output.d.ts +22 -3
- package/dist/src/utils/output.js +28 -5
- package/dist/src/utils/package-json.d.ts +25 -0
- package/dist/src/utils/package-json.js +49 -6
- package/dist/src/utils/package-manager.d.ts +6 -0
- package/dist/src/utils/package-manager.js +10 -0
- package/dist/src/utils/plugins/plugin-capabilities.js +7 -2
- package/dist/src/utils/project-graph-utils.d.ts +2 -0
- package/dist/src/utils/project-graph-utils.js +12 -0
- package/dist/src/utils/provenance.js +20 -4
- package/dist/src/utils/serialize-overrides-into-command-line.js +2 -4
- package/dist/src/utils/workspace-context.d.ts +51 -3
- package/dist/src/utils/workspace-context.js +174 -10
- package/package.json +36 -98
- package/schemas/nx-schema.json +38 -0
- package/schemas/project-schema.json +35 -0
- package/dist/src/daemon/server/file-watching/route-workspace-changes.d.ts +0 -9
- package/dist/src/daemon/server/file-watching/route-workspace-changes.js +0 -76
- package/dist/src/daemon/server/watcher.d.ts +0 -18
- package/dist/src/daemon/server/watcher.js +0 -126
- package/dist/src/nx-cloud/utilities/axios.d.ts +0 -4
- package/dist/src/nx-cloud/utilities/axios.js +0 -17
- package/dist/src/project-graph/affected/locators/project-glob-changes.d.ts +0 -2
- package/dist/src/project-graph/affected/locators/project-glob-changes.js +0 -47
- package/dist/src/project-graph/affected/locators/workspace-json-changes.d.ts +0 -4
- package/dist/src/project-graph/affected/locators/workspace-json-changes.js +0 -47
- package/dist/src/project-graph/affected/locators/workspace-projects.d.ts +0 -3
- package/dist/src/project-graph/affected/locators/workspace-projects.js +0 -74
- package/dist/src/utils/collapse-expanded-outputs.d.ts +0 -10
- package/dist/src/utils/collapse-expanded-outputs.js +0 -72
package/README.md
CHANGED
|
@@ -13,10 +13,10 @@ npm install @depup/nx
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [nx](https://www.npmjs.com/package/nx) @ 23.
|
|
17
|
-
| Processed | 2026-10-
|
|
16
|
+
| Original | [nx](https://www.npmjs.com/package/nx) @ 23.3.0 |
|
|
17
|
+
| Processed | 2026-10-07 |
|
|
18
18
|
| Smoke test | failed |
|
|
19
|
-
| Deps updated |
|
|
19
|
+
| Deps updated | 66 |
|
|
20
20
|
|
|
21
21
|
## Dependency Changes
|
|
22
22
|
|
|
@@ -28,18 +28,14 @@ npm install @depup/nx
|
|
|
28
28
|
| @emnapi/runtime | 1.4.5 | ^1.11.3 |
|
|
29
29
|
| @emnapi/wasi-threads | 1.0.4 | ^2.2.0 |
|
|
30
30
|
| @jest/diff-sequences | 30.0.1 | ^30.5.0 |
|
|
31
|
-
| @napi-rs/wasm-runtime | 0.2.4 | ^1.2.
|
|
31
|
+
| @napi-rs/wasm-runtime | 0.2.4 | ^1.2.5 |
|
|
32
32
|
| @tybys/wasm-util | 0.9.0 | ^0.10.4 |
|
|
33
33
|
| @zkochan/js-yaml | 0.0.7 | ^0.0.11 |
|
|
34
|
-
| agent-base | 6.0.2 | ^9.0.0 |
|
|
35
34
|
| ansi-regex | 5.0.1 | ^6.4.0 |
|
|
36
35
|
| ansi-styles | 4.3.0 | ^7.0.0 |
|
|
37
36
|
| argparse | 2.0.1 | ^3.0.2 |
|
|
38
|
-
| asynckit | 0.4.0 | ^0.5.0 |
|
|
39
|
-
| axios | 1.18.1 | ^1.20.0 |
|
|
40
37
|
| balanced-match | 4.0.3 | ^4.0.4 |
|
|
41
38
|
| bl | 4.1.0 | ^7.0.12 |
|
|
42
|
-
| brace-expansion | 5.0.9 | ^5.0.12 |
|
|
43
39
|
| buffer | 5.7.1 | ^6.0.3 |
|
|
44
40
|
| bundle-name | 4.1.0 | ^4.1.1 |
|
|
45
41
|
| chalk | 4.1.2 | ^6.0.1 |
|
|
@@ -52,19 +48,15 @@ npm install @depup/nx
|
|
|
52
48
|
| default-browser | 5.2.1 | ^5.5.1 |
|
|
53
49
|
| default-browser-id | 5.0.0 | ^5.0.1 |
|
|
54
50
|
| defaults | 1.0.4 | ^3.0.0 |
|
|
55
|
-
| dotenv | 16.4.7 | ^18.0.
|
|
51
|
+
| dotenv | 16.4.7 | ^18.0.6 |
|
|
56
52
|
| dotenv-expand | 12.0.3 | ^1000.0.0 |
|
|
57
53
|
| ejs | 5.0.1 | ^7.0.1 |
|
|
58
54
|
| emoji-regex | 8.0.0 | ^11.0.0 |
|
|
59
|
-
| es-object-atoms | 1.1.1 | ^1.1.2 |
|
|
60
55
|
| escape-string-regexp | 1.0.5 | ^5.0.0 |
|
|
61
56
|
| fast-wrap-ansi | 0.2.0 | ^0.2.2 |
|
|
62
57
|
| figures | 3.2.0 | ^6.1.0 |
|
|
63
|
-
| flat | 5.0.2 | ^6.0.1 |
|
|
64
|
-
| follow-redirects | 1.16.0 | ^1.16.1 |
|
|
65
58
|
| has-flag | 4.0.0 | ^5.0.1 |
|
|
66
|
-
|
|
|
67
|
-
| ignore | 7.0.5 | ^7.0.12 |
|
|
59
|
+
| ignore | 7.0.6 | ^7.0.12 |
|
|
68
60
|
| is-docker | 3.0.0 | ^4.0.0 |
|
|
69
61
|
| is-fullwidth-code-point | 3.0.0 | ^5.1.0 |
|
|
70
62
|
| is-interactive | 1.0.0 | ^2.0.0 |
|
|
@@ -73,8 +65,6 @@ npm install @depup/nx
|
|
|
73
65
|
| isexe | 2.0.0 | ^4.0.0 |
|
|
74
66
|
| lines-and-columns | 2.0.3 | ^2.0.4 |
|
|
75
67
|
| log-symbols | 4.1.0 | ^7.0.1 |
|
|
76
|
-
| mime-db | 1.52.0 | ^1.54.0 |
|
|
77
|
-
| mime-types | 2.1.35 | ^3.0.2 |
|
|
78
68
|
| mimic-fn | 2.1.0 | ^5.0.0 |
|
|
79
69
|
| minimatch | 10.2.5 | ^10.2.6 |
|
|
80
70
|
| npm-run-path | 4.0.1 | ^6.0.0 |
|
|
@@ -85,15 +75,14 @@ npm install @depup/nx
|
|
|
85
75
|
| readable-stream | 3.6.2 | ^4.7.0 |
|
|
86
76
|
| restore-cursor | 3.1.0 | ^5.1.0 |
|
|
87
77
|
| run-applescript | 7.0.0 | ^7.1.0 |
|
|
88
|
-
| semver | 7.8.4 | ^7.8.5 |
|
|
89
78
|
| signal-exit | 3.0.7 | ^4.1.0 |
|
|
90
79
|
| sisteransi | 1.0.5 | ^2.0.0 |
|
|
91
|
-
| smol-toml | 1.6.1 | ^1.9.0 |
|
|
92
80
|
| string-width | 4.2.3 | ^8.3.0 |
|
|
93
81
|
| strip-ansi | 6.0.1 | ^7.2.0 |
|
|
94
82
|
| strip-bom | 3.0.0 | ^5.0.0 |
|
|
95
83
|
| supports-color | 7.2.0 | ^11.0.0 |
|
|
96
84
|
| tar-stream | 2.2.0 | ^3.2.2 |
|
|
85
|
+
| undici | 7.29.0 | ^8.11.2 |
|
|
97
86
|
| which | 3.0.1 | ^7.0.0 |
|
|
98
87
|
| wrap-ansi | 7.0.0 | ^10.0.2 |
|
|
99
88
|
| yaml | 2.9.0 | ^2.9.1 |
|
package/changes.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"@napi-rs/wasm-runtime": {
|
|
28
28
|
"from": "0.2.4",
|
|
29
|
-
"to": "^1.2.
|
|
29
|
+
"to": "^1.2.5"
|
|
30
30
|
},
|
|
31
31
|
"@tybys/wasm-util": {
|
|
32
32
|
"from": "0.9.0",
|
|
@@ -36,10 +36,6 @@
|
|
|
36
36
|
"from": "0.0.7",
|
|
37
37
|
"to": "^0.0.11"
|
|
38
38
|
},
|
|
39
|
-
"agent-base": {
|
|
40
|
-
"from": "6.0.2",
|
|
41
|
-
"to": "^9.0.0"
|
|
42
|
-
},
|
|
43
39
|
"ansi-regex": {
|
|
44
40
|
"from": "5.0.1",
|
|
45
41
|
"to": "^6.4.0"
|
|
@@ -52,14 +48,6 @@
|
|
|
52
48
|
"from": "2.0.1",
|
|
53
49
|
"to": "^3.0.2"
|
|
54
50
|
},
|
|
55
|
-
"asynckit": {
|
|
56
|
-
"from": "0.4.0",
|
|
57
|
-
"to": "^0.5.0"
|
|
58
|
-
},
|
|
59
|
-
"axios": {
|
|
60
|
-
"from": "1.18.1",
|
|
61
|
-
"to": "^1.20.0"
|
|
62
|
-
},
|
|
63
51
|
"balanced-match": {
|
|
64
52
|
"from": "4.0.3",
|
|
65
53
|
"to": "^4.0.4"
|
|
@@ -68,10 +56,6 @@
|
|
|
68
56
|
"from": "4.1.0",
|
|
69
57
|
"to": "^7.0.12"
|
|
70
58
|
},
|
|
71
|
-
"brace-expansion": {
|
|
72
|
-
"from": "5.0.9",
|
|
73
|
-
"to": "^5.0.12"
|
|
74
|
-
},
|
|
75
59
|
"buffer": {
|
|
76
60
|
"from": "5.7.1",
|
|
77
61
|
"to": "^6.0.3"
|
|
@@ -122,7 +106,7 @@
|
|
|
122
106
|
},
|
|
123
107
|
"dotenv": {
|
|
124
108
|
"from": "16.4.7",
|
|
125
|
-
"to": "^18.0.
|
|
109
|
+
"to": "^18.0.6"
|
|
126
110
|
},
|
|
127
111
|
"dotenv-expand": {
|
|
128
112
|
"from": "12.0.3",
|
|
@@ -136,10 +120,6 @@
|
|
|
136
120
|
"from": "8.0.0",
|
|
137
121
|
"to": "^11.0.0"
|
|
138
122
|
},
|
|
139
|
-
"es-object-atoms": {
|
|
140
|
-
"from": "1.1.1",
|
|
141
|
-
"to": "^1.1.2"
|
|
142
|
-
},
|
|
143
123
|
"escape-string-regexp": {
|
|
144
124
|
"from": "1.0.5",
|
|
145
125
|
"to": "^5.0.0"
|
|
@@ -152,24 +132,12 @@
|
|
|
152
132
|
"from": "3.2.0",
|
|
153
133
|
"to": "^6.1.0"
|
|
154
134
|
},
|
|
155
|
-
"flat": {
|
|
156
|
-
"from": "5.0.2",
|
|
157
|
-
"to": "^6.0.1"
|
|
158
|
-
},
|
|
159
|
-
"follow-redirects": {
|
|
160
|
-
"from": "1.16.0",
|
|
161
|
-
"to": "^1.16.1"
|
|
162
|
-
},
|
|
163
135
|
"has-flag": {
|
|
164
136
|
"from": "4.0.0",
|
|
165
137
|
"to": "^5.0.1"
|
|
166
138
|
},
|
|
167
|
-
"https-proxy-agent": {
|
|
168
|
-
"from": "5.0.1",
|
|
169
|
-
"to": "^9.1.0"
|
|
170
|
-
},
|
|
171
139
|
"ignore": {
|
|
172
|
-
"from": "7.0.
|
|
140
|
+
"from": "7.0.6",
|
|
173
141
|
"to": "^7.0.12"
|
|
174
142
|
},
|
|
175
143
|
"is-docker": {
|
|
@@ -204,14 +172,6 @@
|
|
|
204
172
|
"from": "4.1.0",
|
|
205
173
|
"to": "^7.0.1"
|
|
206
174
|
},
|
|
207
|
-
"mime-db": {
|
|
208
|
-
"from": "1.52.0",
|
|
209
|
-
"to": "^1.54.0"
|
|
210
|
-
},
|
|
211
|
-
"mime-types": {
|
|
212
|
-
"from": "2.1.35",
|
|
213
|
-
"to": "^3.0.2"
|
|
214
|
-
},
|
|
215
175
|
"mimic-fn": {
|
|
216
176
|
"from": "2.1.0",
|
|
217
177
|
"to": "^5.0.0"
|
|
@@ -252,10 +212,6 @@
|
|
|
252
212
|
"from": "7.0.0",
|
|
253
213
|
"to": "^7.1.0"
|
|
254
214
|
},
|
|
255
|
-
"semver": {
|
|
256
|
-
"from": "7.8.4",
|
|
257
|
-
"to": "^7.8.5"
|
|
258
|
-
},
|
|
259
215
|
"signal-exit": {
|
|
260
216
|
"from": "3.0.7",
|
|
261
217
|
"to": "^4.1.0"
|
|
@@ -264,10 +220,6 @@
|
|
|
264
220
|
"from": "1.0.5",
|
|
265
221
|
"to": "^2.0.0"
|
|
266
222
|
},
|
|
267
|
-
"smol-toml": {
|
|
268
|
-
"from": "1.6.1",
|
|
269
|
-
"to": "^1.9.0"
|
|
270
|
-
},
|
|
271
223
|
"string-width": {
|
|
272
224
|
"from": "4.2.3",
|
|
273
225
|
"to": "^8.3.0"
|
|
@@ -288,6 +240,10 @@
|
|
|
288
240
|
"from": "2.2.0",
|
|
289
241
|
"to": "^3.2.2"
|
|
290
242
|
},
|
|
243
|
+
"undici": {
|
|
244
|
+
"from": "7.29.0",
|
|
245
|
+
"to": "^8.11.2"
|
|
246
|
+
},
|
|
291
247
|
"which": {
|
|
292
248
|
"from": "3.0.1",
|
|
293
249
|
"to": "^7.0.0"
|
|
@@ -309,6 +265,6 @@
|
|
|
309
265
|
"to": "^22.0.0"
|
|
310
266
|
}
|
|
311
267
|
},
|
|
312
|
-
"timestamp": "2026-10-
|
|
313
|
-
"totalUpdated":
|
|
268
|
+
"timestamp": "2026-10-07T16:12:54.819Z",
|
|
269
|
+
"totalUpdated": 66
|
|
314
270
|
}
|
package/dist/bin/init-local.js
CHANGED
|
@@ -9,6 +9,7 @@ const client_1 = require("../src/daemon/client/client");
|
|
|
9
9
|
const prompt_helpers_1 = require("../src/utils/prompt-helpers");
|
|
10
10
|
const output_1 = require("../src/utils/output");
|
|
11
11
|
const analytics_1 = require("../src/analytics");
|
|
12
|
+
const is_ci_1 = require("../src/utils/is-ci");
|
|
12
13
|
/**
|
|
13
14
|
* Nx is being run inside a workspace.
|
|
14
15
|
*
|
|
@@ -119,6 +120,11 @@ function shouldDelegateToAngularCLI() {
|
|
|
119
120
|
return commands.indexOf(command) > -1;
|
|
120
121
|
}
|
|
121
122
|
async function ensureNxConsoleInstalledViaDaemon() {
|
|
123
|
+
// Asking the daemon makes a fresh daemon install nx@latest in the background,
|
|
124
|
+
// so skip it whenever the prompt could not be shown anyway.
|
|
125
|
+
if (!process.stdout.isTTY || (0, is_ci_1.isCI)()) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
122
128
|
// Only proceed if daemon is available
|
|
123
129
|
if (!client_1.daemonClient.enabled() || !(await client_1.daemonClient.isServerAvailable())) {
|
|
124
130
|
return;
|
|
@@ -126,7 +132,7 @@ async function ensureNxConsoleInstalledViaDaemon() {
|
|
|
126
132
|
// Get status from daemon
|
|
127
133
|
const status = await client_1.daemonClient.getNxConsoleStatus();
|
|
128
134
|
// If we should prompt the user
|
|
129
|
-
if (status.shouldPrompt
|
|
135
|
+
if (status.shouldPrompt) {
|
|
130
136
|
output_1.output.log({
|
|
131
137
|
title: "Install Nx's official editor extension to:",
|
|
132
138
|
bodyLines: [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { importUltracacheConfigurations, openUltracacheConfigurations, } from './src/ultracache/store';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Nx internals for the Nx Cloud client, loaded as `nx/nx-cloud-internals`; not
|
|
3
|
+
// a public API. The client probes these exports to tell what this nx supports,
|
|
4
|
+
// so keep them stable.
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.openUltracacheConfigurations = exports.importUltracacheConfigurations = void 0;
|
|
7
|
+
var store_1 = require("./src/ultracache/store");
|
|
8
|
+
Object.defineProperty(exports, "importUltracacheConfigurations", { enumerable: true, get: function () { return store_1.importUltracacheConfigurations; } });
|
|
9
|
+
Object.defineProperty(exports, "openUltracacheConfigurations", { enumerable: true, get: function () { return store_1.openUltracacheConfigurations; } });
|
|
@@ -29,7 +29,7 @@ const plugin = {
|
|
|
29
29
|
const patterns = (0, package_json_1.buildPackageJsonPatterns)(context.workspaceRoot, (f) => (0, fileutils_1.readJsonFile)((0, path_1.join)(context.workspaceRoot, f)));
|
|
30
30
|
const isInPackageJsonWorkspaces = (0, package_json_1.buildPackageJsonWorkspacesMatcher)(patterns);
|
|
31
31
|
const packageManagerCommand = (0, package_manager_1.getPackageManagerCommand)((0, package_manager_1.detectPackageManager)(context.workspaceRoot), context.workspaceRoot);
|
|
32
|
-
const result = (0, plugins_1.createNodesFromFiles)((packageJsonPath) => (0, package_json_1.createNodeFromPackageJson)(packageJsonPath, workspace_root_1.workspaceRoot, cache, isInPackageJsonWorkspaces(packageJsonPath), packageManagerCommand), configFiles, options, context);
|
|
32
|
+
const result = (0, plugins_1.createNodesFromFiles)((packageJsonPath) => (0, package_json_1.createNodeFromPackageJson)(packageJsonPath, workspace_root_1.workspaceRoot, cache, isInPackageJsonWorkspaces(packageJsonPath), packageManagerCommand, context.nxJsonConfiguration), configFiles, options, context);
|
|
33
33
|
writeCache();
|
|
34
34
|
return result;
|
|
35
35
|
},
|
|
@@ -49,12 +49,16 @@ async function installPackage(pkgName, version, nxJson) {
|
|
|
49
49
|
// pnpm 11+ fails the install when the plugin's own dependency tree
|
|
50
50
|
// carries unacknowledged build scripts, and the plugin's generators can
|
|
51
51
|
// only record allowBuilds decisions after this install. Warn and skip
|
|
52
|
-
// for this one install, like pnpm 10 did.
|
|
52
|
+
// for this one install, like pnpm 10 did. pnpm 12 gave `--config` a
|
|
53
|
+
// meaning of its own and takes the setting from the environment instead.
|
|
54
|
+
const env = { ...process.env };
|
|
53
55
|
if (pm === 'pnpm' && (0, semver_1.gte)(pmv, '11.0.0')) {
|
|
54
56
|
command += ' --config.strictDepBuilds=false';
|
|
57
|
+
env.PNPM_CONFIG_STRICT_DEP_BUILDS = 'false';
|
|
55
58
|
}
|
|
56
59
|
await new Promise((resolve) => (0, child_process_1.exec)(command, {
|
|
57
60
|
windowsHide: true,
|
|
61
|
+
env,
|
|
58
62
|
}, (error, stdout, stderr) => {
|
|
59
63
|
if (error) {
|
|
60
64
|
spinner.fail();
|
|
@@ -14,6 +14,9 @@ const affected_project_graph_1 = require("../../project-graph/affected/affected-
|
|
|
14
14
|
const configuration_1 = require("../../config/configuration");
|
|
15
15
|
const find_matching_projects_1 = require("../../utils/find-matching-projects");
|
|
16
16
|
const graph_1 = require("../graph/graph");
|
|
17
|
+
const affected_tasks_1 = require("../../project-graph/affected/affected-tasks");
|
|
18
|
+
const affected_reasons_1 = require("../../project-graph/affected/affected-reasons");
|
|
19
|
+
const print_explanation_1 = require("../../project-graph/affected/print-explanation");
|
|
17
20
|
async function affected(command, args, extraTargetDependencies = {}, extraOptions = {
|
|
18
21
|
excludeTaskDependencies: args.excludeTaskDependencies,
|
|
19
22
|
loadDotEnvFiles: process.env.NX_LOAD_DOT_ENV_FILES !== 'false',
|
|
@@ -25,16 +28,64 @@ async function affected(command, args, extraTargetDependencies = {}, extraOption
|
|
|
25
28
|
printWarnings: command !== 'print-affected' && !args.plain && args.graph !== 'stdout',
|
|
26
29
|
}, nxJson);
|
|
27
30
|
await (0, connect_to_nx_cloud_1.connectToNxCloudIfExplicitlyAsked)(nxArgs);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
// Task selection needs a target to select against, so `nx graph --affected`
|
|
32
|
+
// and the deprecated print-affected stay project-grained.
|
|
33
|
+
const useTasks = (0, affected_tasks_1.selectsAffectedTasks)() &&
|
|
34
|
+
command === 'affected' &&
|
|
35
|
+
!!nxArgs.targets?.length;
|
|
36
|
+
if ((0, affected_reasons_1.isExplaining)(nxArgs.explain) && !useTasks) {
|
|
37
|
+
throw new Error((0, affected_reasons_1.explainUnavailable)([
|
|
38
|
+
!(0, affected_tasks_1.selectsAffectedTasks)() && 'NX_LEGACY_AFFECTED=false',
|
|
39
|
+
!nxArgs.targets?.length && 'targets passed with --targets (-t)',
|
|
40
|
+
].filter(Boolean)));
|
|
41
|
+
}
|
|
42
|
+
// Outside the try so errors reach handleErrors, as they did from inside runCommand.
|
|
43
|
+
let projectGraph;
|
|
44
|
+
let taskSelection;
|
|
45
|
+
let projects = [];
|
|
46
|
+
if (useTasks) {
|
|
47
|
+
let explanation;
|
|
48
|
+
({ projectGraph, taskSelection, explanation } = await (0, affected_tasks_1.computeAffectedTasks)({
|
|
49
|
+
nxJson,
|
|
50
|
+
targets: nxArgs.targets,
|
|
51
|
+
touchedFiles: (0, file_utils_1.calculateFileChanges)((0, command_line_utils_1.parseFiles)(nxArgs).files, nxArgs),
|
|
52
|
+
fileChangeArgs: {
|
|
53
|
+
base: nxArgs.base,
|
|
54
|
+
head: nxArgs.head,
|
|
55
|
+
files: nxArgs.files,
|
|
56
|
+
},
|
|
57
|
+
configuration: nxArgs.configuration,
|
|
58
|
+
overrides,
|
|
59
|
+
extraTargetDependencies,
|
|
60
|
+
excludeTaskDependencies: extraOptions.excludeTaskDependencies,
|
|
61
|
+
exclude: nxArgs.exclude,
|
|
62
|
+
explain: (0, affected_reasons_1.isExplaining)(nxArgs.explain),
|
|
63
|
+
...(await (0, run_command_1.runnerInputsForSelection)(nxArgs, nxJson)),
|
|
64
|
+
}));
|
|
65
|
+
// --explain reports the selection rather than acting on it: someone asking
|
|
66
|
+
// why a task is affected does not also want it to run.
|
|
67
|
+
if ((0, affected_reasons_1.isExplaining)(nxArgs.explain)) {
|
|
68
|
+
(0, print_explanation_1.printAffectedExplanation)(explanation, 'Affected tasks', nxArgs.explain, {
|
|
69
|
+
verbose: args.verbose,
|
|
70
|
+
});
|
|
71
|
+
await output_1.output.drain();
|
|
72
|
+
process.exit(0);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
projectGraph = await (0, project_graph_1.createProjectGraphAsync)({ exitOnError: true });
|
|
77
|
+
projects = await getAffectedGraphNodes(nxArgs, projectGraph);
|
|
78
|
+
if (command === 'affected' && !nxArgs.graph) {
|
|
79
|
+
taskSelection = (0, run_command_1.selectTasksForProjects)(projectGraph, projectsWithTarget(projects, nxArgs), nxArgs, overrides, extraTargetDependencies, extraOptions.excludeTaskDependencies);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
32
82
|
try {
|
|
33
83
|
switch (command) {
|
|
34
84
|
case 'affected': {
|
|
35
|
-
const projectsWithTarget = allProjectsWithTarget(projects, nxArgs);
|
|
36
85
|
if (nxArgs.graph) {
|
|
37
|
-
const projectNames =
|
|
86
|
+
const projectNames = useTasks
|
|
87
|
+
? initiatingProjects(taskSelection)
|
|
88
|
+
: projectsWithTarget(projects, nxArgs);
|
|
38
89
|
const file = (0, command_line_utils_1.readGraphFileFromGraphArg)(nxArgs);
|
|
39
90
|
return await (0, graph_1.generateGraph)({
|
|
40
91
|
watch: true,
|
|
@@ -45,10 +96,13 @@ async function affected(command, args, extraTargetDependencies = {}, extraOption
|
|
|
45
96
|
(!nxArgs.projects || nxArgs.projects.length === 0),
|
|
46
97
|
projects: projectNames,
|
|
47
98
|
file,
|
|
99
|
+
taskSelection: taskSelection ??
|
|
100
|
+
(() => (0, run_command_1.selectTasksForProjects)(projectGraph, projectNames, nxArgs, overrides, extraTargetDependencies, extraOptions.excludeTaskDependencies)),
|
|
101
|
+
configuration: nxArgs.configuration,
|
|
48
102
|
}, projectNames);
|
|
49
103
|
}
|
|
50
104
|
else {
|
|
51
|
-
const status = await (0, run_command_1.runCommand)(
|
|
105
|
+
const status = await (0, run_command_1.runCommand)(taskSelection, projectGraph, { nxJson }, nxArgs, overrides, null, extraTargetDependencies, extraOptions);
|
|
52
106
|
await output_1.output.drain();
|
|
53
107
|
process.exit(status);
|
|
54
108
|
}
|
|
@@ -74,8 +128,15 @@ async function getAffectedGraphNodes(nxArgs, projectGraph) {
|
|
|
74
128
|
}
|
|
75
129
|
return Object.values(affectedGraph.nodes);
|
|
76
130
|
}
|
|
77
|
-
function
|
|
78
|
-
return
|
|
131
|
+
function initiatingProjects(selection) {
|
|
132
|
+
return [
|
|
133
|
+
...new Set(selection.initiatingTaskIds.map((id) => selection.taskGraph.tasks[id].target.project)),
|
|
134
|
+
];
|
|
135
|
+
}
|
|
136
|
+
function projectsWithTarget(projects, nxArgs) {
|
|
137
|
+
return projects
|
|
138
|
+
.filter((p) => nxArgs.targets.find((target) => (0, project_graph_utils_1.projectHasTarget)(p, target)))
|
|
139
|
+
.map((p) => p.name);
|
|
79
140
|
}
|
|
80
141
|
function printError(e, verbose) {
|
|
81
142
|
const bodyLines = [e.message];
|
|
@@ -8,7 +8,7 @@ const shared_options_1 = require("../yargs-utils/shared-options");
|
|
|
8
8
|
exports.yargsAffectedCommand = {
|
|
9
9
|
command: 'affected',
|
|
10
10
|
describe: 'Run target for affected projects. Affected projects are projects that have been changed and projects that depend on the changed projects. See https://nx.dev/ci/features/affected for more details.',
|
|
11
|
-
builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withTuiOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withTargetAndConfigurationOption)((0, shared_options_1.withBatch)(yargs))))))
|
|
11
|
+
builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withTuiOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withTargetAndConfigurationOption)((0, shared_options_1.withBatch)((0, shared_options_1.withExplainOption)(yargs)))))))
|
|
12
12
|
.option('all', {
|
|
13
13
|
type: 'boolean',
|
|
14
14
|
deprecated: 'Use `nx run-many` instead',
|
|
@@ -18,15 +18,6 @@ const ignore_1 = require("../../utils/ignore");
|
|
|
18
18
|
const object_sort_1 = require("../../utils/object-sort");
|
|
19
19
|
const output_1 = require("../../utils/output");
|
|
20
20
|
const workspace_root_1 = require("../../utils/workspace-root");
|
|
21
|
-
/**
|
|
22
|
-
* A table, not a `switch`: this lookup sits inside a `try` whose `catch`
|
|
23
|
-
* reports "configured but not installed", and a `never` arm would throw into
|
|
24
|
-
* that catch and be misreported. A missing member is a compile error here.
|
|
25
|
-
*/
|
|
26
|
-
const resolveFormatterBin = {
|
|
27
|
-
oxfmt: oxfmt_1.getOxfmtBinPath,
|
|
28
|
-
prettier: prettier_1.getPrettierPath,
|
|
29
|
-
};
|
|
30
21
|
async function format(command, args) {
|
|
31
22
|
const formatterType = (0, formatters_1.detectFormatter)(workspace_root_1.workspaceRoot);
|
|
32
23
|
if (!formatterType) {
|
|
@@ -41,7 +32,7 @@ async function format(command, args) {
|
|
|
41
32
|
// node_modules. Resolving now turns a raw MODULE_NOT_FOUND into something
|
|
42
33
|
// actionable.
|
|
43
34
|
try {
|
|
44
|
-
resolveFormatterBin[formatterType]();
|
|
35
|
+
formatters_1.resolveFormatterBin[formatterType]();
|
|
45
36
|
}
|
|
46
37
|
catch {
|
|
47
38
|
output_1.output.error({
|
|
@@ -53,19 +44,12 @@ async function format(command, args) {
|
|
|
53
44
|
process.exit(1);
|
|
54
45
|
}
|
|
55
46
|
const { nxArgs } = (0, command_line_utils_1.splitArgsIntoNxArgsAndOverrides)(args, 'affected', { printWarnings: false }, (0, configuration_1.readNxJson)());
|
|
56
|
-
// Patterns are kept raw here. Prettier is invoked through a shell so it
|
|
57
|
-
// quotes them at the call site; oxfmt is invoked with execFile and needs
|
|
58
|
-
// the unquoted paths.
|
|
59
47
|
const patterns = await getPatterns(formatterType, {
|
|
60
48
|
...args,
|
|
61
49
|
...nxArgs,
|
|
62
50
|
});
|
|
63
51
|
// Chunkify the patterns array to prevent crashing the windows terminal.
|
|
64
|
-
|
|
65
|
-
// chunks against that; oxfmt goes through execFile and gets them raw.
|
|
66
|
-
const chunkList = (0, chunkify_1.chunkify)(patterns, undefined, formatterType === 'prettier'
|
|
67
|
-
? (pattern) => (0, prettier_1.quoteForShell)(pattern).length
|
|
68
|
-
: undefined);
|
|
52
|
+
const chunkList = (0, chunkify_1.chunkify)(patterns);
|
|
69
53
|
switch (command) {
|
|
70
54
|
case 'write':
|
|
71
55
|
if (nxArgs.sortRootTsconfigPaths) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ProjectFileMap, ProjectGraph, ProjectGraphDependency, ProjectGraphProjectNode } from '../../config/project-graph';
|
|
2
2
|
import { TaskGraph } from '../../config/task-graph';
|
|
3
|
+
import { type TaskSelection } from '../../tasks-runner/run-command';
|
|
3
4
|
export interface GraphError {
|
|
4
5
|
message: string;
|
|
5
6
|
stack: string;
|
|
@@ -49,7 +50,37 @@ export declare function generateGraph(args: {
|
|
|
49
50
|
focus?: string;
|
|
50
51
|
exclude?: string[];
|
|
51
52
|
affected?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* What the command would run for `targets`, or how to build it. A builder
|
|
55
|
+
* is only called where an output needs it, so the live graph can still
|
|
56
|
+
* open, and show the error, when the task graph cannot be built.
|
|
57
|
+
*/
|
|
58
|
+
taskSelection?: TaskSelection | (() => TaskSelection);
|
|
59
|
+
/** The `-c` the tasks run with; their ids carry it. */
|
|
60
|
+
configuration?: string;
|
|
52
61
|
}, affectedProjects: string[]): Promise<void>;
|
|
62
|
+
export interface TaskSelectionForGraph {
|
|
63
|
+
targets: string[];
|
|
64
|
+
configuration?: string;
|
|
65
|
+
taskIds: string[];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The selection applies only to a page asking for its exact targets with its configuration
|
|
69
|
+
* or none (the ids carry it); anything else would prune to nothing, so it is shown whole.
|
|
70
|
+
*/
|
|
71
|
+
export declare function selectedFor(targets: string[], configuration: string | undefined, selection: TaskSelectionForGraph | undefined): {
|
|
72
|
+
configuration?: string;
|
|
73
|
+
taskIds?: string[];
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* The task graph to draw: the selection's own when it has one, otherwise built
|
|
77
|
+
* and, given ids, pruned to them. The live graph rebuilds per request, so it
|
|
78
|
+
* passes only ids.
|
|
79
|
+
*/
|
|
80
|
+
export declare function taskGraphForSelection(build: () => TaskGraph, selection?: {
|
|
81
|
+
taskGraph?: TaskGraph;
|
|
82
|
+
taskIds?: string[];
|
|
83
|
+
}): TaskGraph;
|
|
53
84
|
export declare function getExpandedTaskInputs(depGraphClientResponse: ProjectGraphClientResponse, expandedTaskInputsCache: Map<string, Record<string, string[]>>, taskId: string): Promise<Record<string, string[]>>;
|
|
54
85
|
/**
|
|
55
86
|
* The data type that `nx graph --file graph.json` or `nx build --graph graph.json` contains
|