@depup/nx 22.6.4-depup.2 → 23.1.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 +65 -27
- package/changes.json +205 -53
- package/dist/bin/init-local.d.ts +8 -0
- package/dist/bin/init-local.js +188 -0
- package/dist/bin/nx-cloud.d.ts +3 -0
- package/dist/bin/nx.d.ts +3 -0
- package/dist/bin/nx.js +339 -0
- package/dist/bin/post-install.d.ts +1 -0
- package/dist/bin/run-executor.d.ts +1 -0
- package/dist/plugins/package-json.d.ts +4 -0
- package/dist/plugins/package-json.js +40 -0
- package/dist/release/changelog-renderer/index.d.ts +110 -0
- package/dist/release/changelog-renderer/index.js +382 -0
- package/dist/release/index.d.ts +4 -0
- package/dist/src/adapter/angular-json.d.ts +10 -0
- package/dist/src/adapter/angular-json.js +129 -0
- package/dist/src/adapter/compat.d.ts +2 -0
- package/dist/src/adapter/compat.js +154 -0
- package/dist/src/adapter/ngcli-adapter.d.ts +105 -0
- package/dist/src/adapter/ngcli-adapter.js +1024 -0
- package/dist/src/adapter/rxjs-for-await.d.ts +109 -0
- package/dist/src/ai/clone-ai-config-repo.d.ts +11 -0
- package/dist/src/ai/clone-ai-config-repo.js +155 -0
- package/dist/src/ai/constants.d.ts +31 -0
- package/dist/src/ai/constants.js +76 -0
- package/dist/src/ai/detect-ai-agent.d.ts +2 -0
- package/dist/src/ai/set-up-ai-agents/get-agent-rules.d.ts +5 -0
- package/dist/src/ai/set-up-ai-agents/schema.json +34 -0
- package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.d.ts +10 -0
- package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.js +530 -0
- package/dist/src/ai/utils.d.ts +20 -0
- package/dist/src/ai/utils.js +217 -0
- package/dist/src/analytics/analytics.d.ts +10 -0
- package/dist/src/analytics/analytics.js +240 -0
- package/dist/src/analytics/index.d.ts +1 -0
- package/dist/src/command-line/add/add.d.ts +3 -0
- package/dist/src/command-line/add/add.js +126 -0
- package/dist/src/command-line/add/command-object.d.ts +8 -0
- package/dist/src/command-line/add/command-object.js +28 -0
- package/dist/src/command-line/add/completion.d.ts +1 -0
- package/dist/src/command-line/add/completion.js +15 -0
- package/dist/src/command-line/affected/affected.d.ts +10 -0
- package/dist/src/command-line/affected/command-object.d.ts +6 -0
- package/dist/src/command-line/affected/command-object.js +83 -0
- package/dist/src/command-line/affected/completion.d.ts +1 -0
- package/dist/src/command-line/affected/completion.js +15 -0
- package/dist/src/command-line/ai/ai-output.d.ts +46 -0
- package/dist/src/command-line/completion/argv-layout.d.ts +6 -0
- package/dist/src/command-line/completion/argv-layout.js +19 -0
- package/dist/src/command-line/completion/command-completions.d.ts +19 -0
- package/dist/src/command-line/completion/command-completions.js +120 -0
- package/dist/src/command-line/completion/command-handlers.d.ts +30 -0
- package/dist/src/command-line/completion/command-handlers.js +69 -0
- package/dist/src/command-line/completion/command-object.d.ts +10 -0
- package/dist/src/command-line/completion/command-object.js +107 -0
- package/dist/src/command-line/completion/completion-providers.d.ts +21 -0
- package/dist/src/command-line/completion/completion-providers.js +194 -0
- package/dist/src/command-line/completion/infix-targets.d.ts +1 -0
- package/dist/src/command-line/completion/infix-targets.js +48 -0
- package/dist/src/command-line/completion/metadata.d.ts +22 -0
- package/dist/src/command-line/completion/metadata.js +71 -0
- package/dist/src/command-line/completion/registrations.d.ts +9 -0
- package/dist/src/command-line/completion/registrations.js +16 -0
- package/dist/src/command-line/completion/scripts/bash.sh +51 -0
- package/dist/src/command-line/completion/scripts/fish.fish +47 -0
- package/dist/src/command-line/completion/scripts/powershell.ps1 +52 -0
- package/dist/src/command-line/completion/scripts/zsh.zsh +69 -0
- package/dist/src/command-line/completion/scripts.d.ts +18 -0
- package/dist/src/command-line/completion/scripts.js +140 -0
- package/dist/src/command-line/completion/trigger.d.ts +3 -0
- package/dist/src/command-line/completion/trigger.js +21 -0
- package/dist/src/command-line/completion/value-completions.d.ts +3 -0
- package/dist/src/command-line/completion/value-completions.js +21 -0
- package/dist/src/command-line/configure-ai-agents/command-object.d.ts +8 -0
- package/dist/src/command-line/configure-ai-agents/command-object.js +59 -0
- package/dist/src/command-line/configure-ai-agents/configure-ai-agents.d.ts +3 -0
- package/dist/src/command-line/configure-ai-agents/configure-ai-agents.js +425 -0
- package/dist/src/command-line/daemon/command-object.d.ts +3 -0
- package/dist/src/command-line/daemon/command-object.js +29 -0
- package/dist/src/command-line/daemon/daemon.d.ts +2 -0
- package/dist/src/command-line/daemon/daemon.js +31 -0
- package/dist/src/command-line/deprecated/command-objects.d.ts +9 -0
- package/dist/src/command-line/examples.d.ts +12 -0
- package/dist/src/command-line/examples.js +403 -0
- package/dist/src/command-line/exec/command-object.d.ts +2 -0
- package/dist/src/command-line/exec/command-object.js +20 -0
- package/dist/src/command-line/exec/exec.d.ts +1 -0
- package/dist/src/command-line/exec/exec.js +143 -0
- package/dist/src/command-line/format/command-object.d.ts +3 -0
- package/dist/src/command-line/format/command-object.js +58 -0
- package/dist/src/command-line/format/format.d.ts +2 -0
- package/dist/src/command-line/format/format.js +233 -0
- package/dist/src/command-line/generate/command-object.d.ts +2 -0
- package/dist/src/command-line/generate/command-object.js +67 -0
- package/dist/src/command-line/generate/completion.d.ts +1 -0
- package/dist/src/command-line/generate/completion.js +9 -0
- package/dist/src/command-line/generate/generate.d.ts +21 -0
- package/dist/src/command-line/generate/generate.js +281 -0
- package/dist/src/command-line/generate/generator-utils.d.ts +18 -0
- package/dist/src/command-line/graph/command-object.d.ts +25 -0
- package/dist/src/command-line/graph/command-object.js +76 -0
- package/dist/src/command-line/graph/completion.d.ts +1 -0
- package/dist/src/command-line/graph/completion.js +13 -0
- package/dist/src/command-line/graph/graph.d.ts +69 -0
- package/dist/src/command-line/graph/graph.js +978 -0
- package/dist/src/command-line/import/command-object.d.ts +2 -0
- package/dist/src/command-line/import/command-object.js +63 -0
- package/dist/src/command-line/import/import.d.ts +26 -0
- package/dist/src/command-line/import/import.js +600 -0
- package/dist/src/command-line/import/utils/ai-output.d.ts +93 -0
- package/dist/src/command-line/import/utils/merge-remote-source.d.ts +2 -0
- package/dist/src/command-line/import/utils/prepare-source-repo.d.ts +2 -0
- package/dist/src/command-line/index.d.ts +22 -0
- package/dist/src/command-line/init/ai-agent-prompts.d.ts +2 -0
- package/dist/src/command-line/init/ai-agent-prompts.js +35 -0
- package/dist/src/command-line/init/command-object.d.ts +2 -0
- package/dist/src/command-line/init/command-object.js +108 -0
- package/dist/src/command-line/init/configure-plugins.d.ts +34 -0
- package/dist/src/command-line/init/configure-plugins.js +210 -0
- package/dist/src/command-line/init/implementation/add-nx-to-monorepo.d.ts +6 -0
- package/dist/src/command-line/init/implementation/add-nx-to-monorepo.js +140 -0
- package/dist/src/command-line/init/implementation/add-nx-to-nest.d.ts +5 -0
- package/dist/src/command-line/init/implementation/add-nx-to-nest.js +356 -0
- package/dist/src/command-line/init/implementation/add-nx-to-npm-repo.d.ts +6 -0
- package/dist/src/command-line/init/implementation/add-nx-to-npm-repo.js +82 -0
- package/dist/src/command-line/init/implementation/add-nx-to-turborepo.d.ts +4 -0
- package/dist/src/command-line/init/implementation/add-nx-to-turborepo.js +50 -0
- package/dist/src/command-line/init/implementation/angular/index.d.ts +2 -0
- package/dist/src/command-line/init/implementation/angular/index.js +133 -0
- package/dist/src/command-line/init/implementation/angular/integrated-workspace.d.ts +1 -0
- package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.d.ts +2 -0
- package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.js +150 -0
- package/dist/src/command-line/init/implementation/angular/standalone-workspace.d.ts +1 -0
- package/dist/src/command-line/init/implementation/angular/standalone-workspace.js +198 -0
- package/dist/src/command-line/init/implementation/angular/types.d.ts +20 -0
- package/dist/src/command-line/init/implementation/check-compatible-with-plugins.d.ts +15 -0
- package/dist/src/command-line/init/implementation/deduce-default-base.d.ts +1 -0
- package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +11 -0
- package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +143 -0
- package/dist/src/command-line/init/implementation/dot-nx/nxw.d.ts +1 -0
- package/dist/src/command-line/init/implementation/dot-nx/nxw.js +123 -0
- package/dist/src/command-line/init/implementation/utils.d.ts +35 -0
- package/dist/src/command-line/init/implementation/utils.js +403 -0
- package/dist/src/command-line/init/init-v1.d.ts +8 -0
- package/dist/src/command-line/init/init-v2.d.ts +23 -0
- package/dist/src/command-line/init/init-v2.js +612 -0
- package/dist/src/command-line/init/utils/ai-output.d.ts +72 -0
- package/dist/src/command-line/list/command-object.d.ts +2 -0
- package/dist/src/command-line/list/command-object.js +21 -0
- package/dist/src/command-line/list/list.d.ts +15 -0
- package/dist/src/command-line/mcp/command-object.d.ts +2 -0
- package/dist/src/command-line/mcp/command-object.js +29 -0
- package/dist/src/command-line/mcp/mcp.d.ts +2 -0
- package/dist/src/command-line/migrate/agentic/capture-generator-output.d.ts +22 -0
- package/dist/src/command-line/migrate/agentic/capture-generator-output.js +100 -0
- package/dist/src/command-line/migrate/agentic/cli-args.d.ts +12 -0
- package/dist/src/command-line/migrate/agentic/cli-args.js +38 -0
- package/dist/src/command-line/migrate/agentic/definitions.d.ts +6 -0
- package/dist/src/command-line/migrate/agentic/definitions.js +121 -0
- package/dist/src/command-line/migrate/agentic/detect-installed.d.ts +10 -0
- package/dist/src/command-line/migrate/agentic/detect-installed.js +68 -0
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.d.ts +46 -0
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.js +87 -0
- package/dist/src/command-line/migrate/agentic/handoff.d.ts +69 -0
- package/dist/src/command-line/migrate/agentic/handoff.js +190 -0
- package/dist/src/command-line/migrate/agentic/inception.d.ts +9 -0
- package/dist/src/command-line/migrate/agentic/inception.js +15 -0
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.d.ts +22 -0
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.js +50 -0
- package/dist/src/command-line/migrate/agentic/prompts/generic-validation.d.ts +56 -0
- package/dist/src/command-line/migrate/agentic/prompts/generic-validation.js +66 -0
- package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.d.ts +49 -0
- package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.js +53 -0
- package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.d.ts +26 -0
- package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.js +27 -0
- package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.d.ts +19 -0
- package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.js +145 -0
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.d.ts +46 -0
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.js +90 -0
- package/dist/src/command-line/migrate/agentic/run-step.d.ts +58 -0
- package/dist/src/command-line/migrate/agentic/run-step.js +123 -0
- package/dist/src/command-line/migrate/agentic/runner.d.ts +33 -0
- package/dist/src/command-line/migrate/agentic/runner.js +444 -0
- package/dist/src/command-line/migrate/agentic/select.d.ts +16 -0
- package/dist/src/command-line/migrate/agentic/select.js +253 -0
- package/dist/src/command-line/migrate/agentic/types.d.ts +102 -0
- package/dist/src/command-line/migrate/command-object.d.ts +47 -0
- package/dist/src/command-line/migrate/command-object.js +134 -0
- package/dist/src/command-line/migrate/migrate-analytics.d.ts +71 -0
- package/dist/src/command-line/migrate/migrate-analytics.js +253 -0
- package/dist/src/command-line/migrate/migrate-commits.d.ts +50 -0
- package/dist/src/command-line/migrate/migrate-commits.js +102 -0
- package/dist/src/command-line/migrate/migrate-config.d.ts +28 -0
- package/dist/src/command-line/migrate/migrate-config.js +104 -0
- package/dist/src/command-line/migrate/migrate-output.d.ts +180 -0
- package/dist/src/command-line/migrate/migrate-output.js +258 -0
- package/dist/src/command-line/migrate/migrate-ui-api.d.ts +88 -0
- package/dist/src/command-line/migrate/migrate-ui-api.js +423 -0
- package/dist/src/command-line/migrate/migrate.d.ts +313 -0
- package/dist/src/command-line/migrate/migrate.js +2760 -0
- package/dist/src/command-line/migrate/migration-shape.d.ts +8 -0
- package/dist/src/command-line/migrate/migration-shape.js +13 -0
- package/dist/src/command-line/migrate/multi-major.d.ts +37 -0
- package/dist/src/command-line/migrate/multi-major.js +218 -0
- package/dist/src/command-line/migrate/prompt-files.d.ts +31 -0
- package/dist/src/command-line/migrate/prompt-files.js +141 -0
- package/dist/src/command-line/migrate/resolve-package-version.d.ts +24 -0
- package/dist/src/command-line/migrate/resolve-package-version.js +249 -0
- package/dist/src/command-line/migrate/run-migration-process.js +109 -0
- package/dist/src/command-line/migrate/safe-prompt.d.ts +33 -0
- package/dist/src/command-line/migrate/safe-prompt.js +58 -0
- package/dist/src/command-line/migrate/update-filters.d.ts +11 -0
- package/dist/src/command-line/migrate/update-filters.js +45 -0
- package/dist/src/command-line/migrate/version-utils.d.ts +5 -0
- package/dist/src/command-line/migrate/version-utils.js +52 -0
- package/dist/src/command-line/new/command-object.d.ts +2 -0
- package/dist/src/command-line/new/command-object.js +26 -0
- package/dist/src/command-line/new/new.d.ts +3 -0
- package/dist/src/command-line/nx-cloud/apply-locally/apply-locally.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/apply-locally/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/apply-locally/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/complete-run/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/complete-run/command-object.js +17 -0
- package/dist/src/command-line/nx-cloud/complete-run/stop-all-agents.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/connect/command-object.d.ts +3 -0
- package/dist/src/command-line/nx-cloud/connect/command-object.js +28 -0
- package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.d.ts +13 -0
- package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +270 -0
- package/dist/src/command-line/nx-cloud/connect/view-logs.d.ts +1 -0
- package/dist/src/command-line/nx-cloud/connect/view-logs.js +53 -0
- package/dist/src/command-line/nx-cloud/download-cloud-client/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/download-cloud-client/command-object.js +13 -0
- package/dist/src/command-line/nx-cloud/download-cloud-client/download-cloud-client.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/fix-ci/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/fix-ci/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/fix-ci/fix-ci.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/login/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/login/command-object.js +20 -0
- package/dist/src/command-line/nx-cloud/login/login.d.ts +5 -0
- package/dist/src/command-line/nx-cloud/logout/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/logout/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/logout/logout.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/record/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/record/command-object.js +19 -0
- package/dist/src/command-line/nx-cloud/record/record.d.ts +5 -0
- package/dist/src/command-line/nx-cloud/start-agent/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/start-agent/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/start-agent/start-agent.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/start-ci-run/command-object.d.ts +2 -0
- package/dist/src/command-line/nx-cloud/start-ci-run/command-object.js +16 -0
- package/dist/src/command-line/nx-cloud/start-ci-run/start-ci-run.d.ts +4 -0
- package/dist/src/command-line/nx-cloud/utils.d.ts +2 -0
- package/dist/src/command-line/nx-commands.d.ts +10 -0
- package/dist/src/command-line/nx-commands.js +181 -0
- package/dist/src/command-line/register/command-object.d.ts +6 -0
- package/dist/src/command-line/register/command-object.js +27 -0
- package/dist/src/command-line/register/register.d.ts +2 -0
- package/dist/src/command-line/release/changelog/commit-utils.d.ts +13 -0
- package/dist/src/command-line/release/changelog/version-plan-filtering.d.ts +43 -0
- package/dist/src/command-line/release/changelog/version-plan-filtering.js +156 -0
- package/dist/src/command-line/release/changelog/version-plan-utils.d.ts +31 -0
- package/dist/src/command-line/release/changelog.d.ts +28 -0
- package/dist/src/command-line/release/changelog.js +911 -0
- package/dist/src/command-line/release/command-object.d.ts +96 -0
- package/dist/src/command-line/release/command-object.js +342 -0
- package/dist/src/command-line/release/config/config.d.ts +70 -0
- package/dist/src/command-line/release/config/config.js +1204 -0
- package/dist/src/command-line/release/config/conventional-commits.d.ts +2 -0
- package/dist/src/command-line/release/config/deep-merge-json.d.ts +1 -0
- package/dist/src/command-line/release/config/filter-release-groups.d.ts +23 -0
- package/dist/src/command-line/release/config/use-legacy-versioning.d.ts +2 -0
- package/dist/src/command-line/release/config/use-legacy-versioning.js +8 -0
- package/dist/src/command-line/release/config/version-plans.d.ts +42 -0
- package/dist/src/command-line/release/config/version-plans.js +278 -0
- package/dist/src/command-line/release/index.d.ts +49 -0
- package/dist/src/command-line/release/plan-check.d.ts +4 -0
- package/dist/src/command-line/release/plan.d.ts +4 -0
- package/dist/src/command-line/release/publish.d.ts +9 -0
- package/dist/src/command-line/release/release.d.ts +5 -0
- package/dist/src/command-line/release/release.js +310 -0
- package/dist/src/command-line/release/utils/diff.d.ts +21 -0
- package/dist/src/command-line/release/utils/diff.js +168 -0
- package/dist/src/command-line/release/utils/exec-command.d.ts +1 -0
- package/dist/src/command-line/release/utils/generate-version-plan-content.d.ts +1 -0
- package/dist/src/command-line/release/utils/get-touched-projects-for-group.d.ts +7 -0
- package/dist/src/command-line/release/utils/git.d.ts +126 -0
- package/dist/src/command-line/release/utils/git.js +593 -0
- package/dist/src/command-line/release/utils/launch-editor.d.ts +1 -0
- package/dist/src/command-line/release/utils/markdown.d.ts +6 -0
- package/dist/src/command-line/release/utils/print-changes.d.ts +6 -0
- package/dist/src/command-line/release/utils/print-changes.js +63 -0
- package/dist/src/command-line/release/utils/print-config.d.ts +7 -0
- package/dist/src/command-line/release/utils/release-graph.d.ts +230 -0
- package/dist/src/command-line/release/utils/release-graph.js +709 -0
- package/dist/src/command-line/release/utils/remote-release-clients/extract-repo-slug.d.ts +9 -0
- package/dist/src/command-line/release/utils/remote-release-clients/github.d.ts +58 -0
- package/dist/src/command-line/release/utils/remote-release-clients/github.js +342 -0
- package/dist/src/command-line/release/utils/remote-release-clients/gitlab.d.ts +62 -0
- package/dist/src/command-line/release/utils/remote-release-clients/gitlab.js +268 -0
- package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.d.ts +111 -0
- package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.js +138 -0
- package/dist/src/command-line/release/utils/repository-git-tags.d.ts +25 -0
- package/dist/src/command-line/release/utils/repository-git-tags.js +125 -0
- package/dist/src/command-line/release/utils/resolve-changelog-renderer.d.ts +2 -0
- package/dist/src/command-line/release/utils/resolve-changelog-renderer.js +22 -0
- package/dist/src/command-line/release/utils/resolve-nx-json-error-message.d.ts +1 -0
- package/dist/src/command-line/release/utils/resolve-nx-json-error-message.js +53 -0
- package/dist/src/command-line/release/utils/resolve-semver-specifier.d.ts +7 -0
- package/dist/src/command-line/release/utils/resolve-semver-specifier.js +63 -0
- package/dist/src/command-line/release/utils/semver.d.ts +26 -0
- package/dist/src/command-line/release/utils/shared-legacy.d.ts +25 -0
- package/dist/src/command-line/release/utils/shared.d.ts +64 -0
- package/dist/src/command-line/release/utils/shared.js +379 -0
- package/dist/src/command-line/release/utils/version-plan-utils.d.ts +40 -0
- package/dist/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts +8 -0
- package/dist/src/command-line/release/version/derive-specifier-from-conventional-commits.js +61 -0
- package/dist/src/command-line/release/version/deriver-specifier-from-version-plans.d.ts +8 -0
- package/dist/src/command-line/release/version/project-logger.d.ts +8 -0
- package/dist/src/command-line/release/version/project-logger.js +47 -0
- package/dist/src/command-line/release/version/release-group-processor.d.ts +115 -0
- package/dist/src/command-line/release/version/release-group-processor.js +632 -0
- package/dist/src/command-line/release/version/resolve-current-version.d.ts +32 -0
- package/dist/src/command-line/release/version/resolve-current-version.js +243 -0
- package/dist/src/command-line/release/version/topological-sort.d.ts +9 -0
- package/dist/src/command-line/release/version/version-actions.d.ts +199 -0
- package/dist/src/command-line/release/version/version-actions.js +247 -0
- package/dist/src/command-line/release/version.d.ts +28 -0
- package/dist/src/command-line/release/version.js +378 -0
- package/dist/src/command-line/repair/command-object.d.ts +2 -0
- package/dist/src/command-line/repair/command-object.js +21 -0
- package/dist/src/command-line/repair/repair.d.ts +3 -0
- package/dist/src/command-line/repair/repair.js +41 -0
- package/dist/src/command-line/report/command-object.d.ts +2 -0
- package/dist/src/command-line/report/command-object.js +12 -0
- package/dist/src/command-line/report/report.d.ts +71 -0
- package/dist/src/command-line/report/report.js +405 -0
- package/dist/src/command-line/reset/command-object.d.ts +8 -0
- package/dist/src/command-line/reset/command-object.js +27 -0
- package/dist/src/command-line/reset/reset.d.ts +2 -0
- package/dist/src/command-line/reset/reset.js +178 -0
- package/dist/src/command-line/run/command-object.d.ts +6 -0
- package/dist/src/command-line/run/command-object.js +43 -0
- package/dist/src/command-line/run/completion.d.ts +1 -0
- package/dist/src/command-line/run/completion.js +7 -0
- package/dist/src/command-line/run/executor-utils.d.ts +12 -0
- package/dist/src/command-line/run/run-one.d.ts +17 -0
- package/dist/src/command-line/run/run-one.js +154 -0
- package/dist/src/command-line/run/run.d.ts +51 -0
- package/dist/src/command-line/run/run.js +179 -0
- package/dist/src/command-line/run-many/command-object.d.ts +2 -0
- package/dist/src/command-line/run-many/command-object.js +18 -0
- package/dist/src/command-line/run-many/completion.d.ts +1 -0
- package/dist/src/command-line/run-many/completion.js +13 -0
- package/dist/src/command-line/run-many/run-many.d.ts +10 -0
- package/dist/src/command-line/show/command-object.d.ts +40 -0
- package/dist/src/command-line/show/command-object.js +237 -0
- package/dist/src/command-line/show/completion.d.ts +1 -0
- package/dist/src/command-line/show/completion.js +27 -0
- package/dist/src/command-line/show/project.d.ts +2 -0
- package/dist/src/command-line/show/projects.d.ts +2 -0
- package/dist/src/command-line/show/show-target/index.d.ts +3 -0
- package/dist/src/command-line/show/show-target/index.js +9 -0
- package/dist/src/command-line/show/show-target/info.d.ts +28 -0
- package/dist/src/command-line/show/show-target/info.js +380 -0
- package/dist/src/command-line/show/show-target/inputs.d.ts +2 -0
- package/dist/src/command-line/show/show-target/inputs.js +186 -0
- package/dist/src/command-line/show/show-target/outputs.d.ts +2 -0
- package/dist/src/command-line/show/show-target/outputs.js +195 -0
- package/dist/src/command-line/show/show-target/utils.d.ts +26 -0
- package/dist/src/command-line/show/show-target/utils.js +185 -0
- package/dist/src/command-line/sync/command-object.d.ts +6 -0
- package/dist/src/command-line/sync/command-object.js +21 -0
- package/dist/src/command-line/sync/sync.d.ts +6 -0
- package/dist/src/command-line/sync/sync.js +120 -0
- package/dist/src/command-line/watch/command-object.d.ts +2 -0
- package/dist/src/command-line/watch/command-object.js +91 -0
- package/dist/src/command-line/watch/completion.d.ts +1 -0
- package/dist/src/command-line/watch/completion.js +10 -0
- package/dist/src/command-line/watch/watch.d.ts +31 -0
- package/dist/src/command-line/watch/watch.js +198 -0
- package/dist/src/command-line/yargs-utils/arguments-of.d.ts +11 -0
- package/dist/src/command-line/yargs-utils/documentation.d.ts +2 -0
- package/dist/src/command-line/yargs-utils/documentation.js +12 -0
- package/dist/src/command-line/yargs-utils/shared-options.d.ts +91 -0
- package/dist/src/command-line/yargs-utils/shared-options.js +395 -0
- package/dist/src/commands-runner/command-graph.d.ts +13 -0
- package/dist/src/commands-runner/create-command-graph.d.ts +4 -0
- package/dist/src/commands-runner/get-command-projects.d.ts +3 -0
- package/dist/src/config/calculate-default-project-name.d.ts +4 -0
- package/dist/src/config/configuration.d.ts +8 -0
- package/dist/src/config/misc-interfaces.d.ts +254 -0
- package/dist/src/config/nx-json.d.ts +961 -0
- package/dist/src/config/project-graph.d.ts +137 -0
- package/dist/src/config/schema-utils.d.ts +37 -0
- package/dist/src/config/schema-utils.js +199 -0
- package/dist/src/config/task-graph.d.ts +6 -0
- package/dist/src/config/to-project-name.d.ts +5 -0
- package/dist/src/config/workspace-json-project-json.d.ts +273 -0
- package/dist/src/core/graph/main.js +1 -0
- package/dist/src/core/graph/styles.css +2 -0
- package/dist/src/core/graph/styles.js +1 -0
- package/dist/src/daemon/cache.d.ts +10 -0
- package/dist/src/daemon/client/client.d.ts +117 -0
- package/dist/src/daemon/client/client.js +1048 -0
- package/dist/src/daemon/client/daemon-environment.d.ts +12 -0
- package/dist/src/daemon/client/daemon-environment.js +170 -0
- package/dist/src/daemon/client/daemon-socket-messenger.d.ts +12 -0
- package/dist/src/daemon/client/daemon-socket-messenger.js +54 -0
- package/dist/src/daemon/is-nx-version-mismatch.d.ts +1 -0
- package/dist/src/daemon/is-nx-version-mismatch.js +8 -0
- package/dist/src/daemon/is-on-daemon.d.ts +1 -0
- package/dist/src/daemon/is-v8-serializer-enabled.d.ts +5 -0
- package/dist/src/daemon/logger.d.ts +39 -0
- package/dist/src/daemon/logger.js +80 -0
- package/dist/src/daemon/message-types/configure-ai-agents.d.ts +20 -0
- package/dist/src/daemon/message-types/daemon-message.d.ts +6 -0
- package/dist/src/daemon/message-types/daemon-message.js +6 -0
- package/dist/src/daemon/message-types/flush-sync-generator-changes-to-disk.d.ts +6 -0
- package/dist/src/daemon/message-types/force-shutdown.d.ts +5 -0
- package/dist/src/daemon/message-types/get-context-file-data.d.ts +5 -0
- package/dist/src/daemon/message-types/get-files-in-directory.d.ts +6 -0
- package/dist/src/daemon/message-types/get-nx-workspace-files.d.ts +6 -0
- package/dist/src/daemon/message-types/get-registered-sync-generators.d.ts +5 -0
- package/dist/src/daemon/message-types/get-sync-generator-changes.d.ts +6 -0
- package/dist/src/daemon/message-types/glob.d.ts +14 -0
- package/dist/src/daemon/message-types/hash-glob.d.ts +13 -0
- package/dist/src/daemon/message-types/nx-console.d.ts +17 -0
- package/dist/src/daemon/message-types/register-project-graph-listener.d.ts +5 -0
- package/dist/src/daemon/message-types/run-tasks-execution-hooks.d.ts +13 -0
- package/dist/src/daemon/message-types/streaming-messages.d.ts +14 -0
- package/dist/src/daemon/message-types/streaming-messages.js +19 -0
- package/dist/src/daemon/message-types/task-history.d.ts +19 -0
- package/dist/src/daemon/message-types/update-workspace-context.d.ts +8 -0
- package/dist/src/daemon/server/client-socket-context.d.ts +23 -0
- package/dist/src/daemon/server/client-socket-context.js +89 -0
- package/dist/src/daemon/server/file-watching/changed-projects.d.ts +10 -0
- package/dist/src/daemon/server/file-watching/changed-projects.js +53 -0
- package/dist/src/daemon/server/file-watching/file-change-events.d.ts +7 -0
- package/dist/src/daemon/server/file-watching/file-watcher-sockets.d.ts +12 -0
- package/dist/src/daemon/server/file-watching/file-watcher-sockets.js +66 -0
- package/dist/src/daemon/server/file-watching/route-workspace-changes.d.ts +9 -0
- package/dist/src/daemon/server/file-watching/route-workspace-changes.js +76 -0
- package/dist/src/daemon/server/handle-configure-ai-agents.d.ts +3 -0
- package/dist/src/daemon/server/handle-configure-ai-agents.js +101 -0
- package/dist/src/daemon/server/handle-context-file-data.d.ts +2 -0
- package/dist/src/daemon/server/handle-flush-sync-generator-changes-to-disk.d.ts +2 -0
- package/dist/src/daemon/server/handle-force-shutdown.d.ts +5 -0
- package/dist/src/daemon/server/handle-get-files-in-directory.d.ts +2 -0
- package/dist/src/daemon/server/handle-get-registered-sync-generators.d.ts +2 -0
- package/dist/src/daemon/server/handle-get-sync-generator-changes.d.ts +2 -0
- package/dist/src/daemon/server/handle-glob.d.ts +3 -0
- package/dist/src/daemon/server/handle-hash-glob.d.ts +3 -0
- package/dist/src/daemon/server/handle-hash-tasks.d.ts +12 -0
- package/dist/src/daemon/server/handle-hash-tasks.js +28 -0
- package/dist/src/daemon/server/handle-nx-console.d.ts +3 -0
- package/dist/src/daemon/server/handle-nx-workspace-files.d.ts +2 -0
- package/dist/src/daemon/server/handle-outputs-tracking.d.ts +15 -0
- package/dist/src/daemon/server/handle-outputs-tracking.js +35 -0
- package/dist/src/daemon/server/handle-process-in-background.d.ts +6 -0
- package/dist/src/daemon/server/handle-request-project-graph.d.ts +3 -0
- package/dist/src/daemon/server/handle-request-project-graph.js +36 -0
- package/dist/src/daemon/server/handle-request-shutdown.d.ts +5 -0
- package/dist/src/daemon/server/handle-task-history.d.ts +13 -0
- package/dist/src/daemon/server/handle-tasks-execution-hooks.d.ts +19 -0
- package/dist/src/daemon/server/handle-update-workspace-context.d.ts +2 -0
- package/dist/src/daemon/server/handle-update-workspace-context.js +11 -0
- package/dist/src/daemon/server/latest-nx.d.ts +10 -0
- package/dist/src/daemon/server/latest-nx.js +53 -0
- package/dist/src/daemon/server/nx-console-operations.d.ts +26 -0
- package/dist/src/daemon/server/nx-console-operations.js +97 -0
- package/dist/src/daemon/server/outputs-tracking.d.ts +23 -0
- package/dist/src/daemon/server/outputs-tracking.js +120 -0
- package/dist/src/daemon/server/project-graph-incremental-recomputation.d.ts +26 -0
- package/dist/src/daemon/server/project-graph-incremental-recomputation.js +507 -0
- package/dist/src/daemon/server/project-graph-listener-sockets.d.ts +7 -0
- package/dist/src/daemon/server/server.d.ts +10 -0
- package/dist/src/daemon/server/server.js +474 -0
- package/dist/src/daemon/server/shutdown-utils.d.ts +18 -0
- package/dist/src/daemon/server/shutdown-utils.js +152 -0
- package/dist/src/daemon/server/start.d.ts +1 -0
- package/dist/src/daemon/server/start.js +20 -0
- package/dist/src/daemon/server/sync-generators.d.ts +14 -0
- package/dist/src/daemon/server/watcher.d.ts +18 -0
- package/dist/src/daemon/server/watcher.js +126 -0
- package/dist/src/daemon/socket-utils.d.ts +23 -0
- package/dist/src/daemon/tmp-dir.d.ts +12 -0
- package/dist/src/devkit-exports.d.ts +139 -0
- package/dist/src/devkit-exports.js +143 -0
- package/dist/src/devkit-internals.d.ts +40 -0
- package/dist/src/devkit-internals.js +92 -0
- package/dist/src/devkit-testing-exports.d.ts +2 -0
- package/dist/src/executors/noop/noop.impl.d.ts +3 -0
- package/dist/src/executors/noop/schema.json +10 -0
- package/dist/src/executors/run-commands/run-commands.impl.d.ts +59 -0
- package/dist/src/executors/run-commands/run-commands.impl.js +301 -0
- package/dist/src/executors/run-commands/running-tasks.d.ts +52 -0
- package/dist/src/executors/run-commands/running-tasks.js +586 -0
- package/dist/src/executors/run-commands/schema.json +198 -0
- package/dist/src/executors/run-script/run-script.impl.d.ts +8 -0
- package/dist/src/executors/run-script/run-script.impl.js +86 -0
- package/dist/src/executors/run-script/schema.json +28 -0
- package/dist/src/executors/utils/convert-nx-executor.d.ts +10 -0
- package/dist/src/executors/utils/convert-nx-executor.js +83 -0
- package/dist/src/generators/internal-utils/format-changed-files-with-prettier-if-available.d.ts +19 -0
- package/dist/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +81 -0
- package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +11 -0
- package/dist/src/generators/testing-utils/create-tree.d.ts +5 -0
- package/dist/src/generators/tree.d.ts +125 -0
- package/dist/src/generators/tree.js +310 -0
- package/dist/src/generators/utils/generate-files.d.ts +44 -0
- package/dist/src/generators/utils/generate-files.js +114 -0
- package/dist/src/generators/utils/glob.d.ts +22 -0
- package/dist/src/generators/utils/json.d.ts +28 -0
- package/dist/src/generators/utils/nx-json.d.ts +10 -0
- package/dist/src/generators/utils/project-configuration.d.ts +51 -0
- package/dist/src/generators/utils/project-configuration.js +299 -0
- package/dist/src/hasher/create-task-hasher.d.ts +4 -0
- package/dist/src/hasher/create-task-hasher.js +15 -0
- package/dist/src/hasher/file-hasher.d.ts +3 -0
- package/dist/src/hasher/hash-plan-inspector.d.ts +33 -0
- package/dist/src/hasher/hash-task.d.ts +17 -0
- package/dist/src/hasher/hash-task.js +191 -0
- package/dist/src/hasher/native-task-hasher-impl.d.ts +18 -0
- package/dist/src/hasher/native-task-hasher-impl.js +38 -0
- package/dist/src/hasher/task-hasher.d.ts +160 -0
- package/dist/src/hasher/task-hasher.js +301 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/migrations/update-15-0-0/prefix-outputs.d.ts +2 -0
- package/dist/src/migrations/update-15-0-0/prefix-outputs.js +54 -0
- package/dist/src/migrations/update-16-0-0/remove-nrwl-cli.d.ts +2 -0
- package/dist/src/migrations/update-16-0-0/update-depends-on-to-tokens.d.ts +2 -0
- package/dist/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +82 -0
- package/dist/src/migrations/update-16-0-0/update-nx-cloud-runner.d.ts +2 -0
- package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.d.ts +2 -0
- package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.js +50 -0
- package/dist/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.d.ts +12 -0
- package/dist/src/migrations/update-17-0-0/move-cache-directory.d.ts +2 -0
- package/dist/src/migrations/update-17-0-0/move-cache-directory.md +31 -0
- package/dist/src/migrations/update-17-0-0/rm-default-collection-npm-scope.d.ts +2 -0
- package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.d.ts +2 -0
- package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +126 -0
- package/dist/src/migrations/update-17-2-0/move-default-base.d.ts +5 -0
- package/dist/src/migrations/update-17-2-0/move-default-base.js +20 -0
- package/dist/src/migrations/update-17-3-0/nx-release-path.d.ts +3 -0
- package/dist/src/migrations/update-17-3-0/update-nxw.d.ts +2 -0
- package/dist/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.d.ts +2 -0
- package/dist/src/migrations/update-19-2-0/move-workspace-data-directory.d.ts +4 -0
- package/dist/src/migrations/update-19-2-4/set-project-name.d.ts +2 -0
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.d.ts +2 -0
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.md +27 -0
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.d.ts +2 -0
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.md +24 -0
- package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.d.ts +2 -0
- package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.md +49 -0
- package/dist/src/migrations/update-21-0-0/release-version-config-changes.d.ts +2 -0
- package/dist/src/migrations/update-21-0-0/release-version-config-changes.md +54 -0
- package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.d.ts +2 -0
- package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.md +28 -0
- package/dist/src/migrations/update-21-0-0/remove-legacy-cache.d.ts +2 -0
- package/dist/src/migrations/update-21-0-0/remove-legacy-cache.md +22 -0
- package/dist/src/migrations/update-22-0-0/consolidate-release-tag-config.d.ts +2 -0
- package/dist/src/migrations/update-22-0-0/release-version-config-changes.d.ts +2 -0
- package/dist/src/migrations/update-22-1-0/update-nx-wrapper.d.ts +2 -0
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.d.ts +2 -0
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.js +19 -0
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.md +11 -0
- package/dist/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.d.ts +2 -0
- package/dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.d.ts +2 -0
- package/dist/src/migrations/update-22-6-0/enable-analytics-prompt.d.ts +2 -0
- package/dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.d.ts +2 -0
- package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.d.ts +2 -0
- package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.js +16 -0
- package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.d.ts +9 -0
- package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.js +18 -0
- package/dist/src/migrations/utils/target-defaults.d.ts +28 -0
- package/dist/src/migrations/utils/target-defaults.js +46 -0
- package/dist/src/native/assert-supported-platform.d.ts +1 -0
- package/dist/src/native/index.d.ts +825 -0
- package/dist/src/native/native-bindings.js +639 -0
- package/dist/src/native/native-file-cache-location.d.ts +1 -0
- package/dist/src/native/nx.wasi-browser.js +131 -0
- package/dist/src/native/nx.wasi.cjs +161 -0
- 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 +3 -0
- package/dist/src/native/wasi-worker-browser.mjs +30 -0
- package/dist/src/nx-cloud/debug-logger.d.ts +1 -0
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts +14 -0
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +41 -0
- package/dist/src/nx-cloud/models/onboarding-status.d.ts +1 -0
- package/dist/src/nx-cloud/nx-cloud-tasks-runner-shell.d.ts +16 -0
- package/dist/src/nx-cloud/resolution-helpers.d.ts +1 -0
- package/dist/src/nx-cloud/update-manager.d.ts +23 -0
- package/dist/src/nx-cloud/update-manager.js +267 -0
- package/dist/src/nx-cloud/utilities/axios.d.ts +4 -0
- package/dist/src/nx-cloud/utilities/client.d.ts +10 -0
- package/dist/src/nx-cloud/utilities/environment.d.ts +3 -0
- package/dist/src/nx-cloud/utilities/environment.js +48 -0
- package/dist/src/nx-cloud/utilities/get-cloud-options.d.ts +5 -0
- package/dist/src/nx-cloud/utilities/is-workspace-claimed.d.ts +1 -0
- package/dist/src/nx-cloud/utilities/onboarding.d.ts +5 -0
- package/dist/src/nx-cloud/utilities/url-shorten.d.ts +5 -0
- package/dist/src/plugins/js/hasher/hasher.d.ts +5 -0
- package/dist/src/plugins/js/index.d.ts +4 -0
- package/dist/src/plugins/js/index.js +201 -0
- package/dist/src/plugins/js/lock-file/bun-parser.d.ts +14 -0
- package/dist/src/plugins/js/lock-file/bun-parser.js +959 -0
- package/dist/src/plugins/js/lock-file/lock-file.d.ts +43 -0
- package/dist/src/plugins/js/lock-file/lock-file.js +265 -0
- package/dist/src/plugins/js/lock-file/npm-parser.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/npm-parser.js +544 -0
- package/dist/src/plugins/js/lock-file/pnpm-parser.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/pnpm-parser.js +660 -0
- package/dist/src/plugins/js/lock-file/project-graph-pruning.d.ts +11 -0
- package/dist/src/plugins/js/lock-file/project-graph-pruning.js +210 -0
- package/dist/src/plugins/js/lock-file/utils/package-json.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/utils/package-json.js +38 -0
- package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.d.ts +20 -0
- package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.js +871 -0
- package/dist/src/plugins/js/lock-file/yarn-parser.d.ts +10 -0
- package/dist/src/plugins/js/lock-file/yarn-parser.js +509 -0
- package/dist/src/plugins/js/package-json/create-package-json.d.ts +29 -0
- package/dist/src/plugins/js/package-json/create-package-json.js +312 -0
- package/dist/src/plugins/js/project-graph/affected/lock-file-changes.d.ts +3 -0
- package/dist/src/plugins/js/project-graph/affected/lock-file-changes.js +150 -0
- package/dist/src/plugins/js/project-graph/affected/npm-packages.d.ts +4 -0
- package/dist/src/plugins/js/project-graph/affected/touched-projects.d.ts +2 -0
- package/dist/src/plugins/js/project-graph/affected/tsconfig-json-changes.d.ts +4 -0
- package/dist/src/plugins/js/project-graph/affected/tsconfig-json-changes.js +63 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/build-dependencies.d.ts +6 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts +4 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +88 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.d.ts +4 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts +81 -0
- package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +454 -0
- package/dist/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.d.ts +2 -0
- package/dist/src/plugins/js/utils/config.d.ts +2 -0
- package/dist/src/plugins/js/utils/get-workspace-packages-from-graph.d.ts +2 -0
- package/dist/src/plugins/js/utils/packages.d.ts +8 -0
- package/dist/src/plugins/js/utils/packages.js +91 -0
- package/dist/src/plugins/js/utils/register.d.ts +321 -0
- package/dist/src/plugins/js/utils/register.js +1155 -0
- package/dist/src/plugins/js/utils/resolve-relative-to-dir.d.ts +5 -0
- package/dist/src/plugins/js/utils/typescript.d.ts +23 -0
- package/dist/src/plugins/js/utils/typescript.js +142 -0
- package/dist/src/plugins/js/versions.d.ts +1 -0
- package/dist/src/plugins/js/versions.js +4 -0
- package/dist/src/plugins/package-json/create-nodes.d.ts +28 -0
- package/dist/src/plugins/package-json/create-nodes.js +243 -0
- package/dist/src/plugins/package-json/index.d.ts +2 -0
- package/dist/src/plugins/project-json/build-nodes/project-json.d.ts +5 -0
- package/dist/src/plugins/project-json/build-nodes/project-json.js +33 -0
- package/dist/src/project-graph/affected/affected-project-graph-models.d.ts +11 -0
- package/dist/src/project-graph/affected/affected-project-graph.d.ts +4 -0
- package/dist/src/project-graph/affected/locators/project-glob-changes.d.ts +2 -0
- package/dist/src/project-graph/affected/locators/project-glob-changes.js +44 -0
- package/dist/src/project-graph/affected/locators/workspace-json-changes.d.ts +4 -0
- package/dist/src/project-graph/affected/locators/workspace-projects.d.ts +3 -0
- package/dist/src/project-graph/build-project-graph.d.ts +26 -0
- package/dist/src/project-graph/build-project-graph.js +303 -0
- package/dist/src/project-graph/error-types.d.ts +140 -0
- package/dist/src/project-graph/error-types.js +419 -0
- package/dist/src/project-graph/file-map-utils.d.ts +18 -0
- package/dist/src/project-graph/file-map-utils.js +61 -0
- package/dist/src/project-graph/file-utils.d.ts +31 -0
- package/dist/src/project-graph/file-utils.js +182 -0
- package/dist/src/project-graph/nx-deps-cache.d.ts +62 -0
- package/dist/src/project-graph/operators.d.ts +11 -0
- package/dist/src/project-graph/operators.js +70 -0
- package/dist/src/project-graph/plugins/get-plugins.d.ts +25 -0
- package/dist/src/project-graph/plugins/get-plugins.js +296 -0
- package/dist/src/project-graph/plugins/in-process-loader.d.ts +10 -0
- package/dist/src/project-graph/plugins/in-process-loader.js +61 -0
- package/dist/src/project-graph/plugins/index.d.ts +4 -0
- package/dist/src/project-graph/plugins/isolation/enabled.d.ts +1 -0
- package/dist/src/project-graph/plugins/isolation/index.d.ts +1 -0
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.d.ts +62 -0
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.js +474 -0
- package/dist/src/project-graph/plugins/isolation/load-isolated-plugin.d.ts +3 -0
- package/dist/src/project-graph/plugins/isolation/message-types.d.ts +59 -0
- package/dist/src/project-graph/plugins/isolation/messaging.d.ts +142 -0
- package/dist/src/project-graph/plugins/isolation/messaging.js +86 -0
- package/dist/src/project-graph/plugins/isolation/plugin-lifecycle-manager.d.ts +82 -0
- package/dist/src/project-graph/plugins/isolation/plugin-worker.d.ts +2 -0
- package/dist/src/project-graph/plugins/isolation/plugin-worker.js +150 -0
- package/dist/src/project-graph/plugins/isolation/worker-streaming.d.ts +14 -0
- package/dist/src/project-graph/plugins/isolation/worker-streaming.js +39 -0
- package/dist/src/project-graph/plugins/load-resolved-plugin.d.ts +3 -0
- package/dist/src/project-graph/plugins/load-resolved-plugin.js +24 -0
- package/dist/src/project-graph/plugins/loaded-nx-plugin.d.ts +41 -0
- package/dist/src/project-graph/plugins/loaded-nx-plugin.js +103 -0
- package/dist/src/project-graph/plugins/public-api.d.ts +139 -0
- package/dist/src/project-graph/plugins/resolve-plugin.d.ts +25 -0
- package/dist/src/project-graph/plugins/resolve-plugin.js +277 -0
- package/dist/src/project-graph/plugins/tasks-execution-hooks.d.ts +3 -0
- package/dist/src/project-graph/plugins/tasks-execution-hooks.js +67 -0
- package/dist/src/project-graph/plugins/transpiler.d.ts +20 -0
- package/dist/src/project-graph/plugins/transpiler.js +95 -0
- package/dist/src/project-graph/plugins/utils.d.ts +4 -0
- package/dist/src/project-graph/plugins/utils.js +32 -0
- package/dist/src/project-graph/project-graph-builder.d.ts +133 -0
- package/dist/src/project-graph/project-graph-builder.js +395 -0
- package/dist/src/project-graph/project-graph.d.ts +54 -0
- package/dist/src/project-graph/project-graph.js +412 -0
- package/dist/src/project-graph/utils/build-all-workspace-files.d.ts +2 -0
- package/dist/src/project-graph/utils/find-project-for-path.d.ts +20 -0
- package/dist/src/project-graph/utils/implicit-project-dependencies.d.ts +3 -0
- package/dist/src/project-graph/utils/normalize-project-nodes.d.ts +6 -0
- package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.d.ts +50 -0
- package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.js +240 -0
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.d.ts +45 -0
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.js +287 -0
- package/dist/src/project-graph/utils/project-configuration/source-maps.d.ts +27 -0
- package/dist/src/project-graph/utils/project-configuration/source-maps.js +71 -0
- package/dist/src/project-graph/utils/project-configuration/target-defaults.d.ts +50 -0
- package/dist/src/project-graph/utils/project-configuration/target-defaults.js +441 -0
- package/dist/src/project-graph/utils/project-configuration/target-merging.d.ts +32 -0
- package/dist/src/project-graph/utils/project-configuration/target-merging.js +465 -0
- package/dist/src/project-graph/utils/project-configuration/target-normalization.d.ts +12 -0
- package/dist/src/project-graph/utils/project-configuration/target-normalization.js +170 -0
- package/dist/src/project-graph/utils/project-configuration/utils.d.ts +23 -0
- package/dist/src/project-graph/utils/project-configuration/utils.js +179 -0
- package/dist/src/project-graph/utils/project-configuration-utils.d.ts +83 -0
- package/dist/src/project-graph/utils/project-configuration-utils.js +347 -0
- package/dist/src/project-graph/utils/retrieve-workspace-files.d.ts +35 -0
- package/dist/src/project-graph/utils/retrieve-workspace-files.js +110 -0
- package/dist/src/tasks-runner/batch/batch-messages.d.ts +35 -0
- package/dist/src/tasks-runner/batch/run-batch.d.ts +1 -0
- package/dist/src/tasks-runner/batch/run-batch.js +78 -0
- package/dist/src/tasks-runner/cache.d.ts +94 -0
- package/dist/src/tasks-runner/cache.js +604 -0
- package/dist/src/tasks-runner/create-task-graph.d.ts +41 -0
- package/dist/src/tasks-runner/create-task-graph.js +305 -0
- package/dist/src/tasks-runner/default-tasks-runner.d.ts +25 -0
- package/dist/src/tasks-runner/default-tasks-runner.js +74 -0
- package/dist/src/tasks-runner/fork.d.ts +1 -0
- package/dist/src/tasks-runner/forked-process-task-runner.d.ts +42 -0
- package/dist/src/tasks-runner/forked-process-task-runner.js +299 -0
- package/dist/src/tasks-runner/init-tasks-runner.d.ts +7 -0
- package/dist/src/tasks-runner/init-tasks-runner.js +86 -0
- package/dist/src/tasks-runner/is-tui-enabled.d.ts +18 -0
- package/dist/src/tasks-runner/legacy-depends-on-warning.d.ts +18 -0
- package/dist/src/tasks-runner/legacy-depends-on-warning.js +109 -0
- package/dist/src/tasks-runner/life-cycle.d.ts +86 -0
- package/dist/src/tasks-runner/life-cycle.js +148 -0
- package/dist/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.d.ts +25 -0
- package/dist/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +366 -0
- package/dist/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.d.ts +24 -0
- package/dist/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +238 -0
- package/dist/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.d.ts +5 -0
- package/dist/src/tasks-runner/life-cycles/formatting-utils.d.ts +3 -0
- package/dist/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.d.ts +13 -0
- package/dist/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.js +67 -0
- package/dist/src/tasks-runner/life-cycles/performance-analysis.d.ts +166 -0
- package/dist/src/tasks-runner/life-cycles/performance-analysis.js +499 -0
- package/dist/src/tasks-runner/life-cycles/performance-life-cycle.d.ts +59 -0
- package/dist/src/tasks-runner/life-cycles/performance-life-cycle.js +192 -0
- package/dist/src/tasks-runner/life-cycles/performance-report.d.ts +55 -0
- package/dist/src/tasks-runner/life-cycles/performance-report.js +332 -0
- package/dist/src/tasks-runner/life-cycles/pretty-time.d.ts +4 -0
- package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.d.ts +29 -0
- package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.d.ts +28 -0
- package/dist/src/tasks-runner/life-cycles/store-run-information-life-cycle.d.ts +17 -0
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle-old.d.ts +11 -0
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle-old.js +91 -0
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle.d.ts +16 -0
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle.js +112 -0
- package/dist/src/tasks-runner/life-cycles/task-profiling-life-cycle.d.ts +14 -0
- package/dist/src/tasks-runner/life-cycles/task-results-life-cycle.d.ts +6 -0
- package/dist/src/tasks-runner/life-cycles/task-telemetry-life-cycle.d.ts +9 -0
- package/dist/src/tasks-runner/life-cycles/task-timings-life-cycle.d.ts +8 -0
- package/dist/src/tasks-runner/life-cycles/tui-summary-life-cycle.d.ts +19 -0
- package/dist/src/tasks-runner/life-cycles/tui-summary-life-cycle.js +339 -0
- package/dist/src/tasks-runner/life-cycles/view-logs-utils.d.ts +1 -0
- package/dist/src/tasks-runner/process-metrics-service.d.ts +53 -0
- package/dist/src/tasks-runner/pseudo-ipc.d.ts +48 -0
- package/dist/src/tasks-runner/pseudo-ipc.js +156 -0
- package/dist/src/tasks-runner/pseudo-terminal.d.ts +58 -0
- package/dist/src/tasks-runner/pseudo-terminal.js +197 -0
- package/dist/src/tasks-runner/remove-old-cache-records.d.ts +1 -0
- package/dist/src/tasks-runner/run-command.d.ts +42 -0
- package/dist/src/tasks-runner/run-command.js +900 -0
- package/dist/src/tasks-runner/running-tasks/batch-process.d.ts +19 -0
- package/dist/src/tasks-runner/running-tasks/batch-process.js +110 -0
- package/dist/src/tasks-runner/running-tasks/node-child-process.d.ts +40 -0
- package/dist/src/tasks-runner/running-tasks/node-child-process.js +175 -0
- package/dist/src/tasks-runner/running-tasks/noop-child-process.d.ts +16 -0
- package/dist/src/tasks-runner/running-tasks/output-prefix.d.ts +13 -0
- package/dist/src/tasks-runner/running-tasks/output-prefix.js +63 -0
- package/dist/src/tasks-runner/running-tasks/running-task.d.ts +11 -0
- package/dist/src/tasks-runner/running-tasks/shared-running-task.d.ts +14 -0
- package/dist/src/tasks-runner/task-env-paths.d.ts +1 -0
- package/dist/src/tasks-runner/task-env.d.ts +22 -0
- package/dist/src/tasks-runner/task-env.js +171 -0
- package/dist/src/tasks-runner/task-graph-utils.d.ts +30 -0
- package/dist/src/tasks-runner/task-io-service.d.ts +96 -0
- package/dist/src/tasks-runner/task-orchestrator.d.ts +189 -0
- package/dist/src/tasks-runner/task-orchestrator.js +1357 -0
- package/dist/src/tasks-runner/tasks-runner.d.ts +24 -0
- package/dist/src/tasks-runner/tasks-schedule.d.ts +48 -0
- package/dist/src/tasks-runner/tasks-schedule.js +258 -0
- package/dist/src/tasks-runner/utils.d.ts +61 -0
- package/dist/src/tasks-runner/utils.js +451 -0
- package/dist/src/utils/ab-testing.d.ts +59 -0
- package/dist/src/utils/ab-testing.js +142 -0
- package/dist/src/utils/all-file-data.d.ts +2 -0
- package/dist/src/utils/analytics-prompt.d.ts +15 -0
- package/dist/src/utils/analytics-prompt.js +135 -0
- package/dist/src/utils/assert-workspace-validity.d.ts +3 -0
- package/dist/src/utils/async-iterator.d.ts +2 -0
- package/dist/src/utils/binary-extensions.d.ts +1 -0
- package/dist/src/utils/cache-directory.d.ts +9 -0
- package/dist/src/utils/cache-directory.js +86 -0
- package/dist/src/utils/call-sites.d.ts +14 -0
- package/dist/src/utils/catalog/index.d.ts +22 -0
- package/dist/src/utils/catalog/index.js +87 -0
- package/dist/src/utils/catalog/manager-factory.d.ts +5 -0
- package/dist/src/utils/catalog/manager-utils.d.ts +9 -0
- package/dist/src/utils/catalog/manager-utils.js +215 -0
- package/dist/src/utils/catalog/manager.d.ts +40 -0
- package/dist/src/utils/catalog/pnpm-manager.d.ts +21 -0
- package/dist/src/utils/catalog/pnpm-manager.js +151 -0
- package/dist/src/utils/catalog/types.d.ts +11 -0
- package/dist/src/utils/catalog/types.js +2 -0
- package/dist/src/utils/catalog/yarn-manager.d.ts +21 -0
- package/dist/src/utils/catalog/yarn-manager.js +151 -0
- package/dist/src/utils/child-process.d.ts +22 -0
- package/dist/src/utils/child-process.js +91 -0
- package/dist/src/utils/chunkify.d.ts +11 -0
- package/dist/src/utils/code-frames.d.ts +14 -0
- package/dist/src/utils/code-frames.js +116 -0
- package/dist/src/utils/collapse-expanded-outputs.d.ts +10 -0
- package/dist/src/utils/command-line-utils.d.ts +57 -0
- package/dist/src/utils/command-line-utils.js +249 -0
- package/dist/src/utils/compile-cache.d.ts +24 -0
- package/dist/src/utils/compile-cache.js +49 -0
- package/dist/src/utils/consume-messages-from-socket.d.ts +9 -0
- package/dist/src/utils/consume-messages-from-socket.js +56 -0
- package/dist/src/utils/db-connection.d.ts +14 -0
- package/dist/src/utils/db-connection.js +64 -0
- package/dist/src/utils/default-base.d.ts +1 -0
- package/dist/src/utils/delayed-spinner.d.ts +51 -0
- package/dist/src/utils/delayed-spinner.js +88 -0
- package/dist/src/utils/dotenv.d.ts +7 -0
- package/dist/src/utils/dotenv.js +19 -0
- package/dist/src/utils/enable-compile-cache.d.ts +1 -0
- package/dist/src/utils/enable-compile-cache.js +7 -0
- package/dist/src/utils/exit-codes.d.ts +15 -0
- package/dist/src/utils/fileutils.d.ts +67 -0
- package/dist/src/utils/fileutils.js +112 -0
- package/dist/src/utils/find-matching-projects.d.ts +18 -0
- package/dist/src/utils/find-matching-projects.js +222 -0
- package/dist/src/utils/find-workspace-root.d.ts +11 -0
- package/dist/src/utils/get-package-name-from-import-path.d.ts +1 -0
- package/dist/src/utils/git-utils.d.ts +57 -0
- package/dist/src/utils/git-utils.index-filter.d.ts +1 -0
- package/dist/src/utils/git-utils.index-filter.js +23 -0
- package/dist/src/utils/git-utils.js +436 -0
- package/dist/src/utils/git-utils.tree-filter.d.ts +1 -0
- package/dist/src/utils/git-utils.tree-filter.js +47 -0
- package/dist/src/utils/globs.d.ts +3 -0
- package/dist/src/utils/handle-errors.d.ts +1 -0
- package/dist/src/utils/handle-errors.js +91 -0
- package/dist/src/utils/handle-import.d.ts +15 -0
- package/dist/src/utils/handle-import.js +86 -0
- package/dist/src/utils/has-nx-js-plugin.d.ts +9 -0
- package/dist/src/utils/has-nx-js-plugin.js +24 -0
- package/dist/src/utils/ignore.d.ts +9 -0
- package/dist/src/utils/installation-directory.d.ts +2 -0
- package/dist/src/utils/installed-nx-version.d.ts +23 -0
- package/dist/src/utils/installed-nx-version.js +113 -0
- package/dist/src/utils/is-ci.d.ts +1 -0
- package/dist/src/utils/is-sandbox.d.ts +1 -0
- package/dist/src/utils/is-sandbox.js +11 -0
- package/dist/src/utils/is-using-prettier.d.ts +3 -0
- package/dist/src/utils/json-diff.d.ts +18 -0
- package/dist/src/utils/json.d.ts +44 -0
- package/dist/src/utils/legacy-task-history.d.ts +8 -0
- package/dist/src/utils/logger.d.ts +23 -0
- package/dist/src/utils/logger.js +74 -0
- package/dist/src/utils/machine-id-cache.d.ts +5 -0
- package/dist/src/utils/min-release-age/behavior/bun.d.ts +30 -0
- package/dist/src/utils/min-release-age/behavior/bun.js +278 -0
- package/dist/src/utils/min-release-age/behavior/npm.d.ts +21 -0
- package/dist/src/utils/min-release-age/behavior/npm.js +293 -0
- package/dist/src/utils/min-release-age/behavior/pnpm.d.ts +23 -0
- package/dist/src/utils/min-release-age/behavior/pnpm.js +525 -0
- package/dist/src/utils/min-release-age/behavior/yarn.d.ts +22 -0
- package/dist/src/utils/min-release-age/behavior/yarn.js +314 -0
- package/dist/src/utils/min-release-age/constants.d.ts +3 -0
- package/dist/src/utils/min-release-age/constants.js +8 -0
- package/dist/src/utils/min-release-age/errors.d.ts +28 -0
- package/dist/src/utils/min-release-age/errors.js +22 -0
- package/dist/src/utils/min-release-age/npmrc.d.ts +15 -0
- package/dist/src/utils/min-release-age/npmrc.js +45 -0
- package/dist/src/utils/min-release-age/packument.d.ts +13 -0
- package/dist/src/utils/min-release-age/packument.js +34 -0
- package/dist/src/utils/min-release-age/pick.d.ts +72 -0
- package/dist/src/utils/min-release-age/pick.js +206 -0
- package/dist/src/utils/min-release-age/pnpm-exclude-writer.d.ts +12 -0
- package/dist/src/utils/min-release-age/pnpm-exclude-writer.js +58 -0
- package/dist/src/utils/min-release-age/policy.d.ts +38 -0
- package/dist/src/utils/min-release-age/policy.js +59 -0
- package/dist/src/utils/min-release-age/resolve.d.ts +8 -0
- package/dist/src/utils/min-release-age/resolve.js +14 -0
- package/dist/src/utils/nx-cloud-utils.d.ts +4 -0
- package/dist/src/utils/nx-cloud-utils.js +28 -0
- package/dist/src/utils/nx-console-prompt.d.ts +1 -0
- package/dist/src/utils/nx-key.d.ts +6 -0
- package/dist/src/utils/nx-key.js +50 -0
- package/dist/src/utils/nx-package-group.d.ts +8 -0
- package/dist/src/utils/nx-package-group.js +15 -0
- package/dist/src/utils/object-sort.d.ts +1 -0
- package/dist/src/utils/output.d.ts +79 -0
- package/dist/src/utils/output.js +264 -0
- package/dist/src/utils/package-json.d.ts +229 -0
- package/dist/src/utils/package-json.js +383 -0
- package/dist/src/utils/package-manager.d.ts +140 -0
- package/dist/src/utils/package-manager.js +619 -0
- package/dist/src/utils/params.d.ts +140 -0
- package/dist/src/utils/params.js +710 -0
- package/dist/src/utils/path.d.ts +19 -0
- package/dist/src/utils/path.js +38 -0
- package/dist/src/utils/perf-logging.d.ts +1 -0
- package/dist/src/utils/perf-logging.js +46 -0
- package/dist/src/utils/plugin-cache-utils.d.ts +82 -0
- package/dist/src/utils/plugin-cache-utils.js +212 -0
- package/dist/src/utils/plugin-progress-text.d.ts +1 -0
- package/dist/src/utils/plugin-progress-text.js +15 -0
- package/dist/src/utils/plugins/atomizer-utils.d.ts +11 -0
- package/dist/src/utils/plugins/core-plugins.d.ts +6 -0
- package/dist/src/utils/plugins/index.d.ts +5 -0
- package/dist/src/utils/plugins/installed-plugins.d.ts +5 -0
- package/dist/src/utils/plugins/local-plugins.d.ts +22 -0
- package/dist/src/utils/plugins/local-plugins.js +60 -0
- package/dist/src/utils/plugins/output.d.ts +34 -0
- package/dist/src/utils/plugins/output.js +201 -0
- package/dist/src/utils/plugins/plugin-capabilities.d.ts +15 -0
- package/dist/src/utils/pnpm-workspace.d.ts +8 -0
- package/dist/src/utils/pnpm-workspace.js +2 -0
- package/dist/src/utils/print-help.d.ts +11 -0
- package/dist/src/utils/print-help.js +259 -0
- package/dist/src/utils/progress-topics.d.ts +19 -0
- package/dist/src/utils/progress-topics.js +21 -0
- package/dist/src/utils/project-graph-utils.d.ts +18 -0
- package/dist/src/utils/promised-based-queue.d.ts +6 -0
- package/dist/src/utils/provenance.d.ts +47 -0
- package/dist/src/utils/require-nx-key.d.ts +1 -0
- package/dist/src/utils/require-nx-key.js +23 -0
- package/dist/src/utils/serializable-error.d.ts +4 -0
- package/dist/src/utils/serialize-overrides-into-command-line.d.ts +3 -0
- package/dist/src/utils/serialize-target.d.ts +1 -0
- package/dist/src/utils/shell-quoting.d.ts +10 -0
- package/dist/src/utils/spinner.d.ts +24 -0
- package/dist/src/utils/spinner.js +77 -0
- package/dist/src/utils/split-target.d.ts +15 -0
- package/dist/src/utils/strip-indents.d.ts +14 -0
- package/dist/src/utils/sync-generators.d.ts +66 -0
- package/dist/src/utils/sync-generators.js +355 -0
- package/dist/src/utils/tar.d.ts +8 -0
- package/dist/src/utils/tar.js +44 -0
- package/dist/src/utils/task-history.d.ts +17 -0
- package/dist/src/utils/terminal-link.d.ts +20 -0
- package/dist/src/utils/terminal-link.js +85 -0
- package/dist/src/utils/update-nxw.d.ts +2 -0
- package/dist/src/utils/versions.d.ts +1 -0
- package/dist/src/utils/versions.js +4 -0
- package/dist/src/utils/wait-for-socket-connection.d.ts +15 -0
- package/dist/src/utils/wait-for-socket-connection.js +53 -0
- package/dist/src/utils/workspace-context.d.ts +21 -0
- package/dist/src/utils/workspace-context.js +120 -0
- package/dist/src/utils/workspace-root.d.ts +6 -0
- package/dist/src/utils/workspace-root.js +40 -0
- package/dist/src/utils/write-formatted-json-file.d.ts +6 -0
- package/dist/src/utils/yarn-syml/index.d.ts +23 -0
- package/dist/src/utils/yarn-syml/index.js +151 -0
- package/dist/src/utils/yarn-syml/syml-grammar.js +1911 -0
- package/dist/tasks-runners/default.d.ts +1 -0
- package/executors.json +6 -6
- package/generators.json +4 -4
- package/migrations.json +50 -32
- package/package.json +603 -94
- package/schemas/migrations-schema.json +186 -0
- package/schemas/nx-schema.json +179 -75
- package/schemas/project-schema.json +25 -0
- package/.eslintrc.json +0 -155
- package/bin/init-local.d.ts +0 -9
- package/bin/init-local.d.ts.map +0 -1
- package/bin/init-local.js +0 -197
- package/bin/nx-cloud.d.ts +0 -4
- package/bin/nx-cloud.d.ts.map +0 -1
- package/bin/nx.d.ts +0 -3
- package/bin/nx.d.ts.map +0 -1
- package/bin/nx.js +0 -271
- package/bin/post-install.d.ts +0 -2
- package/bin/post-install.d.ts.map +0 -1
- package/bin/run-executor.d.ts +0 -2
- package/bin/run-executor.d.ts.map +0 -1
- package/plugins/package-json.d.ts +0 -5
- package/plugins/package-json.d.ts.map +0 -1
- package/plugins/package-json.js +0 -38
- package/project.json +0 -188
- package/release/changelog-renderer/index.d.ts +0 -110
- package/release/changelog-renderer/index.d.ts.map +0 -1
- package/release/changelog-renderer/index.js +0 -367
- package/release/index.d.ts +0 -5
- package/release/index.d.ts.map +0 -1
- package/src/adapter/angular-json.d.ts +0 -11
- package/src/adapter/angular-json.d.ts.map +0 -1
- package/src/adapter/angular-json.js +0 -129
- package/src/adapter/compat.d.ts +0 -3
- package/src/adapter/compat.d.ts.map +0 -1
- package/src/adapter/compat.js +0 -154
- package/src/adapter/ngcli-adapter.d.ts +0 -105
- package/src/adapter/ngcli-adapter.d.ts.map +0 -1
- package/src/adapter/ngcli-adapter.js +0 -1000
- package/src/adapter/rxjs-for-await.d.ts +0 -110
- package/src/adapter/rxjs-for-await.d.ts.map +0 -1
- package/src/ai/clone-ai-config-repo.d.ts +0 -12
- package/src/ai/clone-ai-config-repo.d.ts.map +0 -1
- package/src/ai/clone-ai-config-repo.js +0 -138
- package/src/ai/constants.d.ts +0 -27
- package/src/ai/constants.d.ts.map +0 -1
- package/src/ai/constants.js +0 -71
- package/src/ai/detect-ai-agent.d.ts +0 -3
- package/src/ai/detect-ai-agent.d.ts.map +0 -1
- package/src/ai/set-up-ai-agents/get-agent-rules.d.ts +0 -6
- package/src/ai/set-up-ai-agents/get-agent-rules.d.ts.map +0 -1
- package/src/ai/set-up-ai-agents/schema.json +0 -34
- package/src/ai/set-up-ai-agents/set-up-ai-agents.d.ts +0 -11
- package/src/ai/set-up-ai-agents/set-up-ai-agents.d.ts.map +0 -1
- package/src/ai/set-up-ai-agents/set-up-ai-agents.js +0 -510
- package/src/ai/utils.d.ts +0 -21
- package/src/ai/utils.d.ts.map +0 -1
- package/src/ai/utils.js +0 -216
- package/src/analytics/analytics.d.ts +0 -11
- package/src/analytics/analytics.d.ts.map +0 -1
- package/src/analytics/analytics.js +0 -226
- package/src/analytics/index.d.ts +0 -2
- package/src/analytics/index.d.ts.map +0 -1
- package/src/command-line/add/add.d.ts +0 -4
- package/src/command-line/add/add.d.ts.map +0 -1
- package/src/command-line/add/add.js +0 -126
- package/src/command-line/add/command-object.d.ts +0 -9
- package/src/command-line/add/command-object.d.ts.map +0 -1
- package/src/command-line/add/command-object.js +0 -27
- package/src/command-line/affected/affected.d.ts +0 -11
- package/src/command-line/affected/affected.d.ts.map +0 -1
- package/src/command-line/affected/command-object.d.ts +0 -7
- package/src/command-line/affected/command-object.d.ts.map +0 -1
- package/src/command-line/affected/command-object.js +0 -82
- package/src/command-line/ai/ai-output.d.ts +0 -47
- package/src/command-line/ai/ai-output.d.ts.map +0 -1
- package/src/command-line/configure-ai-agents/command-object.d.ts +0 -9
- package/src/command-line/configure-ai-agents/command-object.d.ts.map +0 -1
- package/src/command-line/configure-ai-agents/command-object.js +0 -46
- package/src/command-line/configure-ai-agents/configure-ai-agents.d.ts +0 -4
- package/src/command-line/configure-ai-agents/configure-ai-agents.d.ts.map +0 -1
- package/src/command-line/configure-ai-agents/configure-ai-agents.js +0 -423
- package/src/command-line/daemon/command-object.d.ts +0 -4
- package/src/command-line/daemon/command-object.d.ts.map +0 -1
- package/src/command-line/daemon/command-object.js +0 -28
- package/src/command-line/daemon/daemon.d.ts +0 -3
- package/src/command-line/daemon/daemon.d.ts.map +0 -1
- package/src/command-line/daemon/daemon.js +0 -26
- package/src/command-line/deprecated/command-objects.d.ts +0 -10
- package/src/command-line/deprecated/command-objects.d.ts.map +0 -1
- package/src/command-line/examples.d.ts +0 -13
- package/src/command-line/examples.d.ts.map +0 -1
- package/src/command-line/examples.js +0 -403
- package/src/command-line/exec/command-object.d.ts +0 -3
- package/src/command-line/exec/command-object.d.ts.map +0 -1
- package/src/command-line/exec/command-object.js +0 -19
- package/src/command-line/exec/exec.d.ts +0 -2
- package/src/command-line/exec/exec.d.ts.map +0 -1
- package/src/command-line/exec/exec.js +0 -142
- package/src/command-line/format/command-object.d.ts +0 -4
- package/src/command-line/format/command-object.d.ts.map +0 -1
- package/src/command-line/format/command-object.js +0 -57
- package/src/command-line/format/format.d.ts +0 -3
- package/src/command-line/format/format.d.ts.map +0 -1
- package/src/command-line/format/format.js +0 -221
- package/src/command-line/generate/command-object.d.ts +0 -3
- package/src/command-line/generate/command-object.d.ts.map +0 -1
- package/src/command-line/generate/command-object.js +0 -66
- package/src/command-line/generate/generate.d.ts +0 -22
- package/src/command-line/generate/generate.d.ts.map +0 -1
- package/src/command-line/generate/generate.js +0 -266
- package/src/command-line/generate/generator-utils.d.ts +0 -19
- package/src/command-line/generate/generator-utils.d.ts.map +0 -1
- package/src/command-line/graph/command-object.d.ts +0 -26
- package/src/command-line/graph/command-object.d.ts.map +0 -1
- package/src/command-line/graph/command-object.js +0 -75
- package/src/command-line/graph/graph.d.ts +0 -70
- package/src/command-line/graph/graph.d.ts.map +0 -1
- package/src/command-line/graph/graph.js +0 -971
- package/src/command-line/import/command-object.d.ts +0 -3
- package/src/command-line/import/command-object.d.ts.map +0 -1
- package/src/command-line/import/command-object.js +0 -62
- package/src/command-line/import/import.d.ts +0 -27
- package/src/command-line/import/import.d.ts.map +0 -1
- package/src/command-line/import/import.js +0 -599
- package/src/command-line/import/utils/ai-output.d.ts +0 -94
- package/src/command-line/import/utils/ai-output.d.ts.map +0 -1
- package/src/command-line/import/utils/merge-remote-source.d.ts +0 -3
- package/src/command-line/import/utils/merge-remote-source.d.ts.map +0 -1
- package/src/command-line/import/utils/prepare-source-repo.d.ts +0 -3
- package/src/command-line/import/utils/prepare-source-repo.d.ts.map +0 -1
- package/src/command-line/index.d.ts +0 -23
- package/src/command-line/index.d.ts.map +0 -1
- package/src/command-line/init/ai-agent-prompts.d.ts +0 -3
- package/src/command-line/init/ai-agent-prompts.d.ts.map +0 -1
- package/src/command-line/init/ai-agent-prompts.js +0 -34
- package/src/command-line/init/command-object.d.ts +0 -3
- package/src/command-line/init/command-object.d.ts.map +0 -1
- package/src/command-line/init/command-object.js +0 -168
- package/src/command-line/init/configure-plugins.d.ts +0 -35
- package/src/command-line/init/configure-plugins.d.ts.map +0 -1
- package/src/command-line/init/configure-plugins.js +0 -204
- package/src/command-line/init/implementation/add-nx-to-monorepo.d.ts +0 -7
- package/src/command-line/init/implementation/add-nx-to-monorepo.d.ts.map +0 -1
- package/src/command-line/init/implementation/add-nx-to-monorepo.js +0 -130
- package/src/command-line/init/implementation/add-nx-to-nest.d.ts +0 -6
- package/src/command-line/init/implementation/add-nx-to-nest.d.ts.map +0 -1
- package/src/command-line/init/implementation/add-nx-to-nest.js +0 -345
- package/src/command-line/init/implementation/add-nx-to-npm-repo.d.ts +0 -7
- package/src/command-line/init/implementation/add-nx-to-npm-repo.d.ts.map +0 -1
- package/src/command-line/init/implementation/add-nx-to-npm-repo.js +0 -72
- package/src/command-line/init/implementation/add-nx-to-turborepo.d.ts +0 -5
- package/src/command-line/init/implementation/add-nx-to-turborepo.d.ts.map +0 -1
- package/src/command-line/init/implementation/add-nx-to-turborepo.js +0 -49
- package/src/command-line/init/implementation/angular/index.d.ts +0 -3
- package/src/command-line/init/implementation/angular/index.d.ts.map +0 -1
- package/src/command-line/init/implementation/angular/index.js +0 -125
- package/src/command-line/init/implementation/angular/integrated-workspace.d.ts +0 -2
- package/src/command-line/init/implementation/angular/integrated-workspace.d.ts.map +0 -1
- package/src/command-line/init/implementation/angular/legacy-angular-versions.d.ts +0 -3
- package/src/command-line/init/implementation/angular/legacy-angular-versions.d.ts.map +0 -1
- package/src/command-line/init/implementation/angular/legacy-angular-versions.js +0 -143
- package/src/command-line/init/implementation/angular/standalone-workspace.d.ts +0 -2
- package/src/command-line/init/implementation/angular/standalone-workspace.d.ts.map +0 -1
- package/src/command-line/init/implementation/angular/standalone-workspace.js +0 -204
- package/src/command-line/init/implementation/angular/types.d.ts +0 -21
- package/src/command-line/init/implementation/angular/types.d.ts.map +0 -1
- package/src/command-line/init/implementation/check-compatible-with-plugins.d.ts +0 -16
- package/src/command-line/init/implementation/check-compatible-with-plugins.d.ts.map +0 -1
- package/src/command-line/init/implementation/deduce-default-base.d.ts +0 -2
- package/src/command-line/init/implementation/deduce-default-base.d.ts.map +0 -1
- package/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +0 -11
- package/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts.map +0 -1
- package/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +0 -119
- package/src/command-line/init/implementation/dot-nx/nxw.d.ts +0 -2
- package/src/command-line/init/implementation/dot-nx/nxw.d.ts.map +0 -1
- package/src/command-line/init/implementation/dot-nx/nxw.js +0 -123
- package/src/command-line/init/implementation/utils.d.ts +0 -20
- package/src/command-line/init/implementation/utils.d.ts.map +0 -1
- package/src/command-line/init/implementation/utils.js +0 -272
- package/src/command-line/init/init-v1.d.ts +0 -9
- package/src/command-line/init/init-v1.d.ts.map +0 -1
- package/src/command-line/init/init-v2.d.ts +0 -24
- package/src/command-line/init/init-v2.d.ts.map +0 -1
- package/src/command-line/init/init-v2.js +0 -512
- package/src/command-line/init/utils/ai-output.d.ts +0 -73
- package/src/command-line/init/utils/ai-output.d.ts.map +0 -1
- package/src/command-line/list/command-object.d.ts +0 -3
- package/src/command-line/list/command-object.d.ts.map +0 -1
- package/src/command-line/list/command-object.js +0 -20
- package/src/command-line/list/list.d.ts +0 -16
- package/src/command-line/list/list.d.ts.map +0 -1
- package/src/command-line/mcp/command-object.d.ts +0 -3
- package/src/command-line/mcp/command-object.d.ts.map +0 -1
- package/src/command-line/mcp/command-object.js +0 -28
- package/src/command-line/mcp/mcp.d.ts +0 -3
- package/src/command-line/mcp/mcp.d.ts.map +0 -1
- package/src/command-line/migrate/command-object.d.ts +0 -4
- package/src/command-line/migrate/command-object.d.ts.map +0 -1
- package/src/command-line/migrate/command-object.js +0 -76
- package/src/command-line/migrate/migrate-ui-api.d.ts +0 -77
- package/src/command-line/migrate/migrate-ui-api.d.ts.map +0 -1
- package/src/command-line/migrate/migrate-ui-api.js +0 -354
- package/src/command-line/migrate/migrate.d.ts +0 -136
- package/src/command-line/migrate/migrate.d.ts.map +0 -1
- package/src/command-line/migrate/migrate.js +0 -1347
- package/src/command-line/migrate/run-migration-process.js +0 -87
- package/src/command-line/new/command-object.d.ts +0 -3
- package/src/command-line/new/command-object.d.ts.map +0 -1
- package/src/command-line/new/command-object.js +0 -25
- package/src/command-line/new/new.d.ts +0 -4
- package/src/command-line/new/new.d.ts.map +0 -1
- package/src/command-line/nx-cloud/apply-locally/apply-locally.d.ts +0 -5
- package/src/command-line/nx-cloud/apply-locally/apply-locally.d.ts.map +0 -1
- package/src/command-line/nx-cloud/apply-locally/command-object.d.ts +0 -3
- package/src/command-line/nx-cloud/apply-locally/command-object.d.ts.map +0 -1
- package/src/command-line/nx-cloud/apply-locally/command-object.js +0 -15
- package/src/command-line/nx-cloud/complete-run/command-object.d.ts +0 -3
- package/src/command-line/nx-cloud/complete-run/command-object.d.ts.map +0 -1
- package/src/command-line/nx-cloud/complete-run/command-object.js +0 -16
- package/src/command-line/nx-cloud/complete-run/stop-all-agents.d.ts +0 -5
- package/src/command-line/nx-cloud/complete-run/stop-all-agents.d.ts.map +0 -1
- package/src/command-line/nx-cloud/connect/command-object.d.ts +0 -4
- package/src/command-line/nx-cloud/connect/command-object.d.ts.map +0 -1
- package/src/command-line/nx-cloud/connect/command-object.js +0 -33
- package/src/command-line/nx-cloud/connect/connect-to-nx-cloud.d.ts +0 -14
- package/src/command-line/nx-cloud/connect/connect-to-nx-cloud.d.ts.map +0 -1
- package/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +0 -182
- package/src/command-line/nx-cloud/connect/view-logs.d.ts +0 -2
- package/src/command-line/nx-cloud/connect/view-logs.d.ts.map +0 -1
- package/src/command-line/nx-cloud/connect/view-logs.js +0 -53
- package/src/command-line/nx-cloud/download-cloud-client/command-object.d.ts +0 -3
- package/src/command-line/nx-cloud/download-cloud-client/command-object.d.ts.map +0 -1
- package/src/command-line/nx-cloud/download-cloud-client/command-object.js +0 -12
- package/src/command-line/nx-cloud/download-cloud-client/download-cloud-client.d.ts +0 -5
- package/src/command-line/nx-cloud/download-cloud-client/download-cloud-client.d.ts.map +0 -1
- package/src/command-line/nx-cloud/fix-ci/command-object.d.ts +0 -3
- package/src/command-line/nx-cloud/fix-ci/command-object.d.ts.map +0 -1
- package/src/command-line/nx-cloud/fix-ci/command-object.js +0 -15
- package/src/command-line/nx-cloud/fix-ci/fix-ci.d.ts +0 -5
- package/src/command-line/nx-cloud/fix-ci/fix-ci.d.ts.map +0 -1
- package/src/command-line/nx-cloud/login/command-object.d.ts +0 -3
- package/src/command-line/nx-cloud/login/command-object.d.ts.map +0 -1
- package/src/command-line/nx-cloud/login/command-object.js +0 -19
- package/src/command-line/nx-cloud/login/login.d.ts +0 -6
- package/src/command-line/nx-cloud/login/login.d.ts.map +0 -1
- package/src/command-line/nx-cloud/logout/command-object.d.ts +0 -3
- package/src/command-line/nx-cloud/logout/command-object.d.ts.map +0 -1
- package/src/command-line/nx-cloud/logout/command-object.js +0 -15
- package/src/command-line/nx-cloud/logout/logout.d.ts +0 -5
- package/src/command-line/nx-cloud/logout/logout.d.ts.map +0 -1
- package/src/command-line/nx-cloud/polygraph/command-object.d.ts +0 -3
- package/src/command-line/nx-cloud/polygraph/command-object.d.ts.map +0 -1
- package/src/command-line/nx-cloud/polygraph/command-object.js +0 -15
- package/src/command-line/nx-cloud/polygraph/polygraph.d.ts +0 -5
- package/src/command-line/nx-cloud/polygraph/polygraph.d.ts.map +0 -1
- package/src/command-line/nx-cloud/polygraph/polygraph.js +0 -7
- package/src/command-line/nx-cloud/record/command-object.d.ts +0 -3
- package/src/command-line/nx-cloud/record/command-object.d.ts.map +0 -1
- package/src/command-line/nx-cloud/record/command-object.js +0 -18
- package/src/command-line/nx-cloud/record/record.d.ts +0 -6
- package/src/command-line/nx-cloud/record/record.d.ts.map +0 -1
- package/src/command-line/nx-cloud/start-agent/command-object.d.ts +0 -3
- package/src/command-line/nx-cloud/start-agent/command-object.d.ts.map +0 -1
- package/src/command-line/nx-cloud/start-agent/command-object.js +0 -15
- package/src/command-line/nx-cloud/start-agent/start-agent.d.ts +0 -5
- package/src/command-line/nx-cloud/start-agent/start-agent.d.ts.map +0 -1
- package/src/command-line/nx-cloud/start-ci-run/command-object.d.ts +0 -3
- package/src/command-line/nx-cloud/start-ci-run/command-object.d.ts.map +0 -1
- package/src/command-line/nx-cloud/start-ci-run/command-object.js +0 -15
- package/src/command-line/nx-cloud/start-ci-run/start-ci-run.d.ts +0 -5
- package/src/command-line/nx-cloud/start-ci-run/start-ci-run.d.ts.map +0 -1
- package/src/command-line/nx-cloud/utils.d.ts +0 -3
- package/src/command-line/nx-cloud/utils.d.ts.map +0 -1
- package/src/command-line/nx-commands.d.ts +0 -11
- package/src/command-line/nx-commands.d.ts.map +0 -1
- package/src/command-line/nx-commands.js +0 -171
- package/src/command-line/register/command-object.d.ts +0 -7
- package/src/command-line/register/command-object.d.ts.map +0 -1
- package/src/command-line/register/command-object.js +0 -26
- package/src/command-line/register/register.d.ts +0 -3
- package/src/command-line/register/register.d.ts.map +0 -1
- package/src/command-line/release/changelog/commit-utils.d.ts +0 -14
- package/src/command-line/release/changelog/commit-utils.d.ts.map +0 -1
- package/src/command-line/release/changelog/version-plan-filtering.d.ts +0 -42
- package/src/command-line/release/changelog/version-plan-filtering.d.ts.map +0 -1
- package/src/command-line/release/changelog/version-plan-filtering.js +0 -152
- package/src/command-line/release/changelog/version-plan-utils.d.ts +0 -32
- package/src/command-line/release/changelog/version-plan-utils.d.ts.map +0 -1
- package/src/command-line/release/changelog.d.ts +0 -22
- package/src/command-line/release/changelog.d.ts.map +0 -1
- package/src/command-line/release/changelog.js +0 -892
- package/src/command-line/release/command-object.d.ts +0 -85
- package/src/command-line/release/command-object.d.ts.map +0 -1
- package/src/command-line/release/command-object.js +0 -341
- package/src/command-line/release/config/config.d.ts +0 -74
- package/src/command-line/release/config/config.d.ts.map +0 -1
- package/src/command-line/release/config/config.js +0 -1172
- package/src/command-line/release/config/conventional-commits.d.ts +0 -3
- package/src/command-line/release/config/conventional-commits.d.ts.map +0 -1
- package/src/command-line/release/config/deep-merge-json.d.ts +0 -2
- package/src/command-line/release/config/deep-merge-json.d.ts.map +0 -1
- package/src/command-line/release/config/filter-release-groups.d.ts +0 -24
- package/src/command-line/release/config/filter-release-groups.d.ts.map +0 -1
- package/src/command-line/release/config/version-plans.d.ts +0 -43
- package/src/command-line/release/config/version-plans.d.ts.map +0 -1
- package/src/command-line/release/config/version-plans.js +0 -254
- package/src/command-line/release/index.d.ts +0 -50
- package/src/command-line/release/index.d.ts.map +0 -1
- package/src/command-line/release/plan-check.d.ts +0 -5
- package/src/command-line/release/plan-check.d.ts.map +0 -1
- package/src/command-line/release/plan.d.ts +0 -5
- package/src/command-line/release/plan.d.ts.map +0 -1
- package/src/command-line/release/publish.d.ts +0 -10
- package/src/command-line/release/publish.d.ts.map +0 -1
- package/src/command-line/release/release.d.ts +0 -6
- package/src/command-line/release/release.d.ts.map +0 -1
- package/src/command-line/release/release.js +0 -300
- package/src/command-line/release/utils/exec-command.d.ts +0 -2
- package/src/command-line/release/utils/exec-command.d.ts.map +0 -1
- package/src/command-line/release/utils/generate-version-plan-content.d.ts +0 -2
- package/src/command-line/release/utils/generate-version-plan-content.d.ts.map +0 -1
- package/src/command-line/release/utils/get-touched-projects-for-group.d.ts +0 -8
- package/src/command-line/release/utils/get-touched-projects-for-group.d.ts.map +0 -1
- package/src/command-line/release/utils/git.d.ts +0 -121
- package/src/command-line/release/utils/git.d.ts.map +0 -1
- package/src/command-line/release/utils/git.js +0 -560
- package/src/command-line/release/utils/launch-editor.d.ts +0 -2
- package/src/command-line/release/utils/launch-editor.d.ts.map +0 -1
- package/src/command-line/release/utils/markdown.d.ts +0 -7
- package/src/command-line/release/utils/markdown.d.ts.map +0 -1
- package/src/command-line/release/utils/print-changes.d.ts +0 -7
- package/src/command-line/release/utils/print-changes.d.ts.map +0 -1
- package/src/command-line/release/utils/print-changes.js +0 -62
- package/src/command-line/release/utils/print-config.d.ts +0 -8
- package/src/command-line/release/utils/print-config.d.ts.map +0 -1
- package/src/command-line/release/utils/release-graph.d.ts +0 -230
- package/src/command-line/release/utils/release-graph.d.ts.map +0 -1
- package/src/command-line/release/utils/release-graph.js +0 -700
- package/src/command-line/release/utils/remote-release-clients/extract-repo-slug.d.ts +0 -10
- package/src/command-line/release/utils/remote-release-clients/extract-repo-slug.d.ts.map +0 -1
- package/src/command-line/release/utils/remote-release-clients/github.d.ts +0 -59
- package/src/command-line/release/utils/remote-release-clients/github.d.ts.map +0 -1
- package/src/command-line/release/utils/remote-release-clients/github.js +0 -342
- package/src/command-line/release/utils/remote-release-clients/gitlab.d.ts +0 -63
- package/src/command-line/release/utils/remote-release-clients/gitlab.d.ts.map +0 -1
- package/src/command-line/release/utils/remote-release-clients/gitlab.js +0 -267
- package/src/command-line/release/utils/remote-release-clients/remote-release-client.d.ts +0 -112
- package/src/command-line/release/utils/remote-release-clients/remote-release-client.d.ts.map +0 -1
- package/src/command-line/release/utils/remote-release-clients/remote-release-client.js +0 -136
- package/src/command-line/release/utils/repository-git-tags.d.ts +0 -26
- package/src/command-line/release/utils/repository-git-tags.d.ts.map +0 -1
- package/src/command-line/release/utils/repository-git-tags.js +0 -125
- package/src/command-line/release/utils/resolve-changelog-renderer.d.ts +0 -3
- package/src/command-line/release/utils/resolve-changelog-renderer.d.ts.map +0 -1
- package/src/command-line/release/utils/resolve-changelog-renderer.js +0 -34
- package/src/command-line/release/utils/resolve-nx-json-error-message.d.ts +0 -2
- package/src/command-line/release/utils/resolve-nx-json-error-message.d.ts.map +0 -1
- package/src/command-line/release/utils/resolve-nx-json-error-message.js +0 -52
- package/src/command-line/release/utils/resolve-semver-specifier.d.ts +0 -8
- package/src/command-line/release/utils/resolve-semver-specifier.d.ts.map +0 -1
- package/src/command-line/release/utils/resolve-semver-specifier.js +0 -58
- package/src/command-line/release/utils/semver.d.ts +0 -27
- package/src/command-line/release/utils/semver.d.ts.map +0 -1
- package/src/command-line/release/utils/shared-legacy.d.ts +0 -26
- package/src/command-line/release/utils/shared-legacy.d.ts.map +0 -1
- package/src/command-line/release/utils/shared.d.ts +0 -65
- package/src/command-line/release/utils/shared.d.ts.map +0 -1
- package/src/command-line/release/utils/shared.js +0 -352
- package/src/command-line/release/utils/test/test-utils.d.ts +0 -21
- package/src/command-line/release/utils/test/test-utils.d.ts.map +0 -1
- package/src/command-line/release/utils/test/test-utils.js +0 -25
- package/src/command-line/release/utils/version-plan-utils.d.ts +0 -41
- package/src/command-line/release/utils/version-plan-utils.d.ts.map +0 -1
- package/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts +0 -9
- package/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts.map +0 -1
- package/src/command-line/release/version/derive-specifier-from-conventional-commits.js +0 -56
- package/src/command-line/release/version/deriver-specifier-from-version-plans.d.ts +0 -9
- package/src/command-line/release/version/deriver-specifier-from-version-plans.d.ts.map +0 -1
- package/src/command-line/release/version/project-logger.d.ts +0 -9
- package/src/command-line/release/version/project-logger.d.ts.map +0 -1
- package/src/command-line/release/version/project-logger.js +0 -46
- package/src/command-line/release/version/release-group-processor.d.ts +0 -108
- package/src/command-line/release/version/release-group-processor.d.ts.map +0 -1
- package/src/command-line/release/version/release-group-processor.js +0 -601
- package/src/command-line/release/version/resolve-current-version.d.ts +0 -33
- package/src/command-line/release/version/resolve-current-version.d.ts.map +0 -1
- package/src/command-line/release/version/resolve-current-version.js +0 -239
- package/src/command-line/release/version/test-utils.d.ts +0 -103
- package/src/command-line/release/version/test-utils.d.ts.map +0 -1
- package/src/command-line/release/version/test-utils.js +0 -426
- package/src/command-line/release/version/topological-sort.d.ts +0 -10
- package/src/command-line/release/version/topological-sort.d.ts.map +0 -1
- package/src/command-line/release/version/version-actions.d.ts +0 -200
- package/src/command-line/release/version/version-actions.d.ts.map +0 -1
- package/src/command-line/release/version/version-actions.js +0 -251
- package/src/command-line/release/version.d.ts +0 -26
- package/src/command-line/release/version.d.ts.map +0 -1
- package/src/command-line/release/version.js +0 -367
- package/src/command-line/repair/command-object.d.ts +0 -3
- package/src/command-line/repair/command-object.d.ts.map +0 -1
- package/src/command-line/repair/command-object.js +0 -20
- package/src/command-line/repair/repair.d.ts +0 -4
- package/src/command-line/repair/repair.d.ts.map +0 -1
- package/src/command-line/repair/repair.js +0 -41
- package/src/command-line/report/command-object.d.ts +0 -3
- package/src/command-line/report/command-object.d.ts.map +0 -1
- package/src/command-line/report/command-object.js +0 -11
- package/src/command-line/report/report.d.ts +0 -72
- package/src/command-line/report/report.d.ts.map +0 -1
- package/src/command-line/report/report.js +0 -405
- package/src/command-line/reset/command-object.d.ts +0 -9
- package/src/command-line/reset/command-object.d.ts.map +0 -1
- package/src/command-line/reset/command-object.js +0 -26
- package/src/command-line/reset/reset.d.ts +0 -3
- package/src/command-line/reset/reset.d.ts.map +0 -1
- package/src/command-line/reset/reset.js +0 -162
- package/src/command-line/run/command-object.d.ts +0 -7
- package/src/command-line/run/command-object.d.ts.map +0 -1
- package/src/command-line/run/command-object.js +0 -42
- package/src/command-line/run/executor-utils.d.ts +0 -13
- package/src/command-line/run/executor-utils.d.ts.map +0 -1
- package/src/command-line/run/run-one.d.ts +0 -18
- package/src/command-line/run/run-one.d.ts.map +0 -1
- package/src/command-line/run/run-one.js +0 -152
- package/src/command-line/run/run.d.ts +0 -52
- package/src/command-line/run/run.d.ts.map +0 -1
- package/src/command-line/run/run.js +0 -178
- package/src/command-line/run-many/command-object.d.ts +0 -3
- package/src/command-line/run-many/command-object.d.ts.map +0 -1
- package/src/command-line/run-many/command-object.js +0 -17
- package/src/command-line/run-many/run-many.d.ts +0 -11
- package/src/command-line/run-many/run-many.d.ts.map +0 -1
- package/src/command-line/show/command-object.d.ts +0 -41
- package/src/command-line/show/command-object.d.ts.map +0 -1
- package/src/command-line/show/command-object.js +0 -236
- package/src/command-line/show/project.d.ts +0 -3
- package/src/command-line/show/project.d.ts.map +0 -1
- package/src/command-line/show/projects.d.ts +0 -3
- package/src/command-line/show/projects.d.ts.map +0 -1
- package/src/command-line/show/target.d.ts +0 -5
- package/src/command-line/show/target.d.ts.map +0 -1
- package/src/command-line/show/target.js +0 -729
- package/src/command-line/sync/command-object.d.ts +0 -7
- package/src/command-line/sync/command-object.d.ts.map +0 -1
- package/src/command-line/sync/command-object.js +0 -20
- package/src/command-line/sync/sync.d.ts +0 -7
- package/src/command-line/sync/sync.d.ts.map +0 -1
- package/src/command-line/sync/sync.js +0 -119
- package/src/command-line/watch/command-object.d.ts +0 -3
- package/src/command-line/watch/command-object.d.ts.map +0 -1
- package/src/command-line/watch/command-object.js +0 -70
- package/src/command-line/watch/watch.d.ts +0 -25
- package/src/command-line/watch/watch.d.ts.map +0 -1
- package/src/command-line/watch/watch.js +0 -198
- package/src/command-line/yargs-utils/arguments-of.d.ts +0 -12
- package/src/command-line/yargs-utils/arguments-of.d.ts.map +0 -1
- package/src/command-line/yargs-utils/documentation.d.ts +0 -3
- package/src/command-line/yargs-utils/documentation.d.ts.map +0 -1
- package/src/command-line/yargs-utils/documentation.js +0 -11
- package/src/command-line/yargs-utils/shared-options.d.ts +0 -90
- package/src/command-line/yargs-utils/shared-options.d.ts.map +0 -1
- package/src/command-line/yargs-utils/shared-options.js +0 -384
- package/src/commands-runner/command-graph.d.ts +0 -14
- package/src/commands-runner/command-graph.d.ts.map +0 -1
- package/src/commands-runner/create-command-graph.d.ts +0 -5
- package/src/commands-runner/create-command-graph.d.ts.map +0 -1
- package/src/commands-runner/get-command-projects.d.ts +0 -4
- package/src/commands-runner/get-command-projects.d.ts.map +0 -1
- package/src/config/calculate-default-project-name.d.ts +0 -5
- package/src/config/calculate-default-project-name.d.ts.map +0 -1
- package/src/config/configuration.d.ts +0 -9
- package/src/config/configuration.d.ts.map +0 -1
- package/src/config/misc-interfaces.d.ts +0 -224
- package/src/config/misc-interfaces.d.ts.map +0 -1
- package/src/config/nx-json.d.ts +0 -850
- package/src/config/nx-json.d.ts.map +0 -1
- package/src/config/project-graph.d.ts +0 -138
- package/src/config/project-graph.d.ts.map +0 -1
- package/src/config/schema-utils.d.ts +0 -17
- package/src/config/schema-utils.d.ts.map +0 -1
- package/src/config/schema-utils.js +0 -125
- package/src/config/task-graph.d.ts +0 -110
- package/src/config/task-graph.d.ts.map +0 -1
- package/src/config/to-project-name.d.ts +0 -6
- package/src/config/to-project-name.d.ts.map +0 -1
- package/src/config/workspace-json-project-json.d.ts +0 -263
- package/src/config/workspace-json-project-json.d.ts.map +0 -1
- package/src/core/graph/main.js +0 -1
- package/src/core/graph/styles.css +0 -3
- package/src/core/graph/styles.js +0 -1
- package/src/daemon/cache.d.ts +0 -11
- package/src/daemon/cache.d.ts.map +0 -1
- package/src/daemon/client/client.d.ts +0 -111
- package/src/daemon/client/client.d.ts.map +0 -1
- package/src/daemon/client/client.js +0 -1023
- package/src/daemon/client/daemon-socket-messenger.d.ts +0 -16
- package/src/daemon/client/daemon-socket-messenger.d.ts.map +0 -1
- package/src/daemon/client/daemon-socket-messenger.js +0 -54
- package/src/daemon/client/exec-is-server-available.d.ts +0 -2
- package/src/daemon/client/exec-is-server-available.d.ts.map +0 -1
- package/src/daemon/client/exec-is-server-available.js +0 -11
- package/src/daemon/client/generate-help-output.d.ts +0 -2
- package/src/daemon/client/generate-help-output.d.ts.map +0 -1
- package/src/daemon/client/generate-help-output.js +0 -26
- package/src/daemon/is-nx-version-mismatch.d.ts +0 -3
- package/src/daemon/is-nx-version-mismatch.d.ts.map +0 -1
- package/src/daemon/is-nx-version-mismatch.js +0 -24
- package/src/daemon/is-on-daemon.d.ts +0 -2
- package/src/daemon/is-on-daemon.d.ts.map +0 -1
- package/src/daemon/is-v8-serializer-enabled.d.ts +0 -6
- package/src/daemon/is-v8-serializer-enabled.d.ts.map +0 -1
- package/src/daemon/logger.d.ts +0 -26
- package/src/daemon/logger.d.ts.map +0 -1
- package/src/daemon/logger.js +0 -65
- package/src/daemon/message-types/configure-ai-agents.d.ts +0 -21
- package/src/daemon/message-types/configure-ai-agents.d.ts.map +0 -1
- package/src/daemon/message-types/flush-sync-generator-changes-to-disk.d.ts +0 -7
- package/src/daemon/message-types/flush-sync-generator-changes-to-disk.d.ts.map +0 -1
- package/src/daemon/message-types/force-shutdown.d.ts +0 -6
- package/src/daemon/message-types/force-shutdown.d.ts.map +0 -1
- package/src/daemon/message-types/get-context-file-data.d.ts +0 -6
- package/src/daemon/message-types/get-context-file-data.d.ts.map +0 -1
- package/src/daemon/message-types/get-files-in-directory.d.ts +0 -7
- package/src/daemon/message-types/get-files-in-directory.d.ts.map +0 -1
- package/src/daemon/message-types/get-nx-workspace-files.d.ts +0 -7
- package/src/daemon/message-types/get-nx-workspace-files.d.ts.map +0 -1
- package/src/daemon/message-types/get-registered-sync-generators.d.ts +0 -6
- package/src/daemon/message-types/get-registered-sync-generators.d.ts.map +0 -1
- package/src/daemon/message-types/get-sync-generator-changes.d.ts +0 -7
- package/src/daemon/message-types/get-sync-generator-changes.d.ts.map +0 -1
- package/src/daemon/message-types/glob.d.ts +0 -15
- package/src/daemon/message-types/glob.d.ts.map +0 -1
- package/src/daemon/message-types/hash-glob.d.ts +0 -14
- package/src/daemon/message-types/hash-glob.d.ts.map +0 -1
- package/src/daemon/message-types/nx-console.d.ts +0 -18
- package/src/daemon/message-types/nx-console.d.ts.map +0 -1
- package/src/daemon/message-types/register-project-graph-listener.d.ts +0 -6
- package/src/daemon/message-types/register-project-graph-listener.d.ts.map +0 -1
- package/src/daemon/message-types/run-tasks-execution-hooks.d.ts +0 -14
- package/src/daemon/message-types/run-tasks-execution-hooks.d.ts.map +0 -1
- package/src/daemon/message-types/task-history.d.ts +0 -20
- package/src/daemon/message-types/task-history.d.ts.map +0 -1
- package/src/daemon/message-types/update-workspace-context.d.ts +0 -9
- package/src/daemon/message-types/update-workspace-context.d.ts.map +0 -1
- package/src/daemon/server/file-watching/changed-projects.d.ts +0 -11
- package/src/daemon/server/file-watching/changed-projects.d.ts.map +0 -1
- package/src/daemon/server/file-watching/changed-projects.js +0 -44
- package/src/daemon/server/file-watching/file-change-events.d.ts +0 -8
- package/src/daemon/server/file-watching/file-change-events.d.ts.map +0 -1
- package/src/daemon/server/file-watching/file-watcher-sockets.d.ts +0 -13
- package/src/daemon/server/file-watching/file-watcher-sockets.d.ts.map +0 -1
- package/src/daemon/server/file-watching/file-watcher-sockets.js +0 -66
- package/src/daemon/server/handle-configure-ai-agents.d.ts +0 -4
- package/src/daemon/server/handle-configure-ai-agents.d.ts.map +0 -1
- package/src/daemon/server/handle-configure-ai-agents.js +0 -101
- package/src/daemon/server/handle-context-file-data.d.ts +0 -3
- package/src/daemon/server/handle-context-file-data.d.ts.map +0 -1
- package/src/daemon/server/handle-flush-sync-generator-changes-to-disk.d.ts +0 -3
- package/src/daemon/server/handle-flush-sync-generator-changes-to-disk.d.ts.map +0 -1
- package/src/daemon/server/handle-force-shutdown.d.ts +0 -6
- package/src/daemon/server/handle-force-shutdown.d.ts.map +0 -1
- package/src/daemon/server/handle-get-files-in-directory.d.ts +0 -3
- package/src/daemon/server/handle-get-files-in-directory.d.ts.map +0 -1
- package/src/daemon/server/handle-get-registered-sync-generators.d.ts +0 -3
- package/src/daemon/server/handle-get-registered-sync-generators.d.ts.map +0 -1
- package/src/daemon/server/handle-get-sync-generator-changes.d.ts +0 -3
- package/src/daemon/server/handle-get-sync-generator-changes.d.ts.map +0 -1
- package/src/daemon/server/handle-glob.d.ts +0 -4
- package/src/daemon/server/handle-glob.d.ts.map +0 -1
- package/src/daemon/server/handle-hash-glob.d.ts +0 -4
- package/src/daemon/server/handle-hash-glob.d.ts.map +0 -1
- package/src/daemon/server/handle-hash-tasks.d.ts +0 -13
- package/src/daemon/server/handle-hash-tasks.d.ts.map +0 -1
- package/src/daemon/server/handle-hash-tasks.js +0 -28
- package/src/daemon/server/handle-nx-console.d.ts +0 -4
- package/src/daemon/server/handle-nx-console.d.ts.map +0 -1
- package/src/daemon/server/handle-nx-workspace-files.d.ts +0 -3
- package/src/daemon/server/handle-nx-workspace-files.d.ts.map +0 -1
- package/src/daemon/server/handle-outputs-tracking.d.ts +0 -16
- package/src/daemon/server/handle-outputs-tracking.d.ts.map +0 -1
- package/src/daemon/server/handle-outputs-tracking.js +0 -35
- package/src/daemon/server/handle-process-in-background.d.ts +0 -7
- package/src/daemon/server/handle-process-in-background.d.ts.map +0 -1
- package/src/daemon/server/handle-request-project-graph.d.ts +0 -3
- package/src/daemon/server/handle-request-project-graph.d.ts.map +0 -1
- package/src/daemon/server/handle-request-project-graph.js +0 -36
- package/src/daemon/server/handle-request-shutdown.d.ts +0 -6
- package/src/daemon/server/handle-request-shutdown.d.ts.map +0 -1
- package/src/daemon/server/handle-task-history.d.ts +0 -14
- package/src/daemon/server/handle-task-history.d.ts.map +0 -1
- package/src/daemon/server/handle-tasks-execution-hooks.d.ts +0 -20
- package/src/daemon/server/handle-tasks-execution-hooks.d.ts.map +0 -1
- package/src/daemon/server/handle-update-workspace-context.d.ts +0 -3
- package/src/daemon/server/handle-update-workspace-context.d.ts.map +0 -1
- package/src/daemon/server/handle-update-workspace-context.js +0 -11
- package/src/daemon/server/latest-nx.d.ts +0 -11
- package/src/daemon/server/latest-nx.d.ts.map +0 -1
- package/src/daemon/server/latest-nx.js +0 -49
- package/src/daemon/server/nx-console-operations.d.ts +0 -27
- package/src/daemon/server/nx-console-operations.d.ts.map +0 -1
- package/src/daemon/server/nx-console-operations.js +0 -96
- package/src/daemon/server/outputs-tracking.d.ts +0 -9
- package/src/daemon/server/outputs-tracking.d.ts.map +0 -1
- package/src/daemon/server/outputs-tracking.js +0 -93
- package/src/daemon/server/project-graph-incremental-recomputation.d.ts +0 -28
- package/src/daemon/server/project-graph-incremental-recomputation.d.ts.map +0 -1
- package/src/daemon/server/project-graph-incremental-recomputation.js +0 -381
- package/src/daemon/server/project-graph-listener-sockets.d.ts +0 -8
- package/src/daemon/server/project-graph-listener-sockets.d.ts.map +0 -1
- package/src/daemon/server/server.d.ts +0 -11
- package/src/daemon/server/server.d.ts.map +0 -1
- package/src/daemon/server/server.js +0 -470
- package/src/daemon/server/shutdown-utils.d.ts +0 -19
- package/src/daemon/server/shutdown-utils.d.ts.map +0 -1
- package/src/daemon/server/shutdown-utils.js +0 -154
- package/src/daemon/server/start.d.ts +0 -2
- package/src/daemon/server/start.d.ts.map +0 -1
- package/src/daemon/server/start.js +0 -17
- package/src/daemon/server/sync-generators.d.ts +0 -15
- package/src/daemon/server/sync-generators.d.ts.map +0 -1
- package/src/daemon/server/watcher.d.ts +0 -12
- package/src/daemon/server/watcher.d.ts.map +0 -1
- package/src/daemon/server/watcher.js +0 -97
- package/src/daemon/socket-utils.d.ts +0 -24
- package/src/daemon/socket-utils.d.ts.map +0 -1
- package/src/daemon/tmp-dir.d.ts +0 -13
- package/src/daemon/tmp-dir.d.ts.map +0 -1
- package/src/devkit-exports.d.ts +0 -140
- package/src/devkit-exports.d.ts.map +0 -1
- package/src/devkit-exports.js +0 -140
- package/src/devkit-internals.d.ts +0 -35
- package/src/devkit-internals.d.ts.map +0 -1
- package/src/devkit-internals.js +0 -73
- package/src/devkit-testing-exports.d.ts +0 -3
- package/src/devkit-testing-exports.d.ts.map +0 -1
- package/src/executors/noop/noop.impl.d.ts +0 -4
- package/src/executors/noop/noop.impl.d.ts.map +0 -1
- package/src/executors/noop/schema.json +0 -10
- package/src/executors/run-commands/run-commands.impl.d.ts +0 -60
- package/src/executors/run-commands/run-commands.impl.d.ts.map +0 -1
- package/src/executors/run-commands/run-commands.impl.js +0 -300
- package/src/executors/run-commands/running-tasks.d.ts +0 -46
- package/src/executors/run-commands/running-tasks.d.ts.map +0 -1
- package/src/executors/run-commands/running-tasks.js +0 -498
- package/src/executors/run-commands/schema.json +0 -198
- package/src/executors/run-script/run-script.impl.d.ts +0 -9
- package/src/executors/run-script/run-script.impl.d.ts.map +0 -1
- package/src/executors/run-script/run-script.impl.js +0 -84
- package/src/executors/run-script/schema.json +0 -28
- package/src/executors/utils/convert-nx-executor.d.ts +0 -11
- package/src/executors/utils/convert-nx-executor.d.ts.map +0 -1
- package/src/executors/utils/convert-nx-executor.js +0 -83
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.d.ts +0 -20
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.d.ts.map +0 -1
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +0 -80
- package/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +0 -12
- package/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts.map +0 -1
- package/src/generators/testing-utils/create-tree.d.ts +0 -6
- package/src/generators/testing-utils/create-tree.d.ts.map +0 -1
- package/src/generators/tree.d.ts +0 -126
- package/src/generators/tree.d.ts.map +0 -1
- package/src/generators/tree.js +0 -309
- package/src/generators/utils/generate-files.d.ts +0 -45
- package/src/generators/utils/generate-files.d.ts.map +0 -1
- package/src/generators/utils/generate-files.js +0 -113
- package/src/generators/utils/glob.d.ts +0 -23
- package/src/generators/utils/glob.d.ts.map +0 -1
- package/src/generators/utils/json.d.ts +0 -29
- package/src/generators/utils/json.d.ts.map +0 -1
- package/src/generators/utils/nx-json.d.ts +0 -11
- package/src/generators/utils/nx-json.d.ts.map +0 -1
- package/src/generators/utils/project-configuration.d.ts +0 -43
- package/src/generators/utils/project-configuration.d.ts.map +0 -1
- package/src/generators/utils/project-configuration.js +0 -307
- package/src/hasher/create-task-hasher.d.ts +0 -5
- package/src/hasher/create-task-hasher.d.ts.map +0 -1
- package/src/hasher/create-task-hasher.js +0 -15
- package/src/hasher/file-hasher.d.ts +0 -4
- package/src/hasher/file-hasher.d.ts.map +0 -1
- package/src/hasher/hash-plan-inspector.d.ts +0 -34
- package/src/hasher/hash-plan-inspector.d.ts.map +0 -1
- package/src/hasher/hash-task.d.ts +0 -10
- package/src/hasher/hash-task.d.ts.map +0 -1
- package/src/hasher/hash-task.js +0 -164
- package/src/hasher/native-task-hasher-impl.d.ts +0 -19
- package/src/hasher/native-task-hasher-impl.d.ts.map +0 -1
- package/src/hasher/native-task-hasher-impl.js +0 -40
- package/src/hasher/task-hasher.d.ts +0 -150
- package/src/hasher/task-hasher.d.ts.map +0 -1
- package/src/hasher/task-hasher.js +0 -270
- package/src/index.d.ts +0 -2
- package/src/index.d.ts.map +0 -1
- package/src/index.js +0 -5
- package/src/migrations/update-15-0-0/prefix-outputs.d.ts +0 -3
- package/src/migrations/update-15-0-0/prefix-outputs.d.ts.map +0 -1
- 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 -3
- package/src/migrations/update-16-0-0/remove-nrwl-cli.d.ts.map +0 -1
- package/src/migrations/update-16-0-0/update-depends-on-to-tokens.d.ts +0 -3
- package/src/migrations/update-16-0-0/update-depends-on-to-tokens.d.ts.map +0 -1
- 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 -3
- package/src/migrations/update-16-0-0/update-nx-cloud-runner.d.ts.map +0 -1
- package/src/migrations/update-16-2-0/remove-run-commands-output-path.d.ts +0 -3
- package/src/migrations/update-16-2-0/remove-run-commands-output-path.d.ts.map +0 -1
- 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 -13
- package/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.d.ts.map +0 -1
- package/src/migrations/update-17-0-0/move-cache-directory.d.ts +0 -3
- package/src/migrations/update-17-0-0/move-cache-directory.d.ts.map +0 -1
- package/src/migrations/update-17-0-0/rm-default-collection-npm-scope.d.ts +0 -3
- package/src/migrations/update-17-0-0/rm-default-collection-npm-scope.d.ts.map +0 -1
- package/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.d.ts +0 -3
- package/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.d.ts.map +0 -1
- package/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +0 -122
- package/src/migrations/update-17-2-0/move-default-base.d.ts +0 -6
- package/src/migrations/update-17-2-0/move-default-base.d.ts.map +0 -1
- package/src/migrations/update-17-2-0/move-default-base.js +0 -21
- package/src/migrations/update-17-3-0/nx-release-path.d.ts +0 -4
- package/src/migrations/update-17-3-0/nx-release-path.d.ts.map +0 -1
- package/src/migrations/update-17-3-0/update-nxw.d.ts +0 -3
- package/src/migrations/update-17-3-0/update-nxw.d.ts.map +0 -1
- package/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.d.ts +0 -3
- package/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.d.ts.map +0 -1
- package/src/migrations/update-19-2-0/move-workspace-data-directory.d.ts +0 -5
- package/src/migrations/update-19-2-0/move-workspace-data-directory.d.ts.map +0 -1
- package/src/migrations/update-19-2-4/set-project-name.d.ts +0 -3
- package/src/migrations/update-19-2-4/set-project-name.d.ts.map +0 -1
- package/src/migrations/update-20-0-0/move-use-daemon-process.d.ts +0 -3
- package/src/migrations/update-20-0-0/move-use-daemon-process.d.ts.map +0 -1
- package/src/migrations/update-20-0-1/use-legacy-cache.d.ts +0 -3
- package/src/migrations/update-20-0-1/use-legacy-cache.d.ts.map +0 -1
- package/src/migrations/update-21-0-0/release-changelog-config-changes.d.ts +0 -3
- package/src/migrations/update-21-0-0/release-changelog-config-changes.d.ts.map +0 -1
- package/src/migrations/update-21-0-0/release-version-config-changes.d.ts +0 -3
- package/src/migrations/update-21-0-0/release-version-config-changes.d.ts.map +0 -1
- package/src/migrations/update-21-0-0/remove-custom-tasks-runner.d.ts +0 -3
- package/src/migrations/update-21-0-0/remove-custom-tasks-runner.d.ts.map +0 -1
- package/src/migrations/update-21-0-0/remove-legacy-cache.d.ts +0 -3
- package/src/migrations/update-21-0-0/remove-legacy-cache.d.ts.map +0 -1
- package/src/migrations/update-22-0-0/consolidate-release-tag-config.d.ts +0 -3
- package/src/migrations/update-22-0-0/consolidate-release-tag-config.d.ts.map +0 -1
- package/src/migrations/update-22-0-0/release-version-config-changes.d.ts +0 -3
- package/src/migrations/update-22-0-0/release-version-config-changes.d.ts.map +0 -1
- package/src/migrations/update-22-1-0/update-nx-wrapper.d.ts +0 -3
- package/src/migrations/update-22-1-0/update-nx-wrapper.d.ts.map +0 -1
- package/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.d.ts +0 -3
- package/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.d.ts.map +0 -1
- package/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.d.ts +0 -3
- package/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.d.ts.map +0 -1
- package/src/migrations/update-22-6-0/enable-analytics-prompt.d.ts +0 -3
- package/src/migrations/update-22-6-0/enable-analytics-prompt.d.ts.map +0 -1
- package/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.d.ts +0 -3
- package/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.d.ts.map +0 -1
- package/src/native/assert-supported-platform.d.ts +0 -2
- package/src/native/assert-supported-platform.d.ts.map +0 -1
- package/src/native/index.d.ts +0 -619
- package/src/native/native-bindings.js +0 -634
- package/src/native/native-file-cache-location.d.ts +0 -2
- package/src/native/native-file-cache-location.d.ts.map +0 -1
- package/src/native/nx.wasi-browser.js +0 -132
- package/src/native/nx.wasi.cjs +0 -163
- package/src/native/nx.wasm32-wasi.debug.wasm +0 -0
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/native/tests/__fixtures__/file-lock.fixture.js +0 -20
- package/src/native/transform-objects.d.ts +0 -4
- package/src/native/transform-objects.d.ts.map +0 -1
- package/src/native/wasi-worker-browser.mjs +0 -32
- package/src/nx-cloud/debug-logger.d.ts +0 -2
- package/src/nx-cloud/debug-logger.d.ts.map +0 -1
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts +0 -15
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts.map +0 -1
- package/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +0 -41
- package/src/nx-cloud/models/onboarding-status.d.ts +0 -2
- package/src/nx-cloud/models/onboarding-status.d.ts.map +0 -1
- package/src/nx-cloud/nx-cloud-tasks-runner-shell.d.ts +0 -17
- package/src/nx-cloud/nx-cloud-tasks-runner-shell.d.ts.map +0 -1
- package/src/nx-cloud/resolution-helpers.d.ts +0 -2
- package/src/nx-cloud/resolution-helpers.d.ts.map +0 -1
- package/src/nx-cloud/update-manager.d.ts +0 -24
- package/src/nx-cloud/update-manager.d.ts.map +0 -1
- package/src/nx-cloud/update-manager.js +0 -266
- package/src/nx-cloud/utilities/axios.d.ts +0 -5
- package/src/nx-cloud/utilities/axios.d.ts.map +0 -1
- package/src/nx-cloud/utilities/client.d.ts +0 -11
- package/src/nx-cloud/utilities/client.d.ts.map +0 -1
- package/src/nx-cloud/utilities/environment.d.ts +0 -4
- package/src/nx-cloud/utilities/environment.d.ts.map +0 -1
- package/src/nx-cloud/utilities/environment.js +0 -47
- package/src/nx-cloud/utilities/get-cloud-options.d.ts +0 -6
- package/src/nx-cloud/utilities/get-cloud-options.d.ts.map +0 -1
- package/src/nx-cloud/utilities/is-workspace-claimed.d.ts +0 -2
- package/src/nx-cloud/utilities/is-workspace-claimed.d.ts.map +0 -1
- package/src/nx-cloud/utilities/onboarding.d.ts +0 -6
- package/src/nx-cloud/utilities/onboarding.d.ts.map +0 -1
- package/src/nx-cloud/utilities/url-shorten.d.ts +0 -6
- package/src/nx-cloud/utilities/url-shorten.d.ts.map +0 -1
- package/src/plugins/js/hasher/hasher.d.ts +0 -6
- package/src/plugins/js/hasher/hasher.d.ts.map +0 -1
- package/src/plugins/js/index.d.ts +0 -5
- package/src/plugins/js/index.d.ts.map +0 -1
- package/src/plugins/js/index.js +0 -201
- package/src/plugins/js/lock-file/bun-parser.d.ts +0 -15
- package/src/plugins/js/lock-file/bun-parser.d.ts.map +0 -1
- package/src/plugins/js/lock-file/bun-parser.js +0 -936
- package/src/plugins/js/lock-file/lock-file.d.ts +0 -39
- package/src/plugins/js/lock-file/lock-file.d.ts.map +0 -1
- package/src/plugins/js/lock-file/lock-file.js +0 -255
- package/src/plugins/js/lock-file/npm-parser.d.ts +0 -11
- package/src/plugins/js/lock-file/npm-parser.d.ts.map +0 -1
- package/src/plugins/js/lock-file/npm-parser.js +0 -514
- package/src/plugins/js/lock-file/pnpm-parser.d.ts +0 -11
- package/src/plugins/js/lock-file/pnpm-parser.d.ts.map +0 -1
- package/src/plugins/js/lock-file/pnpm-parser.js +0 -613
- package/src/plugins/js/lock-file/project-graph-pruning.d.ts +0 -12
- package/src/plugins/js/lock-file/project-graph-pruning.d.ts.map +0 -1
- package/src/plugins/js/lock-file/project-graph-pruning.js +0 -202
- package/src/plugins/js/lock-file/utils/package-json.d.ts +0 -11
- package/src/plugins/js/lock-file/utils/package-json.d.ts.map +0 -1
- package/src/plugins/js/lock-file/utils/package-json.js +0 -36
- package/src/plugins/js/lock-file/utils/pnpm-normalizer.d.ts +0 -21
- package/src/plugins/js/lock-file/utils/pnpm-normalizer.d.ts.map +0 -1
- package/src/plugins/js/lock-file/utils/pnpm-normalizer.js +0 -855
- package/src/plugins/js/lock-file/yarn-parser.d.ts +0 -11
- package/src/plugins/js/lock-file/yarn-parser.d.ts.map +0 -1
- package/src/plugins/js/lock-file/yarn-parser.js +0 -509
- package/src/plugins/js/package-json/create-package-json.d.ts +0 -30
- package/src/plugins/js/package-json/create-package-json.d.ts.map +0 -1
- package/src/plugins/js/package-json/create-package-json.js +0 -261
- package/src/plugins/js/project-graph/affected/lock-file-changes.d.ts +0 -6
- package/src/plugins/js/project-graph/affected/lock-file-changes.d.ts.map +0 -1
- package/src/plugins/js/project-graph/affected/lock-file-changes.js +0 -72
- package/src/plugins/js/project-graph/affected/npm-packages.d.ts +0 -5
- package/src/plugins/js/project-graph/affected/npm-packages.d.ts.map +0 -1
- package/src/plugins/js/project-graph/affected/touched-projects.d.ts +0 -3
- package/src/plugins/js/project-graph/affected/touched-projects.d.ts.map +0 -1
- package/src/plugins/js/project-graph/affected/tsconfig-json-changes.d.ts +0 -5
- package/src/plugins/js/project-graph/affected/tsconfig-json-changes.d.ts.map +0 -1
- package/src/plugins/js/project-graph/affected/tsconfig-json-changes.js +0 -63
- package/src/plugins/js/project-graph/build-dependencies/build-dependencies.d.ts +0 -7
- package/src/plugins/js/project-graph/build-dependencies/build-dependencies.d.ts.map +0 -1
- package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts +0 -5
- package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts.map +0 -1
- package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +0 -86
- package/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.d.ts +0 -5
- package/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.d.ts.map +0 -1
- package/src/plugins/js/project-graph/build-dependencies/strip-source-code.d.ts +0 -8
- package/src/plugins/js/project-graph/build-dependencies/strip-source-code.d.ts.map +0 -1
- package/src/plugins/js/project-graph/build-dependencies/strip-source-code.js +0 -155
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts +0 -75
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts.map +0 -1
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +0 -429
- package/src/plugins/js/project-graph/build-dependencies/typescript-import-locator.d.ts +0 -17
- package/src/plugins/js/project-graph/build-dependencies/typescript-import-locator.d.ts.map +0 -1
- package/src/plugins/js/project-graph/build-dependencies/typescript-import-locator.js +0 -120
- package/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.d.ts +0 -3
- package/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.d.ts.map +0 -1
- package/src/plugins/js/utils/config.d.ts +0 -3
- package/src/plugins/js/utils/config.d.ts.map +0 -1
- package/src/plugins/js/utils/get-workspace-packages-from-graph.d.ts +0 -3
- package/src/plugins/js/utils/get-workspace-packages-from-graph.d.ts.map +0 -1
- package/src/plugins/js/utils/packages.d.ts +0 -9
- package/src/plugins/js/utils/packages.d.ts.map +0 -1
- package/src/plugins/js/utils/packages.js +0 -91
- package/src/plugins/js/utils/register.d.ts +0 -160
- package/src/plugins/js/utils/register.d.ts.map +0 -1
- package/src/plugins/js/utils/register.js +0 -406
- package/src/plugins/js/utils/resolve-relative-to-dir.d.ts +0 -6
- package/src/plugins/js/utils/resolve-relative-to-dir.d.ts.map +0 -1
- package/src/plugins/js/utils/typescript.d.ts +0 -17
- package/src/plugins/js/utils/typescript.d.ts.map +0 -1
- package/src/plugins/js/utils/typescript.js +0 -103
- package/src/plugins/js/versions.d.ts +0 -2
- package/src/plugins/js/versions.d.ts.map +0 -1
- package/src/plugins/js/versions.js +0 -4
- package/src/plugins/package-json/create-nodes.d.ts +0 -28
- package/src/plugins/package-json/create-nodes.d.ts.map +0 -1
- package/src/plugins/package-json/create-nodes.js +0 -239
- package/src/plugins/package-json/index.d.ts +0 -3
- package/src/plugins/package-json/index.d.ts.map +0 -1
- package/src/plugins/project-json/build-nodes/project-json.d.ts +0 -6
- package/src/plugins/project-json/build-nodes/project-json.d.ts.map +0 -1
- package/src/plugins/project-json/build-nodes/project-json.js +0 -33
- package/src/project-graph/affected/affected-project-graph-models.d.ts +0 -12
- package/src/project-graph/affected/affected-project-graph-models.d.ts.map +0 -1
- package/src/project-graph/affected/affected-project-graph.d.ts +0 -5
- package/src/project-graph/affected/affected-project-graph.d.ts.map +0 -1
- package/src/project-graph/affected/locators/project-glob-changes.d.ts +0 -3
- package/src/project-graph/affected/locators/project-glob-changes.d.ts.map +0 -1
- package/src/project-graph/affected/locators/project-glob-changes.js +0 -43
- package/src/project-graph/affected/locators/workspace-json-changes.d.ts +0 -5
- package/src/project-graph/affected/locators/workspace-json-changes.d.ts.map +0 -1
- package/src/project-graph/affected/locators/workspace-projects.d.ts +0 -4
- package/src/project-graph/affected/locators/workspace-projects.d.ts.map +0 -1
- package/src/project-graph/build-project-graph.d.ts +0 -24
- package/src/project-graph/build-project-graph.d.ts.map +0 -1
- package/src/project-graph/build-project-graph.js +0 -326
- package/src/project-graph/error-types.d.ts +0 -141
- package/src/project-graph/error-types.d.ts.map +0 -1
- package/src/project-graph/error-types.js +0 -399
- package/src/project-graph/file-map-utils.d.ts +0 -16
- package/src/project-graph/file-map-utils.d.ts.map +0 -1
- package/src/project-graph/file-map-utils.js +0 -55
- package/src/project-graph/file-utils.d.ts +0 -25
- package/src/project-graph/file-utils.d.ts.map +0 -1
- package/src/project-graph/file-utils.js +0 -114
- package/src/project-graph/nx-deps-cache.d.ts +0 -63
- package/src/project-graph/nx-deps-cache.d.ts.map +0 -1
- package/src/project-graph/operators.d.ts +0 -13
- package/src/project-graph/operators.d.ts.map +0 -1
- package/src/project-graph/operators.js +0 -114
- package/src/project-graph/plugins/get-plugins.d.ts +0 -5
- package/src/project-graph/plugins/get-plugins.d.ts.map +0 -1
- package/src/project-graph/plugins/get-plugins.js +0 -216
- package/src/project-graph/plugins/in-process-loader.d.ts +0 -11
- package/src/project-graph/plugins/in-process-loader.d.ts.map +0 -1
- package/src/project-graph/plugins/in-process-loader.js +0 -60
- package/src/project-graph/plugins/index.d.ts +0 -5
- package/src/project-graph/plugins/index.d.ts.map +0 -1
- package/src/project-graph/plugins/isolation/enabled.d.ts +0 -2
- package/src/project-graph/plugins/isolation/enabled.d.ts.map +0 -1
- package/src/project-graph/plugins/isolation/index.d.ts +0 -2
- package/src/project-graph/plugins/isolation/index.d.ts.map +0 -1
- package/src/project-graph/plugins/isolation/isolated-plugin.d.ts +0 -62
- package/src/project-graph/plugins/isolation/isolated-plugin.d.ts.map +0 -1
- package/src/project-graph/plugins/isolation/isolated-plugin.js +0 -441
- package/src/project-graph/plugins/isolation/load-isolated-plugin.d.ts +0 -4
- package/src/project-graph/plugins/isolation/load-isolated-plugin.d.ts.map +0 -1
- package/src/project-graph/plugins/isolation/message-types.d.ts +0 -60
- package/src/project-graph/plugins/isolation/message-types.d.ts.map +0 -1
- package/src/project-graph/plugins/isolation/messaging.d.ts +0 -127
- package/src/project-graph/plugins/isolation/messaging.d.ts.map +0 -1
- package/src/project-graph/plugins/isolation/messaging.js +0 -71
- package/src/project-graph/plugins/isolation/plugin-lifecycle-manager.d.ts +0 -83
- package/src/project-graph/plugins/isolation/plugin-lifecycle-manager.d.ts.map +0 -1
- package/src/project-graph/plugins/isolation/plugin-worker.d.ts +0 -2
- package/src/project-graph/plugins/isolation/plugin-worker.d.ts.map +0 -1
- package/src/project-graph/plugins/isolation/plugin-worker.js +0 -182
- package/src/project-graph/plugins/load-resolved-plugin.d.ts +0 -4
- package/src/project-graph/plugins/load-resolved-plugin.d.ts.map +0 -1
- package/src/project-graph/plugins/load-resolved-plugin.js +0 -22
- package/src/project-graph/plugins/loaded-nx-plugin.d.ts +0 -36
- package/src/project-graph/plugins/loaded-nx-plugin.d.ts.map +0 -1
- package/src/project-graph/plugins/loaded-nx-plugin.js +0 -101
- package/src/project-graph/plugins/public-api.d.ts +0 -121
- package/src/project-graph/plugins/public-api.d.ts.map +0 -1
- package/src/project-graph/plugins/resolve-plugin.d.ts +0 -16
- package/src/project-graph/plugins/resolve-plugin.d.ts.map +0 -1
- package/src/project-graph/plugins/resolve-plugin.js +0 -136
- package/src/project-graph/plugins/tasks-execution-hooks.d.ts +0 -4
- package/src/project-graph/plugins/tasks-execution-hooks.d.ts.map +0 -1
- package/src/project-graph/plugins/tasks-execution-hooks.js +0 -65
- package/src/project-graph/plugins/transpiler.d.ts +0 -9
- package/src/project-graph/plugins/transpiler.d.ts.map +0 -1
- package/src/project-graph/plugins/transpiler.js +0 -47
- package/src/project-graph/plugins/utils.d.ts +0 -5
- package/src/project-graph/plugins/utils.d.ts.map +0 -1
- package/src/project-graph/plugins/utils.js +0 -26
- package/src/project-graph/project-graph-builder.d.ts +0 -134
- package/src/project-graph/project-graph-builder.d.ts.map +0 -1
- package/src/project-graph/project-graph-builder.js +0 -379
- package/src/project-graph/project-graph.d.ts +0 -55
- package/src/project-graph/project-graph.d.ts.map +0 -1
- package/src/project-graph/project-graph.js +0 -410
- package/src/project-graph/utils/build-all-workspace-files.d.ts +0 -3
- package/src/project-graph/utils/build-all-workspace-files.d.ts.map +0 -1
- package/src/project-graph/utils/find-project-for-path.d.ts +0 -21
- package/src/project-graph/utils/find-project-for-path.d.ts.map +0 -1
- package/src/project-graph/utils/implicit-project-dependencies.d.ts +0 -4
- package/src/project-graph/utils/implicit-project-dependencies.d.ts.map +0 -1
- package/src/project-graph/utils/normalize-project-nodes.d.ts +0 -7
- package/src/project-graph/utils/normalize-project-nodes.d.ts.map +0 -1
- package/src/project-graph/utils/project-configuration/name-substitution-manager.d.ts +0 -75
- package/src/project-graph/utils/project-configuration/name-substitution-manager.d.ts.map +0 -1
- package/src/project-graph/utils/project-configuration/name-substitution-manager.js +0 -469
- package/src/project-graph/utils/project-configuration/project-nodes-manager.d.ts +0 -40
- package/src/project-graph/utils/project-configuration/project-nodes-manager.d.ts.map +0 -1
- package/src/project-graph/utils/project-configuration/project-nodes-manager.js +0 -264
- package/src/project-graph/utils/project-configuration/source-maps.d.ts +0 -70
- package/src/project-graph/utils/project-configuration/source-maps.d.ts.map +0 -1
- package/src/project-graph/utils/project-configuration/source-maps.js +0 -94
- package/src/project-graph/utils/project-configuration/target-merging.d.ts +0 -32
- package/src/project-graph/utils/project-configuration/target-merging.d.ts.map +0 -1
- package/src/project-graph/utils/project-configuration/target-merging.js +0 -332
- package/src/project-graph/utils/project-configuration/target-normalization.d.ts +0 -13
- package/src/project-graph/utils/project-configuration/target-normalization.d.ts.map +0 -1
- package/src/project-graph/utils/project-configuration/target-normalization.js +0 -177
- package/src/project-graph/utils/project-configuration-utils.d.ts +0 -52
- package/src/project-graph/utils/project-configuration-utils.d.ts.map +0 -1
- package/src/project-graph/utils/project-configuration-utils.js +0 -248
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +0 -27
- package/src/project-graph/utils/retrieve-workspace-files.d.ts.map +0 -1
- package/src/project-graph/utils/retrieve-workspace-files.js +0 -82
- package/src/tasks-runner/batch/batch-messages.d.ts +0 -36
- package/src/tasks-runner/batch/batch-messages.d.ts.map +0 -1
- package/src/tasks-runner/batch/run-batch.d.ts +0 -2
- package/src/tasks-runner/batch/run-batch.d.ts.map +0 -1
- package/src/tasks-runner/batch/run-batch.js +0 -75
- package/src/tasks-runner/cache.d.ts +0 -89
- package/src/tasks-runner/cache.d.ts.map +0 -1
- package/src/tasks-runner/cache.js +0 -538
- package/src/tasks-runner/create-task-graph.d.ts +0 -43
- package/src/tasks-runner/create-task-graph.d.ts.map +0 -1
- package/src/tasks-runner/create-task-graph.js +0 -313
- package/src/tasks-runner/default-tasks-runner.d.ts +0 -28
- package/src/tasks-runner/default-tasks-runner.d.ts.map +0 -1
- package/src/tasks-runner/default-tasks-runner.js +0 -71
- package/src/tasks-runner/fork.d.ts +0 -2
- package/src/tasks-runner/fork.d.ts.map +0 -1
- package/src/tasks-runner/forked-process-task-runner.d.ts +0 -43
- package/src/tasks-runner/forked-process-task-runner.d.ts.map +0 -1
- package/src/tasks-runner/forked-process-task-runner.js +0 -294
- package/src/tasks-runner/init-tasks-runner.d.ts +0 -23
- package/src/tasks-runner/init-tasks-runner.d.ts.map +0 -1
- package/src/tasks-runner/init-tasks-runner.js +0 -143
- package/src/tasks-runner/is-tui-enabled.d.ts +0 -19
- package/src/tasks-runner/is-tui-enabled.d.ts.map +0 -1
- package/src/tasks-runner/life-cycle.d.ts +0 -76
- package/src/tasks-runner/life-cycle.d.ts.map +0 -1
- package/src/tasks-runner/life-cycle.js +0 -141
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.d.ts +0 -26
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +0 -364
- package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.d.ts +0 -25
- package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +0 -236
- package/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.d.ts +0 -6
- package/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/formatting-utils.d.ts +0 -4
- package/src/tasks-runner/life-cycles/formatting-utils.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.d.ts +0 -14
- package/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.js +0 -67
- package/src/tasks-runner/life-cycles/pretty-time.d.ts +0 -5
- package/src/tasks-runner/life-cycles/pretty-time.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.d.ts +0 -30
- package/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.d.ts +0 -29
- package/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/store-run-information-life-cycle.d.ts +0 -18
- package/src/tasks-runner/life-cycles/store-run-information-life-cycle.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/task-history-life-cycle-old.d.ts +0 -12
- package/src/tasks-runner/life-cycles/task-history-life-cycle-old.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/task-history-life-cycle-old.js +0 -80
- package/src/tasks-runner/life-cycles/task-history-life-cycle.d.ts +0 -17
- package/src/tasks-runner/life-cycles/task-history-life-cycle.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/task-history-life-cycle.js +0 -101
- package/src/tasks-runner/life-cycles/task-profiling-life-cycle.d.ts +0 -15
- package/src/tasks-runner/life-cycles/task-profiling-life-cycle.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/task-results-life-cycle.d.ts +0 -7
- package/src/tasks-runner/life-cycles/task-results-life-cycle.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/task-telemetry-life-cycle.d.ts +0 -10
- package/src/tasks-runner/life-cycles/task-telemetry-life-cycle.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/task-timings-life-cycle.d.ts +0 -9
- package/src/tasks-runner/life-cycles/task-timings-life-cycle.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/tui-summary-life-cycle.d.ts +0 -20
- package/src/tasks-runner/life-cycles/tui-summary-life-cycle.d.ts.map +0 -1
- package/src/tasks-runner/life-cycles/tui-summary-life-cycle.js +0 -329
- package/src/tasks-runner/life-cycles/view-logs-utils.d.ts +0 -2
- package/src/tasks-runner/life-cycles/view-logs-utils.d.ts.map +0 -1
- package/src/tasks-runner/process-metrics-service.d.ts +0 -54
- package/src/tasks-runner/process-metrics-service.d.ts.map +0 -1
- package/src/tasks-runner/pseudo-ipc.d.ts +0 -49
- package/src/tasks-runner/pseudo-ipc.d.ts.map +0 -1
- package/src/tasks-runner/pseudo-ipc.js +0 -156
- package/src/tasks-runner/pseudo-terminal.d.ts +0 -58
- package/src/tasks-runner/pseudo-terminal.d.ts.map +0 -1
- package/src/tasks-runner/pseudo-terminal.js +0 -170
- package/src/tasks-runner/remove-old-cache-records.d.ts +0 -2
- package/src/tasks-runner/remove-old-cache-records.d.ts.map +0 -1
- package/src/tasks-runner/run-command.d.ts +0 -43
- package/src/tasks-runner/run-command.d.ts.map +0 -1
- package/src/tasks-runner/run-command.js +0 -860
- package/src/tasks-runner/running-tasks/batch-process.d.ts +0 -20
- package/src/tasks-runner/running-tasks/batch-process.d.ts.map +0 -1
- package/src/tasks-runner/running-tasks/batch-process.js +0 -108
- package/src/tasks-runner/running-tasks/node-child-process.d.ts +0 -41
- package/src/tasks-runner/running-tasks/node-child-process.d.ts.map +0 -1
- package/src/tasks-runner/running-tasks/node-child-process.js +0 -175
- package/src/tasks-runner/running-tasks/noop-child-process.d.ts +0 -17
- package/src/tasks-runner/running-tasks/noop-child-process.d.ts.map +0 -1
- package/src/tasks-runner/running-tasks/output-prefix.d.ts +0 -14
- package/src/tasks-runner/running-tasks/output-prefix.d.ts.map +0 -1
- package/src/tasks-runner/running-tasks/output-prefix.js +0 -62
- package/src/tasks-runner/running-tasks/running-task.d.ts +0 -12
- package/src/tasks-runner/running-tasks/running-task.d.ts.map +0 -1
- package/src/tasks-runner/running-tasks/shared-running-task.d.ts +0 -15
- package/src/tasks-runner/running-tasks/shared-running-task.d.ts.map +0 -1
- package/src/tasks-runner/task-env-paths.d.ts +0 -2
- package/src/tasks-runner/task-env-paths.d.ts.map +0 -1
- package/src/tasks-runner/task-env.d.ts +0 -20
- package/src/tasks-runner/task-env.d.ts.map +0 -1
- package/src/tasks-runner/task-env.js +0 -149
- package/src/tasks-runner/task-graph-utils.d.ts +0 -31
- package/src/tasks-runner/task-graph-utils.d.ts.map +0 -1
- package/src/tasks-runner/task-io-service.d.ts +0 -97
- package/src/tasks-runner/task-io-service.d.ts.map +0 -1
- package/src/tasks-runner/task-orchestrator.d.ts +0 -108
- package/src/tasks-runner/task-orchestrator.d.ts.map +0 -1
- package/src/tasks-runner/task-orchestrator.js +0 -1037
- package/src/tasks-runner/tasks-runner.d.ts +0 -25
- package/src/tasks-runner/tasks-runner.d.ts.map +0 -1
- package/src/tasks-runner/tasks-schedule.d.ts +0 -46
- package/src/tasks-runner/tasks-schedule.d.ts.map +0 -1
- package/src/tasks-runner/tasks-schedule.js +0 -244
- package/src/tasks-runner/utils.d.ts +0 -51
- package/src/tasks-runner/utils.d.ts.map +0 -1
- package/src/tasks-runner/utils.js +0 -414
- package/src/utils/ab-testing.d.ts +0 -70
- package/src/utils/ab-testing.d.ts.map +0 -1
- package/src/utils/ab-testing.js +0 -114
- package/src/utils/all-file-data.d.ts +0 -3
- package/src/utils/all-file-data.d.ts.map +0 -1
- package/src/utils/analytics-prompt.d.ts +0 -13
- package/src/utils/analytics-prompt.d.ts.map +0 -1
- package/src/utils/analytics-prompt.js +0 -137
- package/src/utils/assert-workspace-validity.d.ts +0 -4
- package/src/utils/assert-workspace-validity.d.ts.map +0 -1
- package/src/utils/async-iterator.d.ts +0 -3
- package/src/utils/async-iterator.d.ts.map +0 -1
- package/src/utils/binary-extensions.d.ts +0 -2
- package/src/utils/binary-extensions.d.ts.map +0 -1
- package/src/utils/cache-directory.d.ts +0 -8
- package/src/utils/cache-directory.d.ts.map +0 -1
- package/src/utils/cache-directory.js +0 -71
- package/src/utils/call-sites.d.ts +0 -15
- package/src/utils/call-sites.d.ts.map +0 -1
- package/src/utils/catalog/index.d.ts +0 -10
- package/src/utils/catalog/index.d.ts.map +0 -1
- package/src/utils/catalog/index.js +0 -38
- package/src/utils/catalog/manager-factory.d.ts +0 -6
- package/src/utils/catalog/manager-factory.d.ts.map +0 -1
- package/src/utils/catalog/manager.d.ts +0 -41
- package/src/utils/catalog/manager.d.ts.map +0 -1
- package/src/utils/catalog/pnpm-manager.d.ts +0 -22
- package/src/utils/catalog/pnpm-manager.d.ts.map +0 -1
- package/src/utils/catalog/pnpm-manager.js +0 -249
- package/src/utils/catalog/types.d.ts +0 -12
- package/src/utils/catalog/types.d.ts.map +0 -1
- package/src/utils/catalog/yarn-manager.d.ts +0 -22
- package/src/utils/catalog/yarn-manager.d.ts.map +0 -1
- package/src/utils/catalog/yarn-manager.js +0 -249
- package/src/utils/child-process.d.ts +0 -23
- package/src/utils/child-process.d.ts.map +0 -1
- package/src/utils/child-process.js +0 -91
- package/src/utils/chunkify.d.ts +0 -12
- package/src/utils/chunkify.d.ts.map +0 -1
- package/src/utils/code-frames.d.ts +0 -15
- package/src/utils/code-frames.d.ts.map +0 -1
- package/src/utils/code-frames.js +0 -115
- package/src/utils/collapse-expanded-outputs.d.ts +0 -11
- package/src/utils/collapse-expanded-outputs.d.ts.map +0 -1
- package/src/utils/command-line-utils.d.ts +0 -58
- package/src/utils/command-line-utils.d.ts.map +0 -1
- package/src/utils/command-line-utils.js +0 -248
- package/src/utils/consume-messages-from-socket.d.ts +0 -4
- package/src/utils/consume-messages-from-socket.d.ts.map +0 -1
- package/src/utils/consume-messages-from-socket.js +0 -44
- package/src/utils/db-connection.d.ts +0 -7
- package/src/utils/db-connection.d.ts.map +0 -1
- package/src/utils/db-connection.js +0 -29
- package/src/utils/default-base.d.ts +0 -2
- package/src/utils/default-base.d.ts.map +0 -1
- package/src/utils/delayed-spinner.d.ts +0 -43
- package/src/utils/delayed-spinner.d.ts.map +0 -1
- package/src/utils/delayed-spinner.js +0 -78
- package/src/utils/dotenv.d.ts +0 -8
- package/src/utils/dotenv.d.ts.map +0 -1
- package/src/utils/dotenv.js +0 -21
- package/src/utils/exit-codes.d.ts +0 -16
- package/src/utils/exit-codes.d.ts.map +0 -1
- package/src/utils/fileutils.d.ts +0 -76
- package/src/utils/fileutils.d.ts.map +0 -1
- package/src/utils/fileutils.js +0 -151
- package/src/utils/find-matching-projects.d.ts +0 -11
- package/src/utils/find-matching-projects.d.ts.map +0 -1
- package/src/utils/find-matching-projects.js +0 -222
- package/src/utils/find-workspace-root.d.ts +0 -12
- package/src/utils/find-workspace-root.d.ts.map +0 -1
- package/src/utils/get-package-name-from-import-path.d.ts +0 -2
- package/src/utils/get-package-name-from-import-path.d.ts.map +0 -1
- package/src/utils/git-utils.d.ts +0 -43
- package/src/utils/git-utils.d.ts.map +0 -1
- package/src/utils/git-utils.index-filter.d.ts +0 -1
- package/src/utils/git-utils.index-filter.d.ts.map +0 -1
- package/src/utils/git-utils.index-filter.js +0 -21
- package/src/utils/git-utils.js +0 -298
- package/src/utils/git-utils.tree-filter.d.ts +0 -12
- package/src/utils/git-utils.tree-filter.d.ts.map +0 -1
- package/src/utils/git-utils.tree-filter.js +0 -45
- package/src/utils/globs.d.ts +0 -4
- package/src/utils/globs.d.ts.map +0 -1
- package/src/utils/handle-errors.d.ts +0 -2
- package/src/utils/handle-errors.d.ts.map +0 -1
- package/src/utils/handle-errors.js +0 -82
- package/src/utils/ignore.d.ts +0 -10
- package/src/utils/ignore.d.ts.map +0 -1
- package/src/utils/installation-directory.d.ts +0 -3
- package/src/utils/installation-directory.d.ts.map +0 -1
- package/src/utils/is-ci.d.ts +0 -2
- package/src/utils/is-ci.d.ts.map +0 -1
- package/src/utils/is-sandbox.d.ts +0 -2
- package/src/utils/is-sandbox.d.ts.map +0 -1
- package/src/utils/is-sandbox.js +0 -9
- package/src/utils/is-using-prettier.d.ts +0 -4
- package/src/utils/is-using-prettier.d.ts.map +0 -1
- package/src/utils/json-diff.d.ts +0 -19
- package/src/utils/json-diff.d.ts.map +0 -1
- package/src/utils/json.d.ts +0 -45
- package/src/utils/json.d.ts.map +0 -1
- package/src/utils/legacy-task-history.d.ts +0 -9
- package/src/utils/legacy-task-history.d.ts.map +0 -1
- package/src/utils/logger.d.ts +0 -13
- package/src/utils/logger.d.ts.map +0 -1
- package/src/utils/logger.js +0 -52
- package/src/utils/machine-id-cache.d.ts +0 -6
- package/src/utils/machine-id-cache.d.ts.map +0 -1
- package/src/utils/nx-cloud-utils.d.ts +0 -4
- package/src/utils/nx-cloud-utils.d.ts.map +0 -1
- package/src/utils/nx-cloud-utils.js +0 -24
- package/src/utils/nx-console-prompt.d.ts +0 -2
- package/src/utils/nx-console-prompt.d.ts.map +0 -1
- package/src/utils/nx-key.d.ts +0 -8
- package/src/utils/nx-key.d.ts.map +0 -1
- package/src/utils/nx-key.js +0 -52
- package/src/utils/object-sort.d.ts +0 -2
- package/src/utils/object-sort.d.ts.map +0 -1
- package/src/utils/output.d.ts +0 -79
- package/src/utils/output.d.ts.map +0 -1
- package/src/utils/output.js +0 -262
- package/src/utils/package-json.d.ts +0 -195
- package/src/utils/package-json.d.ts.map +0 -1
- package/src/utils/package-json.js +0 -357
- package/src/utils/package-manager.d.ts +0 -123
- package/src/utils/package-manager.d.ts.map +0 -1
- package/src/utils/package-manager.js +0 -577
- package/src/utils/params.d.ts +0 -141
- package/src/utils/params.d.ts.map +0 -1
- package/src/utils/params.js +0 -709
- package/src/utils/path.d.ts +0 -20
- package/src/utils/path.d.ts.map +0 -1
- package/src/utils/path.js +0 -37
- package/src/utils/perf-logging.d.ts +0 -2
- package/src/utils/perf-logging.d.ts.map +0 -1
- package/src/utils/perf-logging.js +0 -45
- package/src/utils/plugin-cache-utils.d.ts +0 -74
- package/src/utils/plugin-cache-utils.d.ts.map +0 -1
- package/src/utils/plugin-cache-utils.js +0 -202
- package/src/utils/plugins/atomizer-utils.d.ts +0 -12
- package/src/utils/plugins/atomizer-utils.d.ts.map +0 -1
- package/src/utils/plugins/core-plugins.d.ts +0 -7
- package/src/utils/plugins/core-plugins.d.ts.map +0 -1
- package/src/utils/plugins/index.d.ts +0 -6
- package/src/utils/plugins/index.d.ts.map +0 -1
- package/src/utils/plugins/installed-plugins.d.ts +0 -6
- package/src/utils/plugins/installed-plugins.d.ts.map +0 -1
- package/src/utils/plugins/local-plugins.d.ts +0 -5
- package/src/utils/plugins/local-plugins.d.ts.map +0 -1
- package/src/utils/plugins/local-plugins.js +0 -30
- package/src/utils/plugins/output.d.ts +0 -35
- package/src/utils/plugins/output.d.ts.map +0 -1
- package/src/utils/plugins/output.js +0 -200
- package/src/utils/plugins/plugin-capabilities.d.ts +0 -16
- package/src/utils/plugins/plugin-capabilities.d.ts.map +0 -1
- package/src/utils/pnpm-workspace.d.ts +0 -9
- package/src/utils/pnpm-workspace.d.ts.map +0 -1
- package/src/utils/print-help.d.ts +0 -12
- package/src/utils/print-help.d.ts.map +0 -1
- package/src/utils/print-help.js +0 -258
- package/src/utils/project-graph-utils.d.ts +0 -19
- package/src/utils/project-graph-utils.d.ts.map +0 -1
- package/src/utils/promised-based-queue.d.ts +0 -7
- package/src/utils/promised-based-queue.d.ts.map +0 -1
- package/src/utils/provenance.d.ts +0 -48
- package/src/utils/provenance.d.ts.map +0 -1
- package/src/utils/require-nx-key.d.ts +0 -2
- package/src/utils/require-nx-key.d.ts.map +0 -1
- package/src/utils/require-nx-key.js +0 -22
- package/src/utils/serializable-error.d.ts +0 -5
- package/src/utils/serializable-error.d.ts.map +0 -1
- package/src/utils/serialize-overrides-into-command-line.d.ts +0 -4
- package/src/utils/serialize-overrides-into-command-line.d.ts.map +0 -1
- package/src/utils/serialize-target.d.ts +0 -2
- package/src/utils/serialize-target.d.ts.map +0 -1
- package/src/utils/shell-quoting.d.ts +0 -11
- package/src/utils/shell-quoting.d.ts.map +0 -1
- package/src/utils/spinner.d.ts +0 -13
- package/src/utils/spinner.d.ts.map +0 -1
- package/src/utils/spinner.js +0 -61
- package/src/utils/split-target.d.ts +0 -16
- package/src/utils/split-target.d.ts.map +0 -1
- package/src/utils/strip-indents.d.ts +0 -15
- package/src/utils/strip-indents.d.ts.map +0 -1
- package/src/utils/sync-generators.d.ts +0 -67
- package/src/utils/sync-generators.d.ts.map +0 -1
- package/src/utils/sync-generators.js +0 -354
- package/src/utils/task-history.d.ts +0 -18
- package/src/utils/task-history.d.ts.map +0 -1
- package/src/utils/update-nxw.d.ts +0 -3
- package/src/utils/update-nxw.d.ts.map +0 -1
- package/src/utils/versions.d.ts +0 -2
- package/src/utils/versions.d.ts.map +0 -1
- package/src/utils/versions.js +0 -4
- package/src/utils/workspace-context.d.ts +0 -22
- package/src/utils/workspace-context.d.ts.map +0 -1
- package/src/utils/workspace-context.js +0 -119
- package/src/utils/workspace-root.d.ts +0 -7
- package/src/utils/workspace-root.d.ts.map +0 -1
- package/src/utils/workspace-root.js +0 -39
- package/src/utils/write-formatted-json-file.d.ts +0 -7
- package/src/utils/write-formatted-json-file.d.ts.map +0 -1
- package/tasks-runners/default.d.ts +0 -2
- package/tasks-runners/default.d.ts.map +0 -1
- /package/{bin → dist/bin}/nx-cloud.js +0 -0
- /package/{bin → dist/bin}/post-install.js +0 -0
- /package/{bin → dist/bin}/run-executor.js +0 -0
- /package/{presets → dist/presets}/core.json +0 -0
- /package/{presets → dist/presets}/npm.json +0 -0
- /package/{release → dist/release}/index.js +0 -0
- /package/{src → dist/src}/adapter/rxjs-for-await.js +0 -0
- /package/{src → dist/src}/ai/detect-ai-agent.js +0 -0
- /package/{src → dist/src}/ai/set-up-ai-agents/get-agent-rules.js +0 -0
- /package/{src → dist/src}/ai/set-up-ai-agents/schema.d.ts +0 -0
- /package/{src → dist/src}/analytics/index.js +0 -0
- /package/{src → dist/src}/command-line/affected/affected.js +0 -0
- /package/{src → dist/src}/command-line/ai/ai-output.js +0 -0
- /package/{src → dist/src}/command-line/deprecated/command-objects.js +0 -0
- /package/{src → dist/src}/command-line/generate/generator-utils.js +0 -0
- /package/{src → dist/src}/command-line/import/utils/ai-output.js +0 -0
- /package/{src → dist/src}/command-line/import/utils/merge-remote-source.js +0 -0
- /package/{src → dist/src}/command-line/import/utils/prepare-source-repo.js +0 -0
- /package/{src → dist/src}/command-line/index.js +0 -0
- /package/{src → dist/src}/command-line/init/implementation/angular/integrated-workspace.js +0 -0
- /package/{src → dist/src}/command-line/init/implementation/angular/types.js +0 -0
- /package/{src → dist/src}/command-line/init/implementation/check-compatible-with-plugins.js +0 -0
- /package/{src → dist/src}/command-line/init/implementation/deduce-default-base.js +0 -0
- /package/{src → dist/src}/command-line/init/init-v1.js +0 -0
- /package/{src → dist/src}/command-line/init/utils/ai-output.js +0 -0
- /package/{src → dist/src}/command-line/list/list.js +0 -0
- /package/{src → dist/src}/command-line/mcp/mcp.js +0 -0
- /package/{src/utils/catalog → dist/src/command-line/migrate/agentic}/types.js +0 -0
- /package/{src → dist/src}/command-line/new/new.js +0 -0
- /package/{src → dist/src}/command-line/nx-cloud/apply-locally/apply-locally.js +0 -0
- /package/{src → dist/src}/command-line/nx-cloud/complete-run/stop-all-agents.js +0 -0
- /package/{src → dist/src}/command-line/nx-cloud/download-cloud-client/download-cloud-client.js +0 -0
- /package/{src → dist/src}/command-line/nx-cloud/fix-ci/fix-ci.js +0 -0
- /package/{src → dist/src}/command-line/nx-cloud/login/login.js +0 -0
- /package/{src → dist/src}/command-line/nx-cloud/logout/logout.js +0 -0
- /package/{src → dist/src}/command-line/nx-cloud/record/record.js +0 -0
- /package/{src → dist/src}/command-line/nx-cloud/start-agent/start-agent.js +0 -0
- /package/{src → dist/src}/command-line/nx-cloud/start-ci-run/start-ci-run.js +0 -0
- /package/{src → dist/src}/command-line/nx-cloud/utils.js +0 -0
- /package/{src → dist/src}/command-line/register/register.js +0 -0
- /package/{src → dist/src}/command-line/release/changelog/commit-utils.js +0 -0
- /package/{src → dist/src}/command-line/release/changelog/version-plan-utils.js +0 -0
- /package/{src → dist/src}/command-line/release/config/conventional-commits.js +0 -0
- /package/{src → dist/src}/command-line/release/config/deep-merge-json.js +0 -0
- /package/{src → dist/src}/command-line/release/config/filter-release-groups.js +0 -0
- /package/{src → dist/src}/command-line/release/index.js +0 -0
- /package/{src → dist/src}/command-line/release/plan-check.js +0 -0
- /package/{src → dist/src}/command-line/release/plan.js +0 -0
- /package/{src → dist/src}/command-line/release/publish.js +0 -0
- /package/{src → dist/src}/command-line/release/utils/exec-command.js +0 -0
- /package/{src → dist/src}/command-line/release/utils/generate-version-plan-content.js +0 -0
- /package/{src → dist/src}/command-line/release/utils/get-touched-projects-for-group.js +0 -0
- /package/{src → dist/src}/command-line/release/utils/launch-editor.js +0 -0
- /package/{src → dist/src}/command-line/release/utils/markdown.js +0 -0
- /package/{src → dist/src}/command-line/release/utils/print-config.js +0 -0
- /package/{src → dist/src}/command-line/release/utils/remote-release-clients/extract-repo-slug.js +0 -0
- /package/{src → dist/src}/command-line/release/utils/semver.js +0 -0
- /package/{src → dist/src}/command-line/release/utils/shared-legacy.js +0 -0
- /package/{src → dist/src}/command-line/release/utils/version-plan-utils.js +0 -0
- /package/{src → dist/src}/command-line/release/version/deriver-specifier-from-version-plans.js +0 -0
- /package/{src → dist/src}/command-line/release/version/topological-sort.js +0 -0
- /package/{src → dist/src}/command-line/run/executor-utils.js +0 -0
- /package/{src → dist/src}/command-line/run-many/run-many.js +0 -0
- /package/{src → dist/src}/command-line/show/project.js +0 -0
- /package/{src → dist/src}/command-line/show/projects.js +0 -0
- /package/{src → dist/src}/command-line/yargs-utils/arguments-of.js +0 -0
- /package/{src → dist/src}/commands-runner/command-graph.js +0 -0
- /package/{src → dist/src}/commands-runner/create-command-graph.js +0 -0
- /package/{src → dist/src}/commands-runner/get-command-projects.js +0 -0
- /package/{src → dist/src}/config/calculate-default-project-name.js +0 -0
- /package/{src → dist/src}/config/configuration.js +0 -0
- /package/{src → dist/src}/config/misc-interfaces.js +0 -0
- /package/{src → dist/src}/config/nx-json.js +0 -0
- /package/{src → dist/src}/config/project-graph.js +0 -0
- /package/{src → dist/src}/config/task-graph.js +0 -0
- /package/{src → dist/src}/config/to-project-name.js +0 -0
- /package/{src → dist/src}/config/workspace-json-project-json.js +0 -0
- /package/{src → dist/src}/core/graph/environment.js +0 -0
- /package/{src → dist/src}/core/graph/favicon.ico +0 -0
- /package/{src → dist/src}/core/graph/index.html +0 -0
- /package/{src → dist/src}/core/graph/runtime.js +0 -0
- /package/{src → dist/src}/daemon/cache.js +0 -0
- /package/{src → dist/src}/daemon/is-on-daemon.js +0 -0
- /package/{src → dist/src}/daemon/is-v8-serializer-enabled.js +0 -0
- /package/{src → dist/src}/daemon/message-types/configure-ai-agents.js +0 -0
- /package/{src → dist/src}/daemon/message-types/flush-sync-generator-changes-to-disk.js +0 -0
- /package/{src → dist/src}/daemon/message-types/force-shutdown.js +0 -0
- /package/{src → dist/src}/daemon/message-types/get-context-file-data.js +0 -0
- /package/{src → dist/src}/daemon/message-types/get-files-in-directory.js +0 -0
- /package/{src → dist/src}/daemon/message-types/get-nx-workspace-files.js +0 -0
- /package/{src → dist/src}/daemon/message-types/get-registered-sync-generators.js +0 -0
- /package/{src → dist/src}/daemon/message-types/get-sync-generator-changes.js +0 -0
- /package/{src → dist/src}/daemon/message-types/glob.js +0 -0
- /package/{src → dist/src}/daemon/message-types/hash-glob.js +0 -0
- /package/{src → dist/src}/daemon/message-types/nx-console.js +0 -0
- /package/{src → dist/src}/daemon/message-types/register-project-graph-listener.js +0 -0
- /package/{src → dist/src}/daemon/message-types/run-tasks-execution-hooks.js +0 -0
- /package/{src → dist/src}/daemon/message-types/task-history.js +0 -0
- /package/{src → dist/src}/daemon/message-types/update-workspace-context.js +0 -0
- /package/{src → dist/src}/daemon/server/file-watching/file-change-events.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-context-file-data.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-flush-sync-generator-changes-to-disk.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-force-shutdown.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-get-files-in-directory.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-get-registered-sync-generators.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-get-sync-generator-changes.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-glob.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-hash-glob.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-nx-console.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-nx-workspace-files.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-process-in-background.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-request-shutdown.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-task-history.js +0 -0
- /package/{src → dist/src}/daemon/server/handle-tasks-execution-hooks.js +0 -0
- /package/{src → dist/src}/daemon/server/project-graph-listener-sockets.js +0 -0
- /package/{src → dist/src}/daemon/server/sync-generators.js +0 -0
- /package/{src → dist/src}/daemon/socket-utils.js +0 -0
- /package/{src → dist/src}/daemon/tmp-dir.js +0 -0
- /package/{src → dist/src}/devkit-testing-exports.js +0 -0
- /package/{src → dist/src}/executors/noop/noop.impl.js +0 -0
- /package/{src → dist/src}/generators/testing-utils/create-tree-with-empty-workspace.js +0 -0
- /package/{src → dist/src}/generators/testing-utils/create-tree.js +0 -0
- /package/{src → dist/src}/generators/utils/glob.js +0 -0
- /package/{src → dist/src}/generators/utils/json.js +0 -0
- /package/{src → dist/src}/generators/utils/nx-json.js +0 -0
- /package/{src → dist/src}/hasher/file-hasher.js +0 -0
- /package/{src → dist/src}/hasher/hash-plan-inspector.js +0 -0
- /package/{src/nx-cloud/models/onboarding-status.js → dist/src/index.js} +0 -0
- /package/{src → dist/src}/migrations/update-16-0-0/remove-nrwl-cli.js +0 -0
- /package/{src → dist/src}/migrations/update-16-0-0/update-nx-cloud-runner.js +0 -0
- /package/{src → dist/src}/migrations/update-16-8-0/escape-dollar-sign-env-variables.js +0 -0
- /package/{src → dist/src}/migrations/update-17-0-0/move-cache-directory.js +0 -0
- /package/{src → dist/src}/migrations/update-17-0-0/rm-default-collection-npm-scope.js +0 -0
- /package/{src → dist/src}/migrations/update-17-3-0/nx-release-path.js +0 -0
- /package/{src → dist/src}/migrations/update-17-3-0/update-nxw.js +0 -0
- /package/{src → dist/src}/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +0 -0
- /package/{src → dist/src}/migrations/update-19-2-0/move-workspace-data-directory.js +0 -0
- /package/{src → dist/src}/migrations/update-19-2-4/set-project-name.js +0 -0
- /package/{src → dist/src}/migrations/update-20-0-0/move-use-daemon-process.js +0 -0
- /package/{src → dist/src}/migrations/update-20-0-1/use-legacy-cache.js +0 -0
- /package/{src → dist/src}/migrations/update-21-0-0/release-changelog-config-changes.js +0 -0
- /package/{src → dist/src}/migrations/update-21-0-0/release-version-config-changes.js +0 -0
- /package/{src → dist/src}/migrations/update-21-0-0/remove-custom-tasks-runner.js +0 -0
- /package/{src → dist/src}/migrations/update-21-0-0/remove-legacy-cache.js +0 -0
- /package/{src → dist/src}/migrations/update-22-0-0/consolidate-release-tag-config.js +0 -0
- /package/{src → dist/src}/migrations/update-22-0-0/release-version-config-changes.js +0 -0
- /package/{src → dist/src}/migrations/update-22-1-0/update-nx-wrapper.js +0 -0
- /package/{src → dist/src}/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.js +0 -0
- /package/{src → dist/src}/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.js +0 -0
- /package/{src → dist/src}/migrations/update-22-6-0/enable-analytics-prompt.js +0 -0
- /package/{src → dist/src}/migrations/update-22-7-0/add-polygraph-to-git-ignore.js +0 -0
- /package/{src → dist/src}/native/assert-supported-platform.js +0 -0
- /package/{src → dist/src}/native/browser.js +0 -0
- /package/{src → dist/src}/native/index.js +0 -0
- /package/{src → dist/src}/native/native-file-cache-location.js +0 -0
- /package/{src → dist/src}/native/transform-objects.js +0 -0
- /package/{src → dist/src}/native/wasi-worker.mjs +0 -0
- /package/{src → dist/src}/nx-cloud/debug-logger.js +0 -0
- /package/{src → dist/src}/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +0 -0
- /package/{src/project-graph/affected/affected-project-graph-models.js → dist/src/nx-cloud/models/onboarding-status.js} +0 -0
- /package/{src → dist/src}/nx-cloud/nx-cloud-tasks-runner-shell.js +0 -0
- /package/{src → dist/src}/nx-cloud/resolution-helpers.js +0 -0
- /package/{src → dist/src}/nx-cloud/utilities/axios.js +0 -0
- /package/{src → dist/src}/nx-cloud/utilities/client.js +0 -0
- /package/{src → dist/src}/nx-cloud/utilities/get-cloud-options.js +0 -0
- /package/{src → dist/src}/nx-cloud/utilities/is-workspace-claimed.js +0 -0
- /package/{src → dist/src}/nx-cloud/utilities/onboarding.js +0 -0
- /package/{src → dist/src}/nx-cloud/utilities/url-shorten.js +0 -0
- /package/{src → dist/src}/plugins/js/hasher/hasher.js +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/affected/npm-packages.js +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/affected/touched-projects.js +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/build-dependencies/build-dependencies.js +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +0 -0
- /package/{src → dist/src}/plugins/js/project-graph/build-nodes/build-npm-package-nodes.js +0 -0
- /package/{src → dist/src}/plugins/js/utils/config.js +0 -0
- /package/{src → dist/src}/plugins/js/utils/get-workspace-packages-from-graph.js +0 -0
- /package/{src → dist/src}/plugins/js/utils/resolve-relative-to-dir.js +0 -0
- /package/{src → dist/src}/plugins/package-json/index.js +0 -0
- /package/{src/tasks-runner/tasks-runner.js → dist/src/project-graph/affected/affected-project-graph-models.js} +0 -0
- /package/{src → dist/src}/project-graph/affected/affected-project-graph.js +0 -0
- /package/{src → dist/src}/project-graph/affected/locators/workspace-json-changes.js +0 -0
- /package/{src → dist/src}/project-graph/affected/locators/workspace-projects.js +0 -0
- /package/{src → dist/src}/project-graph/nx-deps-cache.js +0 -0
- /package/{src → dist/src}/project-graph/plugins/index.js +0 -0
- /package/{src → dist/src}/project-graph/plugins/isolation/enabled.js +0 -0
- /package/{src → dist/src}/project-graph/plugins/isolation/index.js +0 -0
- /package/{src → dist/src}/project-graph/plugins/isolation/load-isolated-plugin.js +0 -0
- /package/{src → dist/src}/project-graph/plugins/isolation/message-types.js +0 -0
- /package/{src → dist/src}/project-graph/plugins/isolation/plugin-lifecycle-manager.js +0 -0
- /package/{src → dist/src}/project-graph/plugins/public-api.js +0 -0
- /package/{src → dist/src}/project-graph/utils/build-all-workspace-files.js +0 -0
- /package/{src → dist/src}/project-graph/utils/find-project-for-path.js +0 -0
- /package/{src → dist/src}/project-graph/utils/implicit-project-dependencies.js +0 -0
- /package/{src → dist/src}/project-graph/utils/normalize-project-nodes.js +0 -0
- /package/{src → dist/src}/tasks-runner/batch/batch-messages.js +0 -0
- /package/{src → dist/src}/tasks-runner/fork.js +0 -0
- /package/{src → dist/src}/tasks-runner/is-tui-enabled.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/empty-terminal-output-life-cycle.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/formatting-utils.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/pretty-time.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/store-run-information-life-cycle.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/task-profiling-life-cycle.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/task-results-life-cycle.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/task-telemetry-life-cycle.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/task-timings-life-cycle.js +0 -0
- /package/{src → dist/src}/tasks-runner/life-cycles/view-logs-utils.js +0 -0
- /package/{src → dist/src}/tasks-runner/process-metrics-service.js +0 -0
- /package/{src → dist/src}/tasks-runner/remove-old-cache-records.js +0 -0
- /package/{src → dist/src}/tasks-runner/running-tasks/noop-child-process.js +0 -0
- /package/{src → dist/src}/tasks-runner/running-tasks/running-task.js +0 -0
- /package/{src → dist/src}/tasks-runner/running-tasks/shared-running-task.js +0 -0
- /package/{src → dist/src}/tasks-runner/task-env-paths.js +0 -0
- /package/{src → dist/src}/tasks-runner/task-graph-utils.js +0 -0
- /package/{src → dist/src}/tasks-runner/task-io-service.js +0 -0
- /package/{src/utils/pnpm-workspace.js → dist/src/tasks-runner/tasks-runner.js} +0 -0
- /package/{src → dist/src}/utils/all-file-data.js +0 -0
- /package/{src → dist/src}/utils/assert-workspace-validity.js +0 -0
- /package/{src → dist/src}/utils/async-iterator.js +0 -0
- /package/{src → dist/src}/utils/binary-extensions.js +0 -0
- /package/{src → dist/src}/utils/call-sites.js +0 -0
- /package/{src → dist/src}/utils/catalog/manager-factory.js +0 -0
- /package/{src → dist/src}/utils/catalog/manager.js +0 -0
- /package/{src → dist/src}/utils/chunkify.js +0 -0
- /package/{src → dist/src}/utils/collapse-expanded-outputs.js +0 -0
- /package/{src → dist/src}/utils/default-base.js +0 -0
- /package/{src → dist/src}/utils/exit-codes.js +0 -0
- /package/{src → dist/src}/utils/find-workspace-root.js +0 -0
- /package/{src → dist/src}/utils/get-package-name-from-import-path.js +0 -0
- /package/{src → dist/src}/utils/globs.js +0 -0
- /package/{src → dist/src}/utils/ignore.js +0 -0
- /package/{src → dist/src}/utils/installation-directory.js +0 -0
- /package/{src → dist/src}/utils/is-ci.js +0 -0
- /package/{src → dist/src}/utils/is-using-prettier.js +0 -0
- /package/{src → dist/src}/utils/json-diff.js +0 -0
- /package/{src → dist/src}/utils/json.js +0 -0
- /package/{src → dist/src}/utils/legacy-task-history.js +0 -0
- /package/{src → dist/src}/utils/machine-id-cache.js +0 -0
- /package/{src → dist/src}/utils/nx-console-prompt.js +0 -0
- /package/{src → dist/src}/utils/object-sort.js +0 -0
- /package/{src → dist/src}/utils/perf-hooks.d.ts +0 -0
- /package/{src → dist/src}/utils/plugins/atomizer-utils.js +0 -0
- /package/{src → dist/src}/utils/plugins/core-plugins.js +0 -0
- /package/{src → dist/src}/utils/plugins/index.js +0 -0
- /package/{src → dist/src}/utils/plugins/installed-plugins.js +0 -0
- /package/{src → dist/src}/utils/plugins/plugin-capabilities.js +0 -0
- /package/{src → dist/src}/utils/project-graph-utils.js +0 -0
- /package/{src → dist/src}/utils/promised-based-queue.js +0 -0
- /package/{src → dist/src}/utils/provenance.js +0 -0
- /package/{src → dist/src}/utils/serializable-error.js +0 -0
- /package/{src → dist/src}/utils/serialize-overrides-into-command-line.js +0 -0
- /package/{src → dist/src}/utils/serialize-target.js +0 -0
- /package/{src → dist/src}/utils/shell-quoting.js +0 -0
- /package/{src → dist/src}/utils/split-target.js +0 -0
- /package/{src → dist/src}/utils/strip-indents.js +0 -0
- /package/{src → dist/src}/utils/task-history.js +0 -0
- /package/{src → dist/src}/utils/update-nxw.js +0 -0
- /package/{src → dist/src}/utils/write-formatted-json-file.js +0 -0
- /package/{tasks-runners → dist/tasks-runners}/default.js +0 -0
|
@@ -0,0 +1,2760 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChangedDepInstaller = exports.isHybridMigration = exports.isPromptOnlyMigration = exports.filterDowngradedUpdates = exports.Migrator = exports.normalizeVersion = void 0;
|
|
4
|
+
exports.formatCommandFailure = formatCommandFailure;
|
|
5
|
+
exports.resolveCanonicalNxPackage = resolveCanonicalNxPackage;
|
|
6
|
+
exports.resolveInclude = resolveInclude;
|
|
7
|
+
exports.parseMigrationsOptions = parseMigrationsOptions;
|
|
8
|
+
exports.createFetcher = createFetcher;
|
|
9
|
+
exports.generateMigrationsJsonAndUpdatePackageJson = generateMigrationsJsonAndUpdatePackageJson;
|
|
10
|
+
exports.isNpmPeerDepsError = isNpmPeerDepsError;
|
|
11
|
+
exports.resolveAgenticRunId = resolveAgenticRunId;
|
|
12
|
+
exports.formatSkippedPromptsNextStep = formatSkippedPromptsNextStep;
|
|
13
|
+
exports.resolveCreateCommits = resolveCreateCommits;
|
|
14
|
+
exports.resolveShouldRunValidation = resolveShouldRunValidation;
|
|
15
|
+
exports.executeMigrations = executeMigrations;
|
|
16
|
+
exports.runNxOrAngularMigration = runNxOrAngularMigration;
|
|
17
|
+
exports.parseMigrationReturn = parseMigrationReturn;
|
|
18
|
+
exports.migrate = migrate;
|
|
19
|
+
exports.runMigration = runMigration;
|
|
20
|
+
exports.readMigrationCollection = readMigrationCollection;
|
|
21
|
+
exports.getImplementationPath = getImplementationPath;
|
|
22
|
+
exports.resolveMigrationForRun = resolveMigrationForRun;
|
|
23
|
+
exports.resolveDocumentationFileToWorkspacePath = resolveDocumentationFileToWorkspacePath;
|
|
24
|
+
exports.nxCliPath = nxCliPath;
|
|
25
|
+
const tslib_1 = require("tslib");
|
|
26
|
+
const pc = tslib_1.__importStar(require("picocolors"));
|
|
27
|
+
const child_process_1 = require("child_process");
|
|
28
|
+
const safe_prompt_1 = require("./safe-prompt");
|
|
29
|
+
const handle_import_1 = require("../../utils/handle-import");
|
|
30
|
+
const path_1 = require("path");
|
|
31
|
+
const module_1 = require("module");
|
|
32
|
+
const path_2 = require("../../utils/path");
|
|
33
|
+
const semver_1 = require("semver");
|
|
34
|
+
const node_url_1 = require("node:url");
|
|
35
|
+
const util_1 = require("util");
|
|
36
|
+
const tree_1 = require("../../generators/tree");
|
|
37
|
+
const fileutils_1 = require("../../utils/fileutils");
|
|
38
|
+
const tar_1 = require("../../utils/tar");
|
|
39
|
+
const write_formatted_json_file_1 = require("../../utils/write-formatted-json-file");
|
|
40
|
+
const logger_1 = require("../../utils/logger");
|
|
41
|
+
const git_utils_1 = require("../../utils/git-utils");
|
|
42
|
+
const package_json_1 = require("../../utils/package-json");
|
|
43
|
+
const package_manager_1 = require("../../utils/package-manager");
|
|
44
|
+
const errors_1 = require("../../utils/min-release-age/errors");
|
|
45
|
+
const resolve_package_version_1 = require("./resolve-package-version");
|
|
46
|
+
const handle_errors_1 = require("../../utils/handle-errors");
|
|
47
|
+
const connect_to_nx_cloud_1 = require("../nx-cloud/connect/connect-to-nx-cloud");
|
|
48
|
+
const output_1 = require("../../utils/output");
|
|
49
|
+
const fs_1 = require("fs");
|
|
50
|
+
const workspace_root_1 = require("../../utils/workspace-root");
|
|
51
|
+
const is_ci_1 = require("../../utils/is-ci");
|
|
52
|
+
const installation_directory_1 = require("../../utils/installation-directory");
|
|
53
|
+
const installed_nx_version_1 = require("../../utils/installed-nx-version");
|
|
54
|
+
const configuration_1 = require("../../config/configuration");
|
|
55
|
+
const child_process_2 = require("../../utils/child-process");
|
|
56
|
+
const client_1 = require("../../daemon/client/client");
|
|
57
|
+
const nx_cloud_utils_1 = require("../../utils/nx-cloud-utils");
|
|
58
|
+
const project_graph_1 = require("../../project-graph/project-graph");
|
|
59
|
+
const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
|
|
60
|
+
const provenance_1 = require("../../utils/provenance");
|
|
61
|
+
const catalog_1 = require("../../utils/catalog");
|
|
62
|
+
const migrate_analytics_1 = require("./migrate-analytics");
|
|
63
|
+
const multi_major_1 = require("./multi-major");
|
|
64
|
+
const prompt_files_1 = require("./prompt-files");
|
|
65
|
+
const command_object_1 = require("./command-object");
|
|
66
|
+
const migrate_config_1 = require("./migrate-config");
|
|
67
|
+
const handoff_gitignore_1 = require("./agentic/handoff-gitignore");
|
|
68
|
+
const migrate_commits_1 = require("./migrate-commits");
|
|
69
|
+
const migrate_output_1 = require("./migrate-output");
|
|
70
|
+
const migration_shape_1 = require("./migration-shape");
|
|
71
|
+
Object.defineProperty(exports, "isHybridMigration", { enumerable: true, get: function () { return migration_shape_1.isHybridMigration; } });
|
|
72
|
+
Object.defineProperty(exports, "isPromptOnlyMigration", { enumerable: true, get: function () { return migration_shape_1.isPromptOnlyMigration; } });
|
|
73
|
+
const update_filters_1 = require("./update-filters");
|
|
74
|
+
Object.defineProperty(exports, "filterDowngradedUpdates", { enumerable: true, get: function () { return update_filters_1.filterDowngradedUpdates; } });
|
|
75
|
+
const version_utils_1 = require("./version-utils");
|
|
76
|
+
Object.defineProperty(exports, "normalizeVersion", { enumerable: true, get: function () { return version_utils_1.normalizeVersion; } });
|
|
77
|
+
const execAsync = (0, util_1.promisify)(child_process_1.exec);
|
|
78
|
+
function formatCommandFailure(command, error) {
|
|
79
|
+
const normalizeCommandOutput = (output) => {
|
|
80
|
+
if (!output) {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
const normalized = typeof output === 'string' ? output.trim() : output.toString().trim();
|
|
84
|
+
return normalized || undefined;
|
|
85
|
+
};
|
|
86
|
+
const details = normalizeCommandOutput(error.stderr) ||
|
|
87
|
+
normalizeCommandOutput(error.stdout) ||
|
|
88
|
+
normalizeCommandOutput(error.message)
|
|
89
|
+
?.replace(`Command failed: ${command}`, '')
|
|
90
|
+
.trim();
|
|
91
|
+
return [`Command failed: ${command}`, ...(details ? [details] : [])].join('\n');
|
|
92
|
+
}
|
|
93
|
+
function runOrReturnExitCode(run) {
|
|
94
|
+
try {
|
|
95
|
+
run();
|
|
96
|
+
return 0;
|
|
97
|
+
}
|
|
98
|
+
catch (e) {
|
|
99
|
+
if (typeof e === 'object' &&
|
|
100
|
+
e !== null &&
|
|
101
|
+
'status' in e &&
|
|
102
|
+
typeof e.status === 'number') {
|
|
103
|
+
return e.status;
|
|
104
|
+
}
|
|
105
|
+
throw e;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function cleanSemver(version) {
|
|
109
|
+
return (0, semver_1.clean)(version) ?? (0, semver_1.coerce)(version);
|
|
110
|
+
}
|
|
111
|
+
function normalizeSlashes(packageName) {
|
|
112
|
+
return packageName.replace(/\\/g, '/');
|
|
113
|
+
}
|
|
114
|
+
class Migrator {
|
|
115
|
+
constructor(opts) {
|
|
116
|
+
this.packageUpdates = {};
|
|
117
|
+
this.collectedVersions = {};
|
|
118
|
+
this.promptAnswers = {};
|
|
119
|
+
if ((opts.include === 'required' || opts.include === 'optional') &&
|
|
120
|
+
!opts.requiredPackages) {
|
|
121
|
+
throw new Error(`Error: 'requiredPackages' is required when 'include' is '${opts.include}'.`);
|
|
122
|
+
}
|
|
123
|
+
this.packageJson = opts.packageJson;
|
|
124
|
+
this.nxInstallation = opts.nxInstallation;
|
|
125
|
+
this.getInstalledPackageVersion = opts.getInstalledPackageVersion;
|
|
126
|
+
this.fetch = opts.fetch;
|
|
127
|
+
this.installedPkgVersionOverrides = opts.from;
|
|
128
|
+
this.to = opts.to;
|
|
129
|
+
this.interactive = opts.interactive;
|
|
130
|
+
this.excludeAppliedMigrations = opts.excludeAppliedMigrations;
|
|
131
|
+
this.include = opts.include;
|
|
132
|
+
this.requiredPackages = opts.requiredPackages;
|
|
133
|
+
}
|
|
134
|
+
async fetchMigrationConfig(packageName, packageVersion) {
|
|
135
|
+
const migrationConfig = await this.fetch(packageName, packageVersion);
|
|
136
|
+
if (!migrationConfig.version) {
|
|
137
|
+
throw new Error(`Fetched migration metadata for ${packageName} is invalid: the target version is missing.`);
|
|
138
|
+
}
|
|
139
|
+
return migrationConfig;
|
|
140
|
+
}
|
|
141
|
+
async migrate(targetPackage, targetVersion) {
|
|
142
|
+
await this.buildPackageJsonUpdates(targetPackage, {
|
|
143
|
+
version: targetVersion,
|
|
144
|
+
addToPackageJson: false,
|
|
145
|
+
});
|
|
146
|
+
this.applyIncludeFilter();
|
|
147
|
+
const { migrations, promptContents } = await this.createMigrateJson();
|
|
148
|
+
return {
|
|
149
|
+
packageUpdates: this.packageUpdates,
|
|
150
|
+
migrations,
|
|
151
|
+
...(Object.keys(promptContents).length > 0 ? { promptContents } : {}),
|
|
152
|
+
minVersionWithSkippedUpdates: this.minVersionWithSkippedUpdates,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
async createMigrateJson() {
|
|
156
|
+
const promptContents = {};
|
|
157
|
+
const migrations = await Promise.all(Object.keys(this.packageUpdates).map(async (packageName) => {
|
|
158
|
+
if (this.packageUpdates[packageName].ignoreMigrations) {
|
|
159
|
+
return [];
|
|
160
|
+
}
|
|
161
|
+
const currentVersion = this.getPkgVersion(packageName);
|
|
162
|
+
if (currentVersion === null)
|
|
163
|
+
return [];
|
|
164
|
+
const { version } = this.packageUpdates[packageName];
|
|
165
|
+
const { generators: migrationEntries, resolvedPromptFiles } = await this.fetchMigrationConfig(packageName, version);
|
|
166
|
+
if (!migrationEntries)
|
|
167
|
+
return [];
|
|
168
|
+
if (resolvedPromptFiles) {
|
|
169
|
+
for (const [promptPath, content] of Object.entries(resolvedPromptFiles)) {
|
|
170
|
+
promptContents[(0, prompt_files_1.promptContentKey)(packageName, promptPath)] = content;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return Object.entries(migrationEntries)
|
|
174
|
+
.filter(([, migration]) => migration.version &&
|
|
175
|
+
this.gt(migration.version, currentVersion) &&
|
|
176
|
+
this.lte(migration.version, version) &&
|
|
177
|
+
this.areMigrationRequirementsMet(packageName, migration))
|
|
178
|
+
.map(([migrationName, migration]) => ({
|
|
179
|
+
...migration,
|
|
180
|
+
package: packageName,
|
|
181
|
+
name: migrationName,
|
|
182
|
+
}));
|
|
183
|
+
}));
|
|
184
|
+
return { migrations: migrations.flat(), promptContents };
|
|
185
|
+
}
|
|
186
|
+
async buildPackageJsonUpdates(targetPackage, target) {
|
|
187
|
+
const packagesToCheck = await this.populatePackageJsonUpdatesAndGetPackagesToCheck(targetPackage, target);
|
|
188
|
+
for (const packageToCheck of packagesToCheck) {
|
|
189
|
+
const filteredUpdates = {};
|
|
190
|
+
for (const [packageUpdateKey, packageUpdate] of Object.entries(packageToCheck.updates)) {
|
|
191
|
+
if (this.areRequirementsMet(packageUpdate.requires) &&
|
|
192
|
+
!this.areIncompatiblePackagesPresent(packageUpdate.incompatibleWith) &&
|
|
193
|
+
(!this.interactive ||
|
|
194
|
+
(await this.runPackageJsonUpdatesConfirmationPrompt(packageUpdate, packageUpdateKey, packageToCheck.package)))) {
|
|
195
|
+
const updateEntries = Object.entries(packageUpdate.packages);
|
|
196
|
+
// Validate all up front so invalid metadata fails fast, before any
|
|
197
|
+
// resolution does I/O.
|
|
198
|
+
for (const [name, update] of updateEntries) {
|
|
199
|
+
this.validatePackageUpdateVersion(packageToCheck.package, name, update);
|
|
200
|
+
}
|
|
201
|
+
// Resolve serially: resolution can prompt (pnpm strict cooldown) and
|
|
202
|
+
// append to minimumReleaseAgeExclude, so a serial loop avoids
|
|
203
|
+
// overlapping prompts and keeps packageUpdates ordering stable.
|
|
204
|
+
for (const [name, update] of updateEntries) {
|
|
205
|
+
const resolvedUpdate = {
|
|
206
|
+
...update,
|
|
207
|
+
version: await this.resolveVersionForCascade(name, update.version),
|
|
208
|
+
};
|
|
209
|
+
filteredUpdates[name] = resolvedUpdate;
|
|
210
|
+
this.packageUpdates[name] = resolvedUpdate;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
await Promise.all(Object.entries(filteredUpdates).map(([name, update]) => this.buildPackageJsonUpdates(name, update)));
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
async resolveVersionForCascade(packageName, version) {
|
|
218
|
+
// Already a fully-qualified semver (incl. prereleases) - nothing to resolve.
|
|
219
|
+
if ((0, semver_1.valid)(version)) {
|
|
220
|
+
return version;
|
|
221
|
+
}
|
|
222
|
+
// Otherwise resolve the spec (range/tag) through the min-release-age policy,
|
|
223
|
+
// which also honors any configured minimumReleaseAgeExclude entries.
|
|
224
|
+
return (0, resolve_package_version_1.resolvePackageVersionRespectingMinReleaseAge)(packageName, version);
|
|
225
|
+
}
|
|
226
|
+
async populatePackageJsonUpdatesAndGetPackagesToCheck(targetPackage, target) {
|
|
227
|
+
let targetVersion = target.version;
|
|
228
|
+
if (this.to[targetPackage]) {
|
|
229
|
+
targetVersion = this.to[targetPackage];
|
|
230
|
+
}
|
|
231
|
+
if (!this.getPkgVersion(targetPackage)) {
|
|
232
|
+
this.addPackageUpdate(targetPackage, {
|
|
233
|
+
version: target.version,
|
|
234
|
+
addToPackageJson: target.addToPackageJson || false,
|
|
235
|
+
...(target.ignoreMigrations && { ignoreMigrations: true }),
|
|
236
|
+
});
|
|
237
|
+
return [];
|
|
238
|
+
}
|
|
239
|
+
let migrationConfig;
|
|
240
|
+
try {
|
|
241
|
+
migrationConfig = await this.fetchMigrationConfig(targetPackage, targetVersion);
|
|
242
|
+
}
|
|
243
|
+
catch (e) {
|
|
244
|
+
// A cooldown violation must keep its type so the top-level handler can
|
|
245
|
+
// surface its remediation; only a generic "no matching version" earns the
|
|
246
|
+
// --to hint.
|
|
247
|
+
if (!(e instanceof errors_1.MinReleaseAgeViolationError) &&
|
|
248
|
+
e?.message?.includes('No matching version')) {
|
|
249
|
+
throw new Error(`${e.message}\nRun migrate with --to="package1@version1,package2@version2"`);
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
throw e;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
targetVersion = migrationConfig.version;
|
|
256
|
+
if (this.collectedVersions[targetPackage] &&
|
|
257
|
+
(0, semver_1.gte)(this.collectedVersions[targetPackage], targetVersion)) {
|
|
258
|
+
return [];
|
|
259
|
+
}
|
|
260
|
+
this.collectedVersions[targetPackage] = targetVersion;
|
|
261
|
+
this.addPackageUpdate(targetPackage, {
|
|
262
|
+
version: migrationConfig.version,
|
|
263
|
+
addToPackageJson: target.addToPackageJson || false,
|
|
264
|
+
...(target.ignoreMigrations && { ignoreMigrations: true }),
|
|
265
|
+
});
|
|
266
|
+
const { packageJsonUpdates, packageGroupOrder } = this.getPackageJsonUpdatesFromMigrationConfig(targetPackage, targetVersion, migrationConfig, target.ignorePackageGroup);
|
|
267
|
+
if (!Object.keys(packageJsonUpdates).length) {
|
|
268
|
+
return [];
|
|
269
|
+
}
|
|
270
|
+
const shouldCheckUpdates = Object.values(packageJsonUpdates).some((packageJsonUpdate) => (this.interactive && packageJsonUpdate['x-prompt']) ||
|
|
271
|
+
Object.keys(packageJsonUpdate.requires ?? {}).length ||
|
|
272
|
+
Object.keys(packageJsonUpdate.incompatibleWith ?? {}).length);
|
|
273
|
+
if (shouldCheckUpdates) {
|
|
274
|
+
return [{ package: targetPackage, updates: packageJsonUpdates }];
|
|
275
|
+
}
|
|
276
|
+
const packageUpdatesToApply = Object.values(packageJsonUpdates).reduce((m, c) => ({ ...m, ...c.packages }), {});
|
|
277
|
+
return (await Promise.all(Object.entries(packageUpdatesToApply).map(([packageName, packageUpdate]) => {
|
|
278
|
+
this.validatePackageUpdateVersion(targetPackage, packageName, packageUpdate);
|
|
279
|
+
return this.populatePackageJsonUpdatesAndGetPackagesToCheck(packageName, packageUpdate);
|
|
280
|
+
})))
|
|
281
|
+
.filter((pkgs) => pkgs.length)
|
|
282
|
+
.flat()
|
|
283
|
+
.sort((pkgUpdate1, pkgUpdate2) => packageGroupOrder.indexOf(pkgUpdate1.package) -
|
|
284
|
+
packageGroupOrder.indexOf(pkgUpdate2.package));
|
|
285
|
+
}
|
|
286
|
+
getPackageJsonUpdatesFromMigrationConfig(packageName, targetVersion, migrationConfig, ignorePackageGroup) {
|
|
287
|
+
const packageGroupOrder = this.getPackageJsonUpdatesFromPackageGroup(packageName, targetVersion, migrationConfig, ignorePackageGroup);
|
|
288
|
+
if (!migrationConfig.packageJsonUpdates ||
|
|
289
|
+
!this.getPkgVersion(packageName)) {
|
|
290
|
+
return { packageJsonUpdates: {}, packageGroupOrder };
|
|
291
|
+
}
|
|
292
|
+
const packageJsonUpdates = this.filterPackageJsonUpdates(migrationConfig.packageJsonUpdates, packageName, targetVersion);
|
|
293
|
+
return { packageJsonUpdates, packageGroupOrder };
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Mutates migrationConfig, adding package group updates into packageJsonUpdates section
|
|
297
|
+
*
|
|
298
|
+
* @param packageName Package which is being migrated
|
|
299
|
+
* @param targetVersion Version which is being migrated to
|
|
300
|
+
* @param migrationConfig Configuration which is mutated to contain package json updates
|
|
301
|
+
* @returns Order of package groups
|
|
302
|
+
*/
|
|
303
|
+
getPackageJsonUpdatesFromPackageGroup(packageName, targetVersion, migrationConfig, ignorePackageGroup) {
|
|
304
|
+
if (ignorePackageGroup) {
|
|
305
|
+
return [];
|
|
306
|
+
}
|
|
307
|
+
const packageGroup = packageName === '@nrwl/workspace' && (0, version_utils_1.isLegacyEra)(targetVersion)
|
|
308
|
+
? LEGACY_NRWL_PACKAGE_GROUP
|
|
309
|
+
: (migrationConfig.packageGroup ?? []);
|
|
310
|
+
let packageGroupOrder = [];
|
|
311
|
+
if (packageGroup.length) {
|
|
312
|
+
packageGroupOrder = packageGroup.map((packageConfig) => packageConfig.package);
|
|
313
|
+
migrationConfig.packageJsonUpdates ??= {};
|
|
314
|
+
const packages = {};
|
|
315
|
+
migrationConfig.packageJsonUpdates[targetVersion + '--PackageGroup'] = {
|
|
316
|
+
version: targetVersion,
|
|
317
|
+
packages,
|
|
318
|
+
};
|
|
319
|
+
for (const packageConfig of packageGroup) {
|
|
320
|
+
packages[packageConfig.package] = {
|
|
321
|
+
version: packageConfig.version === '*'
|
|
322
|
+
? targetVersion
|
|
323
|
+
: packageConfig.version,
|
|
324
|
+
alwaysAddToPackageJson: false,
|
|
325
|
+
};
|
|
326
|
+
if (packageConfig.version === '*' &&
|
|
327
|
+
this.installedPkgVersionOverrides[packageName]) {
|
|
328
|
+
this.installedPkgVersionOverrides[packageConfig.package] ??=
|
|
329
|
+
this.installedPkgVersionOverrides[packageName];
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
return packageGroupOrder;
|
|
334
|
+
}
|
|
335
|
+
filterPackageJsonUpdates(packageJsonUpdates, packageName, targetVersion) {
|
|
336
|
+
const filteredPackageJsonUpdates = {};
|
|
337
|
+
for (const [packageJsonUpdateKey, packageJsonUpdate] of Object.entries(packageJsonUpdates)) {
|
|
338
|
+
if (!packageJsonUpdate.packages ||
|
|
339
|
+
this.lt(packageJsonUpdate.version, this.getPkgVersion(packageName)) ||
|
|
340
|
+
this.gt(packageJsonUpdate.version, targetVersion)) {
|
|
341
|
+
continue;
|
|
342
|
+
}
|
|
343
|
+
const dependencies = {
|
|
344
|
+
...this.packageJson?.dependencies,
|
|
345
|
+
...this.packageJson?.devDependencies,
|
|
346
|
+
...this.nxInstallation?.plugins,
|
|
347
|
+
...(this.nxInstallation && { nx: this.nxInstallation.version }),
|
|
348
|
+
};
|
|
349
|
+
const filtered = {};
|
|
350
|
+
for (const [packageName, packageUpdate] of Object.entries(packageJsonUpdate.packages)) {
|
|
351
|
+
if (this.shouldExcludePackage(packageName)) {
|
|
352
|
+
continue;
|
|
353
|
+
}
|
|
354
|
+
if (this.shouldApplyPackageUpdate(packageUpdate, packageName, dependencies)) {
|
|
355
|
+
filtered[packageName] = {
|
|
356
|
+
version: packageUpdate.version,
|
|
357
|
+
addToPackageJson: packageUpdate.alwaysAddToPackageJson
|
|
358
|
+
? typeof packageUpdate.alwaysAddToPackageJson === 'string'
|
|
359
|
+
? packageUpdate.alwaysAddToPackageJson
|
|
360
|
+
: 'dependencies'
|
|
361
|
+
: packageUpdate.addToPackageJson || false,
|
|
362
|
+
...(packageUpdate.ignorePackageGroup && {
|
|
363
|
+
ignorePackageGroup: true,
|
|
364
|
+
}),
|
|
365
|
+
...(packageUpdate.ignoreMigrations && {
|
|
366
|
+
ignoreMigrations: true,
|
|
367
|
+
}),
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
if (Object.keys(filtered).length) {
|
|
372
|
+
packageJsonUpdate.packages = filtered;
|
|
373
|
+
filteredPackageJsonUpdates[packageJsonUpdateKey] = packageJsonUpdate;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return filteredPackageJsonUpdates;
|
|
377
|
+
}
|
|
378
|
+
shouldExcludePackage(packageName) {
|
|
379
|
+
if (!this.requiredPackages) {
|
|
380
|
+
return false;
|
|
381
|
+
}
|
|
382
|
+
if (this.include === 'required') {
|
|
383
|
+
return !this.requiredPackages.has(packageName);
|
|
384
|
+
}
|
|
385
|
+
return false;
|
|
386
|
+
}
|
|
387
|
+
applyIncludeFilter() {
|
|
388
|
+
if (this.include !== 'optional') {
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
// Cascade walks through the required packages so cross-plugin optional
|
|
392
|
+
// deps (e.g. typescript managed by @nx/js but used by @nx/angular) get
|
|
393
|
+
// surfaced. Drop the required set from the final result here so only
|
|
394
|
+
// optional updates land in package.json.
|
|
395
|
+
for (const name of Object.keys(this.packageUpdates)) {
|
|
396
|
+
if (this.requiredPackages.has(name)) {
|
|
397
|
+
delete this.packageUpdates[name];
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
shouldApplyPackageUpdate(packageUpdate, packageName, dependencies) {
|
|
402
|
+
return ((!packageUpdate.ifPackageInstalled ||
|
|
403
|
+
this.getPkgVersion(packageUpdate.ifPackageInstalled)) &&
|
|
404
|
+
(packageUpdate.alwaysAddToPackageJson ||
|
|
405
|
+
packageUpdate.addToPackageJson ||
|
|
406
|
+
!!dependencies?.[packageName]) &&
|
|
407
|
+
(!this.collectedVersions[packageName] ||
|
|
408
|
+
this.gt(packageUpdate.version, this.collectedVersions[packageName])));
|
|
409
|
+
}
|
|
410
|
+
validatePackageUpdateVersion(sourcePackageName, packageName, packageUpdate) {
|
|
411
|
+
if (!packageUpdate.version) {
|
|
412
|
+
throw new Error(`Fetched migration metadata for ${sourcePackageName} is invalid: the target version for ${packageName} is missing.`);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
addPackageUpdate(name, packageUpdate) {
|
|
416
|
+
if (!this.packageUpdates[name] ||
|
|
417
|
+
this.gt(packageUpdate.version, this.packageUpdates[name].version)) {
|
|
418
|
+
this.packageUpdates[name] = packageUpdate;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
areRequirementsMet(requirements) {
|
|
422
|
+
if (!requirements || !Object.keys(requirements).length) {
|
|
423
|
+
return true;
|
|
424
|
+
}
|
|
425
|
+
return Object.entries(requirements).every(([pkgName, versionRange]) => {
|
|
426
|
+
if (this.packageUpdates[pkgName]) {
|
|
427
|
+
return (0, semver_1.satisfies)(cleanSemver(this.packageUpdates[pkgName].version), versionRange, { includePrerelease: true });
|
|
428
|
+
}
|
|
429
|
+
return (this.getPkgVersion(pkgName) &&
|
|
430
|
+
(0, semver_1.satisfies)(this.getPkgVersion(pkgName), versionRange, {
|
|
431
|
+
includePrerelease: true,
|
|
432
|
+
}));
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
areIncompatiblePackagesPresent(incompatibleWith) {
|
|
436
|
+
if (!incompatibleWith || !Object.keys(incompatibleWith).length) {
|
|
437
|
+
return false;
|
|
438
|
+
}
|
|
439
|
+
return Object.entries(incompatibleWith).some(([pkgName, versionRange]) => {
|
|
440
|
+
if (this.packageUpdates[pkgName]) {
|
|
441
|
+
return (0, semver_1.satisfies)(cleanSemver(this.packageUpdates[pkgName].version), versionRange, { includePrerelease: true });
|
|
442
|
+
}
|
|
443
|
+
return (this.getPkgVersion(pkgName) &&
|
|
444
|
+
(0, semver_1.satisfies)(this.getPkgVersion(pkgName), versionRange, {
|
|
445
|
+
includePrerelease: true,
|
|
446
|
+
}));
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
areMigrationRequirementsMet(packageName, migration) {
|
|
450
|
+
if (!this.excludeAppliedMigrations) {
|
|
451
|
+
return this.areRequirementsMet(migration.requires);
|
|
452
|
+
}
|
|
453
|
+
return ((this.wasMigrationSkipped(migration.requires) ||
|
|
454
|
+
this.isMigrationForHigherVersionThanWhatIsInstalled(packageName, migration)) &&
|
|
455
|
+
this.areRequirementsMet(migration.requires));
|
|
456
|
+
}
|
|
457
|
+
isMigrationForHigherVersionThanWhatIsInstalled(packageName, migration) {
|
|
458
|
+
const installedVersion = this.getInstalledPackageVersion(packageName);
|
|
459
|
+
return (migration.version &&
|
|
460
|
+
(!installedVersion || this.gt(migration.version, installedVersion)) &&
|
|
461
|
+
this.lte(migration.version, this.packageUpdates[packageName].version));
|
|
462
|
+
}
|
|
463
|
+
wasMigrationSkipped(requirements) {
|
|
464
|
+
// no requiremets, so it ran before
|
|
465
|
+
if (!requirements || !Object.keys(requirements).length) {
|
|
466
|
+
return false;
|
|
467
|
+
}
|
|
468
|
+
// at least a requirement was not met, it was skipped
|
|
469
|
+
return Object.entries(requirements).some(([pkgName, versionRange]) => !this.getInstalledPackageVersion(pkgName) ||
|
|
470
|
+
!(0, semver_1.satisfies)(this.getInstalledPackageVersion(pkgName), versionRange, {
|
|
471
|
+
includePrerelease: true,
|
|
472
|
+
}));
|
|
473
|
+
}
|
|
474
|
+
async runPackageJsonUpdatesConfirmationPrompt(packageUpdate, packageUpdateKey, packageName) {
|
|
475
|
+
if (!packageUpdate['x-prompt']) {
|
|
476
|
+
return Promise.resolve(true);
|
|
477
|
+
}
|
|
478
|
+
const promptKey = this.getPackageUpdatePromptKey(packageUpdate);
|
|
479
|
+
if (this.promptAnswers[promptKey] !== undefined) {
|
|
480
|
+
// a same prompt was already answered, skip
|
|
481
|
+
return Promise.resolve(false);
|
|
482
|
+
}
|
|
483
|
+
const promptConfig = {
|
|
484
|
+
name: 'shouldApply',
|
|
485
|
+
type: 'confirm',
|
|
486
|
+
message: packageUpdate['x-prompt'],
|
|
487
|
+
initial: true,
|
|
488
|
+
};
|
|
489
|
+
if (packageName.startsWith('@nx/')) {
|
|
490
|
+
// @ts-expect-error -- enquirer types aren't correct, footer does exist
|
|
491
|
+
promptConfig.footer = () => pc.dim(` View migration details at https://nx.dev/nx-api/${packageName.replace('@nx/', '')}#${packageUpdateKey.replace(/[-\.]/g, '')}packageupdates`);
|
|
492
|
+
}
|
|
493
|
+
return await (0, safe_prompt_1.migratePrompt)([promptConfig]).then(({ shouldApply }) => {
|
|
494
|
+
this.promptAnswers[promptKey] = shouldApply;
|
|
495
|
+
if (!shouldApply &&
|
|
496
|
+
(!this.minVersionWithSkippedUpdates ||
|
|
497
|
+
(0, semver_1.lt)(packageUpdate.version, this.minVersionWithSkippedUpdates))) {
|
|
498
|
+
this.minVersionWithSkippedUpdates = packageUpdate.version;
|
|
499
|
+
}
|
|
500
|
+
return shouldApply;
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
getPackageUpdatePromptKey(packageUpdate) {
|
|
504
|
+
return Object.entries(packageUpdate.packages)
|
|
505
|
+
.map(([name, update]) => `${name}:${JSON.stringify(update)}`)
|
|
506
|
+
.join('|');
|
|
507
|
+
}
|
|
508
|
+
getPkgVersion(pkg) {
|
|
509
|
+
return this.getInstalledPackageVersion(pkg, this.installedPkgVersionOverrides);
|
|
510
|
+
}
|
|
511
|
+
gt(v1, v2) {
|
|
512
|
+
return (0, semver_1.gt)((0, version_utils_1.normalizeVersion)(v1), (0, version_utils_1.normalizeVersion)(v2));
|
|
513
|
+
}
|
|
514
|
+
lt(v1, v2) {
|
|
515
|
+
return (0, semver_1.lt)((0, version_utils_1.normalizeVersion)(v1), (0, version_utils_1.normalizeVersion)(v2));
|
|
516
|
+
}
|
|
517
|
+
lte(v1, v2) {
|
|
518
|
+
return (0, semver_1.lte)((0, version_utils_1.normalizeVersion)(v1), (0, version_utils_1.normalizeVersion)(v2));
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
exports.Migrator = Migrator;
|
|
522
|
+
const LEGACY_NRWL_PACKAGE_GROUP = [
|
|
523
|
+
{ package: '@nrwl/workspace', version: '*' },
|
|
524
|
+
{ package: '@nrwl/angular', version: '*' },
|
|
525
|
+
{ package: '@nrwl/cypress', version: '*' },
|
|
526
|
+
{ package: '@nrwl/devkit', version: '*' },
|
|
527
|
+
{ package: '@nrwl/eslint-plugin-nx', version: '*' },
|
|
528
|
+
{ package: '@nrwl/express', version: '*' },
|
|
529
|
+
{ package: '@nrwl/jest', version: '*' },
|
|
530
|
+
{ package: '@nrwl/linter', version: '*' },
|
|
531
|
+
{ package: '@nrwl/nest', version: '*' },
|
|
532
|
+
{ package: '@nrwl/next', version: '*' },
|
|
533
|
+
{ package: '@nrwl/node', version: '*' },
|
|
534
|
+
{ package: '@nrwl/nx-plugin', version: '*' },
|
|
535
|
+
{ package: '@nrwl/react', version: '*' },
|
|
536
|
+
{ package: '@nrwl/storybook', version: '*' },
|
|
537
|
+
{ package: '@nrwl/web', version: '*' },
|
|
538
|
+
{ package: '@nrwl/js', version: '*' },
|
|
539
|
+
{ package: 'nx-cloud', version: 'latest' },
|
|
540
|
+
{ package: '@nrwl/react-native', version: '*' },
|
|
541
|
+
{ package: '@nrwl/detox', version: '*' },
|
|
542
|
+
{ package: '@nrwl/expo', version: '*' },
|
|
543
|
+
{ package: '@nrwl/tao', version: '*' },
|
|
544
|
+
];
|
|
545
|
+
function resolveRequiredPackages(targetPackage, packageGroup) {
|
|
546
|
+
const set = new Set([targetPackage]);
|
|
547
|
+
for (const { package: name } of packageGroup ?? []) {
|
|
548
|
+
set.add(name);
|
|
549
|
+
}
|
|
550
|
+
return set;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* The canonical Nx package for a given target version: `@nrwl/workspace` for
|
|
554
|
+
* legacy (`< 14.0.0-beta.0`), `nx` otherwise. Non-semver inputs (e.g. the
|
|
555
|
+
* literal `'latest'` sentinel before tag resolution) resolve to modern era.
|
|
556
|
+
*/
|
|
557
|
+
function resolveCanonicalNxPackage(targetVersion) {
|
|
558
|
+
return (0, version_utils_1.isLegacyEra)(targetVersion) ? '@nrwl/workspace' : 'nx';
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* `@nx/workspace` is version-synced with `nx` but declares an intentionally
|
|
562
|
+
* narrow `packageGroup`; resolve eligibility, bounds, and the optional walk
|
|
563
|
+
* against `nx`'s full closure so they match what the cascade actually walks.
|
|
564
|
+
*/
|
|
565
|
+
function toNxClosurePackage(packageName) {
|
|
566
|
+
return packageName === '@nx/workspace' ? 'nx' : packageName;
|
|
567
|
+
}
|
|
568
|
+
async function resolveInclude(include, context, configuredInclude) {
|
|
569
|
+
// An explicit `--include` is validated against the target's `supportsOptionalMigrations` in
|
|
570
|
+
// `resolveTargetAndInclude`, so honor it directly here.
|
|
571
|
+
if (include) {
|
|
572
|
+
(0, migrate_analytics_1.setMigrateIncludeSource)('flag');
|
|
573
|
+
return include;
|
|
574
|
+
}
|
|
575
|
+
// Targets that don't declare `supportsOptionalMigrations` only ever run the full
|
|
576
|
+
// migration; there is nothing to pick between.
|
|
577
|
+
if (!context.targetSupportsOptionalUpdates) {
|
|
578
|
+
if (configuredInclude && configuredInclude !== 'all') {
|
|
579
|
+
output_1.output.warn({
|
|
580
|
+
title: `The configured nx.json migrate.include '${configuredInclude}' is not available for this migration; falling back to 'all'.`,
|
|
581
|
+
bodyLines: [`The target package does not support optional updates.`],
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
(0, migrate_analytics_1.setMigrateIncludeSource)('default');
|
|
585
|
+
return 'all';
|
|
586
|
+
}
|
|
587
|
+
// nx.json `migrate.include` pre-selects the answer the prompt would ask for.
|
|
588
|
+
if (configuredInclude) {
|
|
589
|
+
(0, migrate_analytics_1.setMigrateIncludeSource)('nx-json');
|
|
590
|
+
return configuredInclude;
|
|
591
|
+
}
|
|
592
|
+
const choices = [
|
|
593
|
+
{
|
|
594
|
+
name: 'required',
|
|
595
|
+
message: 'Required only (the target package and the packages it ships with)',
|
|
596
|
+
},
|
|
597
|
+
];
|
|
598
|
+
// `--interactive` keeps the legacy x-prompt flow, which the `optional` value
|
|
599
|
+
// supersedes and is incompatible with, so omit it when interactive.
|
|
600
|
+
if (!context.hasFrom &&
|
|
601
|
+
!context.hasExcludeAppliedMigrations &&
|
|
602
|
+
context.interactive !== true) {
|
|
603
|
+
choices.push({
|
|
604
|
+
name: 'optional',
|
|
605
|
+
message: 'Optional only (the dependency updates those packages recommend)',
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
if (!(0, safe_prompt_1.canPrompt)(context.interactive)) {
|
|
609
|
+
(0, migrate_analytics_1.setMigrateIncludeSource)('default');
|
|
610
|
+
return 'all';
|
|
611
|
+
}
|
|
612
|
+
choices.push({
|
|
613
|
+
name: 'all',
|
|
614
|
+
message: 'All (required and optional)',
|
|
615
|
+
});
|
|
616
|
+
const { include: selected } = await (0, safe_prompt_1.migratePrompt)({
|
|
617
|
+
type: 'select',
|
|
618
|
+
name: 'include',
|
|
619
|
+
message: 'Which packages would you like to migrate?',
|
|
620
|
+
choices,
|
|
621
|
+
});
|
|
622
|
+
(0, migrate_analytics_1.reportMigratePrompt)('include', selected);
|
|
623
|
+
(0, migrate_analytics_1.setMigrateIncludeSource)('prompt');
|
|
624
|
+
return selected;
|
|
625
|
+
}
|
|
626
|
+
async function versionOverrides(overrides, param) {
|
|
627
|
+
const res = {};
|
|
628
|
+
const promises = overrides.split(',').map((p) => {
|
|
629
|
+
const split = p.lastIndexOf('@');
|
|
630
|
+
if (split === -1 || split === 0) {
|
|
631
|
+
throw new Error(`Incorrect '${param}' section. Use --${param}="package@version"`);
|
|
632
|
+
}
|
|
633
|
+
const selectedPackage = p.substring(0, split).trim();
|
|
634
|
+
const selectedVersion = p.substring(split + 1).trim();
|
|
635
|
+
if (!selectedPackage || !selectedVersion) {
|
|
636
|
+
throw new Error(`Incorrect '${param}' section. Use --${param}="package@version"`);
|
|
637
|
+
}
|
|
638
|
+
return (0, version_utils_1.normalizeVersionWithTagCheck)(selectedPackage, selectedVersion).then((version) => {
|
|
639
|
+
res[normalizeSlashes(selectedPackage)] = version;
|
|
640
|
+
});
|
|
641
|
+
});
|
|
642
|
+
await Promise.all(promises);
|
|
643
|
+
return res;
|
|
644
|
+
}
|
|
645
|
+
async function parseTargetPackageAndVersion(args) {
|
|
646
|
+
if (!args) {
|
|
647
|
+
throw new Error(`Provide the correct package name and version. E.g., my-package@9.0.0.`);
|
|
648
|
+
}
|
|
649
|
+
if (args.indexOf('@') > -1) {
|
|
650
|
+
const i = args.lastIndexOf('@');
|
|
651
|
+
if (i === 0) {
|
|
652
|
+
return { targetPackage: args.trim(), targetVersion: 'latest' };
|
|
653
|
+
}
|
|
654
|
+
const targetPackage = args.substring(0, i);
|
|
655
|
+
const maybeVersion = args.substring(i + 1);
|
|
656
|
+
if (!targetPackage || !maybeVersion) {
|
|
657
|
+
throw new Error(`Provide the correct package name and version. E.g., my-package@9.0.0.`);
|
|
658
|
+
}
|
|
659
|
+
const targetVersion = await (0, version_utils_1.normalizeVersionWithTagCheck)(targetPackage, maybeVersion);
|
|
660
|
+
return { targetPackage, targetVersion };
|
|
661
|
+
}
|
|
662
|
+
if (version_utils_1.DIST_TAGS.includes(args) ||
|
|
663
|
+
(0, semver_1.valid)(args) ||
|
|
664
|
+
args.match(/^\d+(?:\.\d+)?(?:\.\d+)?$/)) {
|
|
665
|
+
// Passing `nx` here may seem wrong, but nx and @nrwl/workspace are synced in version.
|
|
666
|
+
// We could duplicate the ternary below, but its not necessary since they are equivalent
|
|
667
|
+
// on the registry
|
|
668
|
+
const targetVersion = await (0, version_utils_1.normalizeVersionWithTagCheck)('nx', args);
|
|
669
|
+
const isDistTag = version_utils_1.DIST_TAGS.includes(args);
|
|
670
|
+
const targetPackage = isDistTag
|
|
671
|
+
? 'nx'
|
|
672
|
+
: resolveCanonicalNxPackage(targetVersion);
|
|
673
|
+
return { targetPackage, targetVersion };
|
|
674
|
+
}
|
|
675
|
+
return { targetPackage: args, targetVersion: 'latest' };
|
|
676
|
+
}
|
|
677
|
+
async function parseMigrationsOptions(options, fetch) {
|
|
678
|
+
if (options.runMigrations === '') {
|
|
679
|
+
options.runMigrations = 'migrations.json';
|
|
680
|
+
}
|
|
681
|
+
if (options.include && options.runMigrations) {
|
|
682
|
+
throw new Error(`Error: '--include' cannot be combined with '--run-migrations'.`);
|
|
683
|
+
}
|
|
684
|
+
if (options.multiMajorMode && options.runMigrations) {
|
|
685
|
+
throw new Error(`Error: '--multi-major-mode' cannot be combined with '--run-migrations'.`);
|
|
686
|
+
}
|
|
687
|
+
if (options.runMigrations) {
|
|
688
|
+
return {
|
|
689
|
+
type: 'runMigrations',
|
|
690
|
+
runMigrations: options.runMigrations,
|
|
691
|
+
ifExists: options.ifExists,
|
|
692
|
+
agentic: options.agentic,
|
|
693
|
+
validate: options.validate,
|
|
694
|
+
interactive: options.interactive,
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
assertOptionalIncludeFlagCompatibility(options);
|
|
698
|
+
const [from, to] = await Promise.all([
|
|
699
|
+
options.from
|
|
700
|
+
? versionOverrides(options.from, 'from')
|
|
701
|
+
: Promise.resolve({}),
|
|
702
|
+
options.to
|
|
703
|
+
? await versionOverrides(options.to, 'to')
|
|
704
|
+
: Promise.resolve({}),
|
|
705
|
+
]);
|
|
706
|
+
// The gate reads `supportsOptionalMigrations` through this fetcher (registry-first, install
|
|
707
|
+
// fallback) so private registries don't fail closed. In production the caller
|
|
708
|
+
// shares its fetcher; standalone callers (tests) get a fresh one.
|
|
709
|
+
const resolvedFetch = fetch ?? createFetcher((0, package_manager_1.getPackageManagerCommand)());
|
|
710
|
+
const positional = options['packageAndVersion'];
|
|
711
|
+
const resolved = await resolveTargetAndInclude({
|
|
712
|
+
positional,
|
|
713
|
+
from,
|
|
714
|
+
options,
|
|
715
|
+
fetch: resolvedFetch,
|
|
716
|
+
});
|
|
717
|
+
const { include, installedTargetVersion } = resolved;
|
|
718
|
+
let { targetPackage, targetVersion } = resolved;
|
|
719
|
+
// Crossing more than one major can silently skip migrations: each
|
|
720
|
+
// major's metadata may have pruned entries from much-older versions.
|
|
721
|
+
const multiMajorResult = await (0, multi_major_1.maybePromptOrWarnMultiMajorMigration)({
|
|
722
|
+
include,
|
|
723
|
+
options,
|
|
724
|
+
targetPackage,
|
|
725
|
+
targetVersion,
|
|
726
|
+
});
|
|
727
|
+
targetVersion = multiMajorResult.chosen;
|
|
728
|
+
if (include === 'optional') {
|
|
729
|
+
// `include` can resolve to optional via nx.json, which bypasses the early
|
|
730
|
+
// CLI-only check above; re-assert against the resolved value.
|
|
731
|
+
assertOptionalIncludeFlagCompatibility({
|
|
732
|
+
include,
|
|
733
|
+
from: options.from,
|
|
734
|
+
excludeAppliedMigrations: options.excludeAppliedMigrations,
|
|
735
|
+
interactive: options.interactive,
|
|
736
|
+
});
|
|
737
|
+
assertOptionalTargetBounds({
|
|
738
|
+
targetPackage,
|
|
739
|
+
targetVersion,
|
|
740
|
+
to,
|
|
741
|
+
// `resolveTargetAndInclude` always resolves the installed bounds version for
|
|
742
|
+
// the `optional` value (or throws), so it is present here.
|
|
743
|
+
installedTargetVersion: installedTargetVersion,
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
return {
|
|
747
|
+
type: 'generateMigrations',
|
|
748
|
+
targetPackage,
|
|
749
|
+
targetVersion,
|
|
750
|
+
from,
|
|
751
|
+
to,
|
|
752
|
+
interactive: options.interactive,
|
|
753
|
+
excludeAppliedMigrations: options.excludeAppliedMigrations,
|
|
754
|
+
include,
|
|
755
|
+
originalTargetVersion: multiMajorResult.originalTarget,
|
|
756
|
+
multiMajorMode: multiMajorResult.gradual ? 'gradual' : undefined,
|
|
757
|
+
multiMajorChoice: multiMajorResult.decision,
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
function assertOptionalIncludeFlagCompatibility(options) {
|
|
761
|
+
if (options.include !== 'optional')
|
|
762
|
+
return;
|
|
763
|
+
if (options.from) {
|
|
764
|
+
throw new Error(`Error: '--include=optional' cannot be combined with '--from'.`);
|
|
765
|
+
}
|
|
766
|
+
if (options.excludeAppliedMigrations === true) {
|
|
767
|
+
throw new Error(`Error: '--include=optional' cannot be combined with '--exclude-applied-migrations'.`);
|
|
768
|
+
}
|
|
769
|
+
if (options.interactive === true) {
|
|
770
|
+
throw new Error(`Error: '--include=optional' cannot be combined with '--interactive'.`);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
// Resolves the target package/version up front (the `optional` value anchors to
|
|
774
|
+
// the installed target; otherwise dist-tags resolve to a concrete version), then
|
|
775
|
+
// resolves the include value and rejects `--include` when the target doesn't support it.
|
|
776
|
+
// Bare invocations require an explicit target on older installs rather than
|
|
777
|
+
// defaulting to `latest` across a large major gap.
|
|
778
|
+
async function resolveTargetAndInclude(args) {
|
|
779
|
+
const { positional, from, options, fetch } = args;
|
|
780
|
+
let targetPackage;
|
|
781
|
+
let targetVersion;
|
|
782
|
+
if (positional) {
|
|
783
|
+
const parsed = await parseTargetPackageAndVersion(positional);
|
|
784
|
+
targetPackage = normalizeSlashes(parsed.targetPackage);
|
|
785
|
+
targetVersion = parsed.targetVersion;
|
|
786
|
+
}
|
|
787
|
+
const installed = resolveInstalledCanonical();
|
|
788
|
+
const installedMajor = installed && (0, semver_1.valid)(installed.version) ? (0, semver_1.major)(installed.version) : null;
|
|
789
|
+
// `--include=optional` anchors the target to the installed version below, so
|
|
790
|
+
// it never needs a target or dist-tag resolved up front.
|
|
791
|
+
const isExplicitOptional = options.include === 'optional';
|
|
792
|
+
// Bare `nx migrate` defaults to `nx@latest`. Only do so from a recent-enough
|
|
793
|
+
// install (v22+); an unknown or far-behind version would otherwise silently
|
|
794
|
+
// run a large multi-major jump, so require an explicit target there instead.
|
|
795
|
+
if (!positional && !isExplicitOptional) {
|
|
796
|
+
if (installedMajor === null || installedMajor < 22) {
|
|
797
|
+
throw new Error(`Provide the package and version to migrate to. E.g., \`nx migrate nx@<version>\`.`);
|
|
798
|
+
}
|
|
799
|
+
targetPackage = 'nx';
|
|
800
|
+
targetVersion = 'latest';
|
|
801
|
+
}
|
|
802
|
+
// Resolve dist-tags to a concrete version so the `supportsOptionalMigrations` gate and the
|
|
803
|
+
// downstream cascade read a real semver. Explicit dist-tags arrive already
|
|
804
|
+
// resolved from `parseTargetPackageAndVersion`; only bare invocations and
|
|
805
|
+
// bare package names (`nx migrate nx`) reach here unresolved.
|
|
806
|
+
if (!isExplicitOptional &&
|
|
807
|
+
targetPackage &&
|
|
808
|
+
targetVersion &&
|
|
809
|
+
!(0, semver_1.valid)(targetVersion)) {
|
|
810
|
+
try {
|
|
811
|
+
targetVersion = await (0, version_utils_1.normalizeVersionWithTagCheck)(targetPackage, targetVersion);
|
|
812
|
+
}
|
|
813
|
+
catch {
|
|
814
|
+
// Registry unavailable: keep the tag. The sentinel degrades gracefully
|
|
815
|
+
// downstream (multi-major and the cascade tolerate it).
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
// `--include` is only available for targets that opt in via `supportsOptionalMigrations`.
|
|
819
|
+
// required/all/prompt/nx.json read the flag at the version being migrated
|
|
820
|
+
// to. Skipped when the include value can't depend on it (no `--include`, no nx.json
|
|
821
|
+
// default, no interactive prompt) and for the explicit `optional` value, which
|
|
822
|
+
// anchors to the installed target and reads at that version below.
|
|
823
|
+
let targetSupportsOptionalUpdates = false;
|
|
824
|
+
// The package/version whose `supportsOptionalMigrations` flag the gate actually read,
|
|
825
|
+
// surfaced verbatim in the rejection message below.
|
|
826
|
+
let eligibilityPackage = targetPackage;
|
|
827
|
+
let eligibilityVersion = targetVersion;
|
|
828
|
+
if (!isExplicitOptional &&
|
|
829
|
+
targetPackage &&
|
|
830
|
+
(options.include ||
|
|
831
|
+
options.includeFromConfig ||
|
|
832
|
+
(0, safe_prompt_1.canPrompt)(options.interactive))) {
|
|
833
|
+
// Read at the canonical closure package so the gate shares the cascade's
|
|
834
|
+
// cached fetch (the walk normalizes `@nx/workspace` -> `nx` too).
|
|
835
|
+
eligibilityPackage = toNxClosurePackage(targetPackage);
|
|
836
|
+
targetSupportsOptionalUpdates = await fetchSupportsOptionalUpdates(fetch, eligibilityPackage, targetVersion);
|
|
837
|
+
}
|
|
838
|
+
// Recorded before the interactive prompts (include, multi-major) so runs
|
|
839
|
+
// abandoned at a prompt still register a start.
|
|
840
|
+
(0, migrate_analytics_1.reportMigrateGenerateStart)({
|
|
841
|
+
targetPackage: targetPackage ?? 'nx',
|
|
842
|
+
interactive: options.interactive,
|
|
843
|
+
excludeAppliedMigrations: options.excludeAppliedMigrations,
|
|
844
|
+
});
|
|
845
|
+
const include = await resolveInclude(options.include, {
|
|
846
|
+
hasFrom: Object.keys(from).length > 0,
|
|
847
|
+
hasExcludeAppliedMigrations: options.excludeAppliedMigrations === true,
|
|
848
|
+
interactive: options.interactive,
|
|
849
|
+
targetSupportsOptionalUpdates,
|
|
850
|
+
}, options.includeFromConfig);
|
|
851
|
+
let installedTargetVersion;
|
|
852
|
+
// The `optional` value catches up the deps the target manages for the version
|
|
853
|
+
// you are already on, capped at the installed version. `@nx/workspace` is
|
|
854
|
+
// version-synced with `nx` but declares a narrower group, so resolve the
|
|
855
|
+
// installed bounds against `nx`'s full closure.
|
|
856
|
+
if (include === 'optional') {
|
|
857
|
+
if (!positional) {
|
|
858
|
+
// Bare `--include=optional`: catch up the deps Nx manages for installed Nx.
|
|
859
|
+
if (!installed) {
|
|
860
|
+
throw new Error(`Error: '--include=optional' requires 'nx' (or '@nrwl/workspace' on Nx <14) to be installed in your workspace. Install dependencies first, then re-run.`);
|
|
861
|
+
}
|
|
862
|
+
targetPackage = installed.canonical;
|
|
863
|
+
installedTargetVersion = installed.version;
|
|
864
|
+
targetVersion = installedTargetVersion;
|
|
865
|
+
}
|
|
866
|
+
else {
|
|
867
|
+
const boundsPackage = toNxClosurePackage(targetPackage);
|
|
868
|
+
installedTargetVersion = (0, installed_nx_version_1.getInstalledVersion)(boundsPackage);
|
|
869
|
+
if (!installedTargetVersion) {
|
|
870
|
+
throw new Error(`Error: '--include=optional' requires '${boundsPackage}' to be installed in your workspace. Install dependencies first, then re-run.`);
|
|
871
|
+
}
|
|
872
|
+
// A bare package name (no semver, surfaced as the literal `'latest'`)
|
|
873
|
+
// anchors the catch-up walk to installed; an explicit version is kept and
|
|
874
|
+
// bounded against installed downstream.
|
|
875
|
+
if (!(0, semver_1.valid)(targetVersion)) {
|
|
876
|
+
targetVersion = installedTargetVersion;
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
// An explicit `--include=optional` is gated on the INSTALLED version's flag:
|
|
880
|
+
// you catch up the deps you already have, so eligibility follows the
|
|
881
|
+
// installed package, not the (possibly older) explicit target. Config /
|
|
882
|
+
// prompt-derived `optional` value was already vetted via the to-target read.
|
|
883
|
+
if (options.include === 'optional') {
|
|
884
|
+
eligibilityPackage = toNxClosurePackage(targetPackage);
|
|
885
|
+
eligibilityVersion = installedTargetVersion;
|
|
886
|
+
targetSupportsOptionalUpdates = await fetchSupportsOptionalUpdates(fetch, eligibilityPackage, installedTargetVersion);
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
if (options.include && !targetSupportsOptionalUpdates) {
|
|
890
|
+
throw new Error(`Error: '--include' requires the target package to support optional updates, but '${eligibilityPackage}@${eligibilityVersion}' does not.`);
|
|
891
|
+
}
|
|
892
|
+
return {
|
|
893
|
+
targetPackage: targetPackage,
|
|
894
|
+
targetVersion: targetVersion,
|
|
895
|
+
include,
|
|
896
|
+
installedTargetVersion,
|
|
897
|
+
};
|
|
898
|
+
}
|
|
899
|
+
// `--include` is opt-in per package via `supportsOptionalMigrations` in the target's
|
|
900
|
+
// `nx-migrations`/`ng-update` config. Read it through the shared fetcher
|
|
901
|
+
// (registry-first, install fallback) so registries that can't serve metadata
|
|
902
|
+
// via `npm view` resolve it from an install rather than failing the gate.
|
|
903
|
+
async function fetchSupportsOptionalUpdates(fetch, packageName, packageVersion) {
|
|
904
|
+
const config = await fetch(packageName, packageVersion);
|
|
905
|
+
return config.supportsOptionalMigrations === true;
|
|
906
|
+
}
|
|
907
|
+
// `--include=optional` upper-bound gate. The optional walk catches up from
|
|
908
|
+
// zero, so a target or `--to` above the installed version would surface
|
|
909
|
+
// optional bumps that only exist in the newer package's history. The
|
|
910
|
+
// required set is the target package's declared `packageGroup`; the legacy
|
|
911
|
+
// era falls back to the hardcoded `LEGACY_NRWL_PACKAGE_GROUP`. `installed` is
|
|
912
|
+
// the installed bounds version already resolved by `resolveTargetAndInclude`.
|
|
913
|
+
function assertOptionalTargetBounds(args) {
|
|
914
|
+
const { targetPackage, targetVersion, to, installedTargetVersion: installed, } = args;
|
|
915
|
+
const boundsPackage = toNxClosurePackage(targetPackage);
|
|
916
|
+
if ((0, semver_1.gt)(targetVersion, installed)) {
|
|
917
|
+
throw new Error(`Error: '--include=optional' cannot migrate to a version higher than what is currently installed (got '${targetPackage}@${targetVersion}', installed '${boundsPackage}@${installed}'). Either drop '--include=optional' or lower the target.`);
|
|
918
|
+
}
|
|
919
|
+
const requiredSet = (0, version_utils_1.isLegacyEra)(targetVersion)
|
|
920
|
+
? new Set([
|
|
921
|
+
boundsPackage,
|
|
922
|
+
...LEGACY_NRWL_PACKAGE_GROUP.map((p) => p.package),
|
|
923
|
+
])
|
|
924
|
+
: (0, installed_nx_version_1.getInstalledPackageGroup)(boundsPackage);
|
|
925
|
+
for (const [pkg, version] of Object.entries(to)) {
|
|
926
|
+
if (requiredSet.has(pkg) && (0, semver_1.gt)(version, installed)) {
|
|
927
|
+
throw new Error(`Error: '--include=optional' cannot migrate to a version higher than what is currently installed (got '--to ${pkg}@${version}', installed '${boundsPackage}@${installed}'). Either drop '--include=optional' or lower the '--to' value.`);
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Pick the canonical Nx package + version for `--include=optional` when the
|
|
933
|
+
* user didn't supply an explicit version. Returns `'nx'` for modern era,
|
|
934
|
+
* falls back to `'@nrwl/workspace'` (legacy era) when only that is installed
|
|
935
|
+
* or when the installed `nx` itself is `<14`.
|
|
936
|
+
*/
|
|
937
|
+
function resolveInstalledCanonical() {
|
|
938
|
+
const installedNx = (0, installed_nx_version_1.getInstalledNxVersion)();
|
|
939
|
+
if (installedNx) {
|
|
940
|
+
return {
|
|
941
|
+
canonical: resolveCanonicalNxPackage(installedNx),
|
|
942
|
+
version: installedNx,
|
|
943
|
+
};
|
|
944
|
+
}
|
|
945
|
+
const installedLegacy = (0, installed_nx_version_1.getInstalledLegacyNrwlWorkspaceVersion)();
|
|
946
|
+
if (installedLegacy) {
|
|
947
|
+
return { canonical: '@nrwl/workspace', version: installedLegacy };
|
|
948
|
+
}
|
|
949
|
+
return null;
|
|
950
|
+
}
|
|
951
|
+
function createInstalledPackageVersionsResolver(root) {
|
|
952
|
+
const cache = {};
|
|
953
|
+
const nxRequires = (0, installation_directory_1.getNxRequirePaths)(root).map((path) => (0, module_1.createRequire)((0, path_1.join)(path, 'package.json')));
|
|
954
|
+
function getInstalledPackageVersion(packageName, overrides) {
|
|
955
|
+
if (overrides?.[packageName]) {
|
|
956
|
+
return overrides[packageName];
|
|
957
|
+
}
|
|
958
|
+
if (packageName === 'nx') {
|
|
959
|
+
const nxVersion = cache[packageName] ??
|
|
960
|
+
(() => {
|
|
961
|
+
for (const req of nxRequires) {
|
|
962
|
+
try {
|
|
963
|
+
const packageJsonPath = req.resolve('nx/package.json');
|
|
964
|
+
if (packageJsonPath.startsWith(workspace_root_1.workspaceRoot)) {
|
|
965
|
+
return (0, fileutils_1.readJsonFile)(packageJsonPath).version;
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
catch { }
|
|
969
|
+
}
|
|
970
|
+
return getInstalledPackageVersion('@nrwl/workspace', overrides);
|
|
971
|
+
})();
|
|
972
|
+
if (nxVersion) {
|
|
973
|
+
cache[packageName] = nxVersion;
|
|
974
|
+
}
|
|
975
|
+
return nxVersion;
|
|
976
|
+
}
|
|
977
|
+
try {
|
|
978
|
+
if (!cache[packageName]) {
|
|
979
|
+
const { packageJson, path } = (0, package_json_1.readModulePackageJson)(packageName, (0, installation_directory_1.getNxRequirePaths)(root));
|
|
980
|
+
// old workspaces would have the temp installation of nx in the cache,
|
|
981
|
+
// so the resolved package is not the one we need
|
|
982
|
+
if (!path.startsWith(workspace_root_1.workspaceRoot)) {
|
|
983
|
+
throw new Error('Resolved a package outside the workspace root.');
|
|
984
|
+
}
|
|
985
|
+
cache[packageName] = packageJson.version;
|
|
986
|
+
}
|
|
987
|
+
return cache[packageName];
|
|
988
|
+
}
|
|
989
|
+
catch {
|
|
990
|
+
return null;
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
return getInstalledPackageVersion;
|
|
994
|
+
}
|
|
995
|
+
// testing-fetch-start
|
|
996
|
+
function createFetcher(pmc) {
|
|
997
|
+
const migrationsCache = {};
|
|
998
|
+
const resolvedVersionCache = {};
|
|
999
|
+
const stats = { registryCount: 0, installCount: 0 };
|
|
1000
|
+
function recordInstallFetch(reason) {
|
|
1001
|
+
stats.installCount++;
|
|
1002
|
+
stats.fallbackReason ??= reason;
|
|
1003
|
+
}
|
|
1004
|
+
function fetchMigrations(packageName, packageVersion, setCache) {
|
|
1005
|
+
if (!(0, resolve_package_version_1.isRegistryResolutionEnabled)()) {
|
|
1006
|
+
// Skip registry fetch and use installation method directly
|
|
1007
|
+
logger_1.logger.info(`Fetching ${packageName}@${packageVersion}`);
|
|
1008
|
+
recordInstallFetch('env-skip');
|
|
1009
|
+
return getPackageMigrationsUsingInstall(packageName, packageVersion, pmc);
|
|
1010
|
+
}
|
|
1011
|
+
const cacheKey = packageName + '-' + packageVersion;
|
|
1012
|
+
return Promise.resolve(resolvedVersionCache[cacheKey])
|
|
1013
|
+
.then((cachedResolvedVersion) => {
|
|
1014
|
+
if (cachedResolvedVersion) {
|
|
1015
|
+
return cachedResolvedVersion;
|
|
1016
|
+
}
|
|
1017
|
+
resolvedVersionCache[cacheKey] =
|
|
1018
|
+
(0, resolve_package_version_1.resolvePackageVersionRespectingMinReleaseAge)(packageName, packageVersion);
|
|
1019
|
+
return resolvedVersionCache[cacheKey];
|
|
1020
|
+
})
|
|
1021
|
+
.then((resolvedVersion) => {
|
|
1022
|
+
if (resolvedVersion !== packageVersion &&
|
|
1023
|
+
migrationsCache[`${packageName}-${resolvedVersion}`]) {
|
|
1024
|
+
return migrationsCache[`${packageName}-${resolvedVersion}`];
|
|
1025
|
+
}
|
|
1026
|
+
setCache(packageName, resolvedVersion);
|
|
1027
|
+
return getPackageMigrationsUsingRegistry(packageName, resolvedVersion).then((result) => {
|
|
1028
|
+
stats.registryCount++;
|
|
1029
|
+
return result;
|
|
1030
|
+
});
|
|
1031
|
+
})
|
|
1032
|
+
.catch((e) => {
|
|
1033
|
+
// A cooldown violation would fail an install identically (only slower),
|
|
1034
|
+
// so surface it instead of retrying through the package manager.
|
|
1035
|
+
if (e instanceof errors_1.MinReleaseAgeViolationError) {
|
|
1036
|
+
throw e;
|
|
1037
|
+
}
|
|
1038
|
+
logger_1.logger.verbose(`Failed to get migrations from registry for ${packageName}@${packageVersion}: ${e.message}. Falling back to install.`);
|
|
1039
|
+
logger_1.logger.info(`Fetching ${packageName}@${packageVersion}`);
|
|
1040
|
+
recordInstallFetch((0, migrate_analytics_1.classifyMigrateFetchFallback)(e));
|
|
1041
|
+
return getPackageMigrationsUsingInstall(packageName, packageVersion, pmc);
|
|
1042
|
+
});
|
|
1043
|
+
}
|
|
1044
|
+
const nxMigrateFetcher = (packageName, packageVersion) => {
|
|
1045
|
+
if (migrationsCache[`${packageName}-${packageVersion}`]) {
|
|
1046
|
+
return migrationsCache[`${packageName}-${packageVersion}`];
|
|
1047
|
+
}
|
|
1048
|
+
let resolvedVersion = packageVersion;
|
|
1049
|
+
let migrations;
|
|
1050
|
+
function setCache(packageName, packageVersion) {
|
|
1051
|
+
migrationsCache[packageName + '-' + packageVersion] = migrations;
|
|
1052
|
+
}
|
|
1053
|
+
migrations = fetchMigrations(packageName, packageVersion, setCache).then((result) => {
|
|
1054
|
+
if (result.schematics) {
|
|
1055
|
+
result.generators = { ...result.schematics, ...result.generators };
|
|
1056
|
+
delete result.schematics;
|
|
1057
|
+
}
|
|
1058
|
+
resolvedVersion = result.version;
|
|
1059
|
+
return result;
|
|
1060
|
+
});
|
|
1061
|
+
setCache(packageName, packageVersion);
|
|
1062
|
+
return migrations;
|
|
1063
|
+
};
|
|
1064
|
+
nxMigrateFetcher.stats = stats;
|
|
1065
|
+
return nxMigrateFetcher;
|
|
1066
|
+
}
|
|
1067
|
+
// testing-fetch-end
|
|
1068
|
+
async function getPackageMigrationsUsingRegistry(packageName, packageVersion) {
|
|
1069
|
+
if ((0, provenance_1.getNxPackageGroup)().includes(packageName)) {
|
|
1070
|
+
await (0, provenance_1.ensurePackageHasProvenance)(packageName, packageVersion);
|
|
1071
|
+
}
|
|
1072
|
+
// check if there are migrations in the packages by looking at the
|
|
1073
|
+
// registry directly
|
|
1074
|
+
const migrationsConfig = await getPackageMigrationsConfigFromRegistry(packageName, packageVersion);
|
|
1075
|
+
if (!migrationsConfig) {
|
|
1076
|
+
return {
|
|
1077
|
+
name: packageName,
|
|
1078
|
+
version: packageVersion,
|
|
1079
|
+
};
|
|
1080
|
+
}
|
|
1081
|
+
if (!migrationsConfig.migrations) {
|
|
1082
|
+
return {
|
|
1083
|
+
name: packageName,
|
|
1084
|
+
version: packageVersion,
|
|
1085
|
+
packageGroup: migrationsConfig.packageGroup,
|
|
1086
|
+
supportsOptionalMigrations: migrationsConfig.supportsOptionalMigrations,
|
|
1087
|
+
};
|
|
1088
|
+
}
|
|
1089
|
+
logger_1.logger.info(`Fetching ${packageName}@${packageVersion}`);
|
|
1090
|
+
// try to obtain the migrations from the registry directly
|
|
1091
|
+
return await downloadPackageMigrationsFromRegistry(packageName, packageVersion, migrationsConfig);
|
|
1092
|
+
}
|
|
1093
|
+
async function getPackageMigrationsConfigFromRegistry(packageName, packageVersion) {
|
|
1094
|
+
const result = await (0, package_manager_1.packageRegistryView)(packageName, packageVersion, 'nx-migrations ng-update dist --json');
|
|
1095
|
+
if (!result) {
|
|
1096
|
+
return null;
|
|
1097
|
+
}
|
|
1098
|
+
const json = JSON.parse(result);
|
|
1099
|
+
if (!json['nx-migrations'] && !json['ng-update']) {
|
|
1100
|
+
const registry = new node_url_1.URL('dist' in json ? json.dist.tarball : json.tarball)
|
|
1101
|
+
.hostname;
|
|
1102
|
+
// Registries other than npmjs and the local registry may not support full metadata via npm view
|
|
1103
|
+
// so throw error so that fetcher falls back to getting config via install
|
|
1104
|
+
if (!['registry.npmjs.org', 'localhost', 'artifactory'].some((v) => registry.includes(v))) {
|
|
1105
|
+
throw new Error(`Getting migration config from registry is not supported from ${registry}`);
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
return (0, package_json_1.readNxMigrateConfig)(json);
|
|
1109
|
+
}
|
|
1110
|
+
async function downloadPackageMigrationsFromRegistry(packageName, packageVersion, { migrations: migrationsFilePath, packageGroup, supportsOptionalMigrations, }) {
|
|
1111
|
+
const { dir, cleanup } = (0, package_manager_1.createTempNpmDirectory)();
|
|
1112
|
+
let result;
|
|
1113
|
+
try {
|
|
1114
|
+
const { tarballPath } = await (0, package_manager_1.packageRegistryPack)(dir, packageName, packageVersion);
|
|
1115
|
+
const fullTarballPath = (0, path_1.join)(dir, tarballPath);
|
|
1116
|
+
let migrations;
|
|
1117
|
+
try {
|
|
1118
|
+
migrations = await (0, tar_1.extractFileFromTarball)(fullTarballPath, (0, path_2.joinPathFragments)('package', migrationsFilePath), (0, path_1.join)(dir, migrationsFilePath)).then((path) => (0, fileutils_1.readJsonFile)(path));
|
|
1119
|
+
}
|
|
1120
|
+
catch {
|
|
1121
|
+
throw new Error(`Failed to find migrations file "${migrationsFilePath}" in package "${packageName}@${packageVersion}".`);
|
|
1122
|
+
}
|
|
1123
|
+
(0, prompt_files_1.validateMigrationEntries)(packageName, packageVersion, migrations);
|
|
1124
|
+
const resolvedPromptFiles = await (0, prompt_files_1.extractPromptFilesFromTarball)(packageName, packageVersion, migrations, migrationsFilePath, fullTarballPath, dir);
|
|
1125
|
+
result = {
|
|
1126
|
+
...migrations,
|
|
1127
|
+
packageGroup,
|
|
1128
|
+
supportsOptionalMigrations,
|
|
1129
|
+
version: packageVersion,
|
|
1130
|
+
...(resolvedPromptFiles ? { resolvedPromptFiles } : {}),
|
|
1131
|
+
};
|
|
1132
|
+
}
|
|
1133
|
+
finally {
|
|
1134
|
+
await cleanup();
|
|
1135
|
+
}
|
|
1136
|
+
return result;
|
|
1137
|
+
}
|
|
1138
|
+
function createConcurrencyLimiter(concurrency) {
|
|
1139
|
+
const queue = [];
|
|
1140
|
+
let active = 0;
|
|
1141
|
+
function next() {
|
|
1142
|
+
while (queue.length > 0 && active < concurrency) {
|
|
1143
|
+
active++;
|
|
1144
|
+
queue.shift()();
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
return function limit(fn) {
|
|
1148
|
+
return new Promise((resolve, reject) => {
|
|
1149
|
+
queue.push(() => {
|
|
1150
|
+
fn()
|
|
1151
|
+
.then(resolve, reject)
|
|
1152
|
+
.finally(() => {
|
|
1153
|
+
active--;
|
|
1154
|
+
next();
|
|
1155
|
+
});
|
|
1156
|
+
});
|
|
1157
|
+
next();
|
|
1158
|
+
});
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
const installConcurrencyLimit = process.env.NX_MIGRATE_INSTALL_CONCURRENCY
|
|
1162
|
+
? createConcurrencyLimiter(Math.max(1, Math.floor(Number(process.env.NX_MIGRATE_INSTALL_CONCURRENCY)) || 1))
|
|
1163
|
+
: null;
|
|
1164
|
+
async function getPackageMigrationsUsingInstall(packageName, packageVersion, pmc) {
|
|
1165
|
+
const run = () => getPackageMigrationsUsingInstallImpl(packageName, packageVersion, pmc);
|
|
1166
|
+
return installConcurrencyLimit ? installConcurrencyLimit(run) : run();
|
|
1167
|
+
}
|
|
1168
|
+
async function getPackageMigrationsUsingInstallImpl(packageName, packageVersion, pmc) {
|
|
1169
|
+
const { dir, cleanup } = (0, package_manager_1.createTempNpmDirectory)();
|
|
1170
|
+
let result;
|
|
1171
|
+
if ((0, provenance_1.getNxPackageGroup)().includes(packageName)) {
|
|
1172
|
+
await (0, provenance_1.ensurePackageHasProvenance)(packageName, packageVersion);
|
|
1173
|
+
}
|
|
1174
|
+
try {
|
|
1175
|
+
const addCommand = `${pmc.add} ${packageName}@${packageVersion}`;
|
|
1176
|
+
try {
|
|
1177
|
+
await execAsync(addCommand, {
|
|
1178
|
+
cwd: dir,
|
|
1179
|
+
env: {
|
|
1180
|
+
...process.env,
|
|
1181
|
+
npm_config_legacy_peer_deps: 'true',
|
|
1182
|
+
},
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
catch (e) {
|
|
1186
|
+
// Only the install command failed; format it as a command failure so the
|
|
1187
|
+
// user sees the package manager's stderr. Errors from the later steps
|
|
1188
|
+
// (reading/validating migrations, resolving prompt files) are surfaced
|
|
1189
|
+
// as-is by the outer catch instead of being mislabeled as install failures.
|
|
1190
|
+
throw new Error(formatCommandFailure(addCommand, e));
|
|
1191
|
+
}
|
|
1192
|
+
const { migrations: migrationsFilePath, packageGroup, supportsOptionalMigrations, packageJson, } = readPackageMigrationConfig(packageName, dir);
|
|
1193
|
+
let migrations = undefined;
|
|
1194
|
+
let resolvedPromptFiles;
|
|
1195
|
+
if (migrationsFilePath) {
|
|
1196
|
+
migrations = (0, fileutils_1.readJsonFile)(migrationsFilePath);
|
|
1197
|
+
(0, prompt_files_1.validateMigrationEntries)(packageName, packageVersion, migrations);
|
|
1198
|
+
resolvedPromptFiles = await (0, prompt_files_1.readPromptFilesFromInstall)(packageName, packageVersion, migrations, migrationsFilePath);
|
|
1199
|
+
}
|
|
1200
|
+
result = {
|
|
1201
|
+
...migrations,
|
|
1202
|
+
packageGroup,
|
|
1203
|
+
supportsOptionalMigrations,
|
|
1204
|
+
version: packageJson.version,
|
|
1205
|
+
...(resolvedPromptFiles ? { resolvedPromptFiles } : {}),
|
|
1206
|
+
};
|
|
1207
|
+
}
|
|
1208
|
+
catch (e) {
|
|
1209
|
+
throw new Error([
|
|
1210
|
+
`Failed to fetch migrations for ${packageName}@${packageVersion}`,
|
|
1211
|
+
e instanceof Error ? e.message : String(e),
|
|
1212
|
+
].join('\n'));
|
|
1213
|
+
}
|
|
1214
|
+
finally {
|
|
1215
|
+
await cleanup();
|
|
1216
|
+
}
|
|
1217
|
+
return result;
|
|
1218
|
+
}
|
|
1219
|
+
function readPackageMigrationConfig(packageName, dir) {
|
|
1220
|
+
const { path: packageJsonPath, packageJson: json } = (0, package_json_1.readModulePackageJson)(packageName, (0, installation_directory_1.getNxRequirePaths)(dir));
|
|
1221
|
+
const config = (0, package_json_1.readNxMigrateConfig)(json);
|
|
1222
|
+
if (!config) {
|
|
1223
|
+
return { packageJson: json, migrations: null, packageGroup: [] };
|
|
1224
|
+
}
|
|
1225
|
+
try {
|
|
1226
|
+
const migrationFile = require.resolve(config.migrations, {
|
|
1227
|
+
paths: [(0, path_1.dirname)(packageJsonPath)],
|
|
1228
|
+
});
|
|
1229
|
+
return {
|
|
1230
|
+
packageJson: json,
|
|
1231
|
+
migrations: migrationFile,
|
|
1232
|
+
packageGroup: config.packageGroup,
|
|
1233
|
+
supportsOptionalMigrations: config.supportsOptionalMigrations,
|
|
1234
|
+
};
|
|
1235
|
+
}
|
|
1236
|
+
catch {
|
|
1237
|
+
return {
|
|
1238
|
+
packageJson: json,
|
|
1239
|
+
migrations: null,
|
|
1240
|
+
packageGroup: config.packageGroup,
|
|
1241
|
+
supportsOptionalMigrations: config.supportsOptionalMigrations,
|
|
1242
|
+
};
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
async function createMigrationsFile(root, migrations) {
|
|
1246
|
+
await (0, write_formatted_json_file_1.writeFormattedJsonFile)((0, path_1.join)(root, 'migrations.json'), { migrations });
|
|
1247
|
+
}
|
|
1248
|
+
async function updatePackageJson(root, updatedPackages) {
|
|
1249
|
+
const packageJsonPath = (0, path_1.join)(root, 'package.json');
|
|
1250
|
+
if (!(0, fs_1.existsSync)(packageJsonPath)) {
|
|
1251
|
+
return false;
|
|
1252
|
+
}
|
|
1253
|
+
const parseOptions = {};
|
|
1254
|
+
const json = (0, fileutils_1.readJsonFile)(packageJsonPath, parseOptions);
|
|
1255
|
+
const manager = (0, catalog_1.getCatalogManager)(root);
|
|
1256
|
+
const catalogUpdates = [];
|
|
1257
|
+
let modified = false;
|
|
1258
|
+
Object.keys(updatedPackages).forEach((p) => {
|
|
1259
|
+
const existingVersion = json.dependencies?.[p] ?? json.devDependencies?.[p];
|
|
1260
|
+
if (existingVersion && manager?.isCatalogReference(existingVersion)) {
|
|
1261
|
+
const { catalogName } = manager.parseCatalogReference(existingVersion);
|
|
1262
|
+
catalogUpdates.push({
|
|
1263
|
+
packageName: p,
|
|
1264
|
+
version: updatedPackages[p].version,
|
|
1265
|
+
catalogName,
|
|
1266
|
+
});
|
|
1267
|
+
// don't overwrite the catalog reference with the new version
|
|
1268
|
+
return;
|
|
1269
|
+
}
|
|
1270
|
+
// Update non-catalog packages in package.json
|
|
1271
|
+
if (json.devDependencies?.[p]) {
|
|
1272
|
+
if (json.devDependencies[p] !== updatedPackages[p].version) {
|
|
1273
|
+
json.devDependencies[p] = updatedPackages[p].version;
|
|
1274
|
+
modified = true;
|
|
1275
|
+
}
|
|
1276
|
+
return;
|
|
1277
|
+
}
|
|
1278
|
+
if (json.dependencies?.[p]) {
|
|
1279
|
+
if (json.dependencies[p] !== updatedPackages[p].version) {
|
|
1280
|
+
json.dependencies[p] = updatedPackages[p].version;
|
|
1281
|
+
modified = true;
|
|
1282
|
+
}
|
|
1283
|
+
return;
|
|
1284
|
+
}
|
|
1285
|
+
const dependencyType = updatedPackages[p].addToPackageJson;
|
|
1286
|
+
if (typeof dependencyType === 'string') {
|
|
1287
|
+
json[dependencyType] ??= {};
|
|
1288
|
+
if (json[dependencyType][p] !== updatedPackages[p].version) {
|
|
1289
|
+
json[dependencyType][p] = updatedPackages[p].version;
|
|
1290
|
+
modified = true;
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
});
|
|
1294
|
+
if (modified) {
|
|
1295
|
+
await (0, write_formatted_json_file_1.writeFormattedJsonFile)(packageJsonPath, json, {
|
|
1296
|
+
appendNewLine: parseOptions.endsWithNewline,
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
// Update catalog definitions
|
|
1300
|
+
if (catalogUpdates.length) {
|
|
1301
|
+
// manager is guaranteed to be defined when there are catalog updates
|
|
1302
|
+
manager.updateCatalogVersions(root, catalogUpdates);
|
|
1303
|
+
await formatCatalogDefinitionFiles(manager, root);
|
|
1304
|
+
}
|
|
1305
|
+
return modified || catalogUpdates.length > 0;
|
|
1306
|
+
}
|
|
1307
|
+
async function formatCatalogDefinitionFiles(manager, root) {
|
|
1308
|
+
const catalogDefinitionFilePaths = manager.getCatalogDefinitionFilePaths();
|
|
1309
|
+
const catalogDefinitionFiles = catalogDefinitionFilePaths.map((filePath) => {
|
|
1310
|
+
const absolutePath = (0, path_1.join)(root, filePath);
|
|
1311
|
+
return {
|
|
1312
|
+
path: filePath,
|
|
1313
|
+
absolutePath,
|
|
1314
|
+
content: (0, fs_1.readFileSync)(absolutePath, 'utf-8'),
|
|
1315
|
+
};
|
|
1316
|
+
});
|
|
1317
|
+
const results = await (0, format_changed_files_with_prettier_if_available_1.formatFilesWithPrettierIfAvailable)(catalogDefinitionFiles.map(({ path, content }) => ({ path, content })), root, { silent: true });
|
|
1318
|
+
for (const { path, absolutePath, content } of catalogDefinitionFiles) {
|
|
1319
|
+
(0, fs_1.writeFileSync)(absolutePath, results.has(path) ? results.get(path) : content, { encoding: 'utf-8' });
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
async function updateInstallationDetails(root, updatedPackages) {
|
|
1323
|
+
const nxJsonPath = (0, path_1.join)(root, 'nx.json');
|
|
1324
|
+
const parseOptions = {};
|
|
1325
|
+
const nxJson = (0, fileutils_1.readJsonFile)(nxJsonPath, parseOptions);
|
|
1326
|
+
if (!nxJson.installation) {
|
|
1327
|
+
return false;
|
|
1328
|
+
}
|
|
1329
|
+
let modified = false;
|
|
1330
|
+
const nxVersion = updatedPackages.nx?.version;
|
|
1331
|
+
if (nxVersion && nxJson.installation.version !== nxVersion) {
|
|
1332
|
+
nxJson.installation.version = nxVersion;
|
|
1333
|
+
modified = true;
|
|
1334
|
+
}
|
|
1335
|
+
if (nxJson.installation.plugins) {
|
|
1336
|
+
for (const dep in nxJson.installation.plugins) {
|
|
1337
|
+
const update = updatedPackages[dep];
|
|
1338
|
+
if (update) {
|
|
1339
|
+
const newVersion = (0, semver_1.valid)(update.version)
|
|
1340
|
+
? update.version
|
|
1341
|
+
: await (0, resolve_package_version_1.resolvePackageVersionRespectingMinReleaseAge)(dep, update.version);
|
|
1342
|
+
if (nxJson.installation.plugins[dep] !== newVersion) {
|
|
1343
|
+
nxJson.installation.plugins[dep] = newVersion;
|
|
1344
|
+
modified = true;
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
if (modified) {
|
|
1350
|
+
await (0, write_formatted_json_file_1.writeFormattedJsonFile)(nxJsonPath, nxJson, {
|
|
1351
|
+
appendNewLine: parseOptions.endsWithNewline,
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1354
|
+
return modified;
|
|
1355
|
+
}
|
|
1356
|
+
async function isMigratingToNewMajor(from, to) {
|
|
1357
|
+
from = (0, version_utils_1.normalizeVersion)(from);
|
|
1358
|
+
to = ['latest', 'next', 'canary'].includes(to) ? to : (0, version_utils_1.normalizeVersion)(to);
|
|
1359
|
+
if (!(0, semver_1.valid)(from)) {
|
|
1360
|
+
from = await (0, resolve_package_version_1.resolvePackageVersionRespectingMinReleaseAge)('nx', from);
|
|
1361
|
+
}
|
|
1362
|
+
if (!(0, semver_1.valid)(to)) {
|
|
1363
|
+
to = await (0, resolve_package_version_1.resolvePackageVersionRespectingMinReleaseAge)('nx', to);
|
|
1364
|
+
}
|
|
1365
|
+
return (0, semver_1.major)(from) < (0, semver_1.major)(to);
|
|
1366
|
+
}
|
|
1367
|
+
function readNxVersion(packageJson, root) {
|
|
1368
|
+
return ((0, package_json_1.getDependencyVersionFromPackageJson)('nx', root, packageJson) ??
|
|
1369
|
+
(0, package_json_1.getDependencyVersionFromPackageJson)('@nx/workspace', root, packageJson) ??
|
|
1370
|
+
(0, package_json_1.getDependencyVersionFromPackageJson)('@nrwl/workspace', root, packageJson));
|
|
1371
|
+
}
|
|
1372
|
+
// Exported for testing the optional-include orchestration seam (see NXC-4590).
|
|
1373
|
+
async function generateMigrationsJsonAndUpdatePackageJson(root, opts, fetch) {
|
|
1374
|
+
const pmc = (0, package_manager_1.getPackageManagerCommand)();
|
|
1375
|
+
let phase = 'fetch_migrations';
|
|
1376
|
+
try {
|
|
1377
|
+
const rootPkgJsonPath = (0, path_1.join)(root, 'package.json');
|
|
1378
|
+
let originalPackageJson = (0, fs_1.existsSync)(rootPkgJsonPath)
|
|
1379
|
+
? (0, fileutils_1.readJsonFile)(rootPkgJsonPath)
|
|
1380
|
+
: null;
|
|
1381
|
+
const originalNxJson = (0, configuration_1.readNxJson)();
|
|
1382
|
+
const from = originalNxJson.installation?.version ??
|
|
1383
|
+
readNxVersion(originalPackageJson, root);
|
|
1384
|
+
const include = opts.include;
|
|
1385
|
+
(0, migrate_analytics_1.setMigrateInclude)(include);
|
|
1386
|
+
let walkedTargetPackage = opts.targetPackage;
|
|
1387
|
+
let fromOverrides = opts.from;
|
|
1388
|
+
let excludeApplied = opts.excludeAppliedMigrations;
|
|
1389
|
+
if (include === 'optional') {
|
|
1390
|
+
// The `optional` value catches up the deps the target manages, so walk the
|
|
1391
|
+
// target from zero, against `nx`'s full managed-deps closure.
|
|
1392
|
+
walkedTargetPackage = toNxClosurePackage(opts.targetPackage);
|
|
1393
|
+
fromOverrides = { [walkedTargetPackage]: '0.0.0' };
|
|
1394
|
+
excludeApplied = true;
|
|
1395
|
+
}
|
|
1396
|
+
logger_1.logger.info(`Fetching meta data about packages.`);
|
|
1397
|
+
logger_1.logger.info(`It may take a few minutes.`);
|
|
1398
|
+
const resolvedFetch = fetch ?? createFetcher(pmc);
|
|
1399
|
+
let requiredPackages;
|
|
1400
|
+
if (include === 'required' || include === 'optional') {
|
|
1401
|
+
// `@nx/workspace` declares an intentionally narrow `packageGroup`
|
|
1402
|
+
// ({ nx, nx-cloud }) in its migrations config, whereas `nx` declares the
|
|
1403
|
+
// full @nx/* plugin fan-out. Their transitive required closures are
|
|
1404
|
+
// equivalent, so resolve the closure against `nx`.
|
|
1405
|
+
const sourcePackage = toNxClosurePackage(walkedTargetPackage);
|
|
1406
|
+
const rootMetadata = await resolvedFetch(sourcePackage, opts.targetVersion);
|
|
1407
|
+
// Legacy `@nrwl/workspace<14` doesn't ship a complete `packageGroup`
|
|
1408
|
+
// in its metadata; the Migrator's cascade injects
|
|
1409
|
+
// `LEGACY_NRWL_PACKAGE_GROUP` for that case, and the post-build
|
|
1410
|
+
// optional filter must mirror that set or required `@nrwl/*`
|
|
1411
|
+
// plugins slip past it.
|
|
1412
|
+
const packageGroup = sourcePackage === '@nrwl/workspace' && (0, version_utils_1.isLegacyEra)(opts.targetVersion)
|
|
1413
|
+
? LEGACY_NRWL_PACKAGE_GROUP
|
|
1414
|
+
: rootMetadata.packageGroup;
|
|
1415
|
+
requiredPackages = resolveRequiredPackages(sourcePackage, packageGroup);
|
|
1416
|
+
}
|
|
1417
|
+
const installedPackageVersions = createInstalledPackageVersionsResolver(root);
|
|
1418
|
+
const migrator = new Migrator({
|
|
1419
|
+
packageJson: originalPackageJson,
|
|
1420
|
+
nxInstallation: originalNxJson.installation,
|
|
1421
|
+
getInstalledPackageVersion: installedPackageVersions,
|
|
1422
|
+
fetch: resolvedFetch,
|
|
1423
|
+
from: fromOverrides,
|
|
1424
|
+
to: opts.to,
|
|
1425
|
+
interactive: opts.interactive && !(0, is_ci_1.isCI)(),
|
|
1426
|
+
excludeAppliedMigrations: excludeApplied,
|
|
1427
|
+
include,
|
|
1428
|
+
requiredPackages,
|
|
1429
|
+
});
|
|
1430
|
+
const { migrations, packageUpdates, promptContents, minVersionWithSkippedUpdates, } = await migrator.migrate(walkedTargetPackage, opts.targetVersion);
|
|
1431
|
+
// The cascade collects packageJsonUpdates entries against the cascade
|
|
1432
|
+
// root's installed version, but inner per-package pins are only gated
|
|
1433
|
+
// against the in-flight cascade tally — not against each inner package's
|
|
1434
|
+
// installed version. A from-zero walk (e.g. `--include=optional`) can
|
|
1435
|
+
// surface a stale historical pin that would write a lower version than
|
|
1436
|
+
// the user already has. Drop those before writing; nx migrate is
|
|
1437
|
+
// forward-only, never a downgrade.
|
|
1438
|
+
phase = 'package_updates';
|
|
1439
|
+
// Resolve catalog: specifiers first so the filter compares real versions.
|
|
1440
|
+
const writableUpdates = (0, update_filters_1.filterDowngradedUpdates)(packageUpdates, (0, catalog_1.resolveCatalogSpecifiers)(originalPackageJson), installedPackageVersions);
|
|
1441
|
+
const wrotePackageJson = await updatePackageJson(root, writableUpdates);
|
|
1442
|
+
const wroteNxJsonInstallation = await updateInstallationDetails(root, writableUpdates);
|
|
1443
|
+
// Under `--include=optional` the target's own entry is filtered out of
|
|
1444
|
+
// `packageUpdates` (it's a required package), so resolve the version
|
|
1445
|
+
// defensively. Also reused by the completion analytics below.
|
|
1446
|
+
const resolvedTargetVersion = packageUpdates[walkedTargetPackage]?.version ?? opts.targetVersion;
|
|
1447
|
+
const promptMigrationFiles = (0, prompt_files_1.writePromptMigrationFiles)(root, migrations, promptContents ?? {}, resolvedTargetVersion);
|
|
1448
|
+
if (migrations.length > 0) {
|
|
1449
|
+
await createMigrationsFile(root, [
|
|
1450
|
+
...addSplitConfigurationMigrationIfAvailable(from, writableUpdates),
|
|
1451
|
+
...migrations,
|
|
1452
|
+
]);
|
|
1453
|
+
}
|
|
1454
|
+
const includeLine = include === 'required'
|
|
1455
|
+
? `- Processed required updates only (skipped optional dependency bumps).`
|
|
1456
|
+
: include === 'optional'
|
|
1457
|
+
? `- Processed optional dependency updates only (skipped required package updates).`
|
|
1458
|
+
: null;
|
|
1459
|
+
// The param expressions below evaluate before the report function is
|
|
1460
|
+
// entered; `safeReport` keeps them inside the analytics boundary so a
|
|
1461
|
+
// param-building throw can't surface here and convert an already
|
|
1462
|
+
// successful migrate into a reported failure.
|
|
1463
|
+
const recordCompletion = () => (0, migrate_analytics_1.safeReport)(() => (0, migrate_analytics_1.reportMigrateGenerateComplete)({
|
|
1464
|
+
targetVersion: resolvedTargetVersion,
|
|
1465
|
+
requestedTargetVersion: opts.originalTargetVersion ?? resolvedTargetVersion,
|
|
1466
|
+
installedTargetVersion: (0, multi_major_1.isNxTarget)(opts.targetPackage, opts.targetVersion)
|
|
1467
|
+
? from
|
|
1468
|
+
: installedPackageVersions(opts.targetPackage),
|
|
1469
|
+
include,
|
|
1470
|
+
multiMajorChoice: opts.multiMajorChoice,
|
|
1471
|
+
fetchStats: resolvedFetch.stats,
|
|
1472
|
+
}));
|
|
1473
|
+
const noChanges = !wrotePackageJson && !wroteNxJsonInstallation && migrations.length === 0;
|
|
1474
|
+
if (noChanges) {
|
|
1475
|
+
output_1.output.success({
|
|
1476
|
+
title: `No updates were applied.`,
|
|
1477
|
+
bodyLines: [
|
|
1478
|
+
...(includeLine ? [includeLine] : []),
|
|
1479
|
+
include === 'optional'
|
|
1480
|
+
? `- No optional dependency updates were found for the installed version. Either your dependencies are already up to date, or this workspace doesn't manage them in a place 'nx migrate' writes to (e.g. non-JS workspaces).`
|
|
1481
|
+
: `- No package updates or migrations were found.`,
|
|
1482
|
+
],
|
|
1483
|
+
});
|
|
1484
|
+
// Nothing was applied; skip the "Next steps" guidance below — it would
|
|
1485
|
+
// tell the user to inspect package.json changes that don't exist.
|
|
1486
|
+
recordCompletion();
|
|
1487
|
+
return;
|
|
1488
|
+
}
|
|
1489
|
+
output_1.output.success({
|
|
1490
|
+
title: `The migrate command has run successfully.`,
|
|
1491
|
+
bodyLines: [
|
|
1492
|
+
...(includeLine ? [includeLine] : []),
|
|
1493
|
+
...(wrotePackageJson ? [`- package.json has been updated.`] : []),
|
|
1494
|
+
...(wroteNxJsonInstallation
|
|
1495
|
+
? [`- nx.json (installation) has been updated.`]
|
|
1496
|
+
: []),
|
|
1497
|
+
migrations.length > 0
|
|
1498
|
+
? `- migrations.json has been generated.`
|
|
1499
|
+
: `- There are no migrations to run, so migrations.json has not been created.`,
|
|
1500
|
+
...(promptMigrationFiles.length > 0
|
|
1501
|
+
? [
|
|
1502
|
+
`- ${promptMigrationFiles.length} AI migration prompt(s) have been written to ${prompt_files_1.AI_MIGRATIONS_DIR}/.`,
|
|
1503
|
+
]
|
|
1504
|
+
: []),
|
|
1505
|
+
],
|
|
1506
|
+
});
|
|
1507
|
+
try {
|
|
1508
|
+
if (opts.interactive !== false &&
|
|
1509
|
+
['nx', '@nrwl/workspace'].includes(opts.targetPackage) &&
|
|
1510
|
+
(await isMigratingToNewMajor(from, opts.targetVersion)) &&
|
|
1511
|
+
!(0, is_ci_1.isCI)() &&
|
|
1512
|
+
!(0, nx_cloud_utils_1.isNxCloudDisabled)(originalNxJson) &&
|
|
1513
|
+
!(0, nx_cloud_utils_1.isNxCloudUsed)(originalNxJson)) {
|
|
1514
|
+
output_1.output.success({
|
|
1515
|
+
title: 'Connect to Nx Cloud',
|
|
1516
|
+
bodyLines: [
|
|
1517
|
+
'Nx Cloud is a first-party CI companion for Nx projects. It improves critical aspects of CI:',
|
|
1518
|
+
'- Speed: 30% - 70% faster CI',
|
|
1519
|
+
'- Cost: 40% - 75% reduction in CI costs',
|
|
1520
|
+
'- Reliability: by automatically identifying flaky tasks and re-running them',
|
|
1521
|
+
],
|
|
1522
|
+
});
|
|
1523
|
+
await (0, connect_to_nx_cloud_1.connectToNxCloudWithPrompt)('migrate');
|
|
1524
|
+
originalPackageJson = (0, fileutils_1.readJsonFile)((0, path_1.join)(root, 'package.json'));
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
catch {
|
|
1528
|
+
// The above code is to remind folks when updating to a new major and not currently using Nx cloud.
|
|
1529
|
+
// If for some reason it fails, it shouldn't affect the overall migration process
|
|
1530
|
+
}
|
|
1531
|
+
const bodyLines = process.env['NX_CONSOLE']
|
|
1532
|
+
? [
|
|
1533
|
+
'- Inspect the package.json changes in the built-in diff editor [Click to open]',
|
|
1534
|
+
'- Confirm the changes to install the new dependencies and continue the migration',
|
|
1535
|
+
]
|
|
1536
|
+
: [
|
|
1537
|
+
`- Make sure package.json changes make sense and then run '${pmc.install}',`,
|
|
1538
|
+
...(promptMigrationFiles.length > 0
|
|
1539
|
+
? [
|
|
1540
|
+
`- Review and tweak the AI migration prompts in ${prompt_files_1.AI_MIGRATIONS_DIR}/ as needed.`,
|
|
1541
|
+
]
|
|
1542
|
+
: []),
|
|
1543
|
+
...(migrations.length > 0
|
|
1544
|
+
? [`- Run '${pmc.exec} nx migrate --run-migrations'`]
|
|
1545
|
+
: []),
|
|
1546
|
+
...(opts.originalTargetVersion
|
|
1547
|
+
? [
|
|
1548
|
+
`- After applying these migrations, run '${pmc.exec} nx migrate ${opts.targetPackage}@${opts.originalTargetVersion} --include=${opts.include}${opts.multiMajorMode === 'gradual'
|
|
1549
|
+
? ` ${multi_major_1.MULTI_MAJOR_MODE_FLAG}=gradual`
|
|
1550
|
+
: ''}' to continue toward your original target.`,
|
|
1551
|
+
]
|
|
1552
|
+
: []),
|
|
1553
|
+
...(opts.interactive && minVersionWithSkippedUpdates
|
|
1554
|
+
? [
|
|
1555
|
+
`- You opted out of some migrations for now. Write the following command down somewhere to apply these migrations later:`,
|
|
1556
|
+
` nx migrate ${opts.targetVersion} --from ${opts.targetPackage}@${minVersionWithSkippedUpdates} --exclude-applied-migrations`,
|
|
1557
|
+
`- To learn more go to https://nx.dev/recipes/tips-n-tricks/advanced-update`,
|
|
1558
|
+
]
|
|
1559
|
+
: [
|
|
1560
|
+
`- To learn more go to https://nx.dev/features/automate-updating-dependencies`,
|
|
1561
|
+
]),
|
|
1562
|
+
...(showConnectToCloudMessage()
|
|
1563
|
+
? [
|
|
1564
|
+
`- You may run '${pmc.run('nx', 'connect-to-nx-cloud')}' to get faster builds, GitHub integration, and more. Check out https://nx.app`,
|
|
1565
|
+
]
|
|
1566
|
+
: []),
|
|
1567
|
+
];
|
|
1568
|
+
output_1.output.log({
|
|
1569
|
+
title: 'Next steps:',
|
|
1570
|
+
bodyLines,
|
|
1571
|
+
});
|
|
1572
|
+
recordCompletion();
|
|
1573
|
+
}
|
|
1574
|
+
catch (e) {
|
|
1575
|
+
(0, migrate_analytics_1.reportMigrateGenerateError)(phase, e);
|
|
1576
|
+
output_1.output.error({
|
|
1577
|
+
title: `The migrate command failed.`,
|
|
1578
|
+
});
|
|
1579
|
+
throw e;
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
function addSplitConfigurationMigrationIfAvailable(from, packageJson) {
|
|
1583
|
+
if (!packageJson['@nrwl/workspace'])
|
|
1584
|
+
return [];
|
|
1585
|
+
if ((0, semver_1.gte)(packageJson['@nrwl/workspace'].version, '15.7.0-beta.0') &&
|
|
1586
|
+
(0, semver_1.lt)((0, version_utils_1.normalizeVersion)(from), '15.7.0-beta.0')) {
|
|
1587
|
+
return [
|
|
1588
|
+
{
|
|
1589
|
+
version: '15.7.0-beta.0',
|
|
1590
|
+
description: 'Split global configuration files into individual project.json files. This migration has been added automatically to the beginning of your migration set to retroactively make them work with the new version of Nx.',
|
|
1591
|
+
implementation: './src/migrations/update-15-7-0/split-configuration-into-project-json-files',
|
|
1592
|
+
package: '@nrwl/workspace',
|
|
1593
|
+
name: '15-7-0-split-configuration-into-project-json-files',
|
|
1594
|
+
},
|
|
1595
|
+
];
|
|
1596
|
+
}
|
|
1597
|
+
else {
|
|
1598
|
+
return [];
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
function showConnectToCloudMessage() {
|
|
1602
|
+
try {
|
|
1603
|
+
const nxJson = (0, configuration_1.readNxJson)();
|
|
1604
|
+
const defaultRunnerIsUsed = (0, connect_to_nx_cloud_1.onlyDefaultRunnerIsUsed)(nxJson);
|
|
1605
|
+
return !!defaultRunnerIsUsed;
|
|
1606
|
+
}
|
|
1607
|
+
catch {
|
|
1608
|
+
return false;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
function runInstall(nxWorkspaceRoot, phase = 'pre-migration') {
|
|
1612
|
+
const cwd = nxWorkspaceRoot ?? process.cwd();
|
|
1613
|
+
const packageManager = (0, package_manager_1.detectPackageManager)(cwd);
|
|
1614
|
+
const pmCommands = (0, package_manager_1.getPackageManagerCommand)(packageManager, cwd);
|
|
1615
|
+
const installCommand = `${pmCommands.install} ${pmCommands.ignoreScriptsFlag ?? ''}`;
|
|
1616
|
+
output_1.output.log({
|
|
1617
|
+
title: `Running '${installCommand}' to make sure necessary packages are installed`,
|
|
1618
|
+
});
|
|
1619
|
+
return new Promise((resolve, reject) => {
|
|
1620
|
+
// For npm, pipe stderr so we can detect peer dependency errors while still
|
|
1621
|
+
// mirroring it live to the user's terminal. Other package managers inherit
|
|
1622
|
+
// stderr directly since we don't need to inspect their output.
|
|
1623
|
+
const shouldCaptureStderr = packageManager === 'npm';
|
|
1624
|
+
const child = (0, child_process_1.spawn)(installCommand, {
|
|
1625
|
+
shell: true,
|
|
1626
|
+
stdio: ['inherit', 'inherit', shouldCaptureStderr ? 'pipe' : 'inherit'],
|
|
1627
|
+
windowsHide: true,
|
|
1628
|
+
cwd,
|
|
1629
|
+
});
|
|
1630
|
+
const stderrChunks = [];
|
|
1631
|
+
child.stderr?.on('data', (chunk) => {
|
|
1632
|
+
process.stderr.write(chunk);
|
|
1633
|
+
stderrChunks.push(chunk);
|
|
1634
|
+
});
|
|
1635
|
+
child.on('error', reject);
|
|
1636
|
+
child.on('close', (code) => {
|
|
1637
|
+
if (code === 0) {
|
|
1638
|
+
resolve();
|
|
1639
|
+
return;
|
|
1640
|
+
}
|
|
1641
|
+
if (shouldCaptureStderr) {
|
|
1642
|
+
const stderr = Buffer.concat(stderrChunks).toString().trim();
|
|
1643
|
+
if (isNpmPeerDepsError(stderr)) {
|
|
1644
|
+
// Log the remediation guidance here so every caller of `runInstall`
|
|
1645
|
+
// (CLI migrate, `nx repair`, single-migration runner, etc.) surfaces
|
|
1646
|
+
// it consistently. Top-level callers catch `NpmPeerDepsInstallError`
|
|
1647
|
+
// and return a non-zero exit code without re-logging.
|
|
1648
|
+
logNpmPeerDepsError(phase);
|
|
1649
|
+
reject(new NpmPeerDepsInstallError());
|
|
1650
|
+
return;
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
reject(new Error(`Command failed: ${installCommand}`));
|
|
1654
|
+
});
|
|
1655
|
+
});
|
|
1656
|
+
}
|
|
1657
|
+
class NpmPeerDepsInstallError extends Error {
|
|
1658
|
+
constructor() {
|
|
1659
|
+
super('npm install failed due to peer dependency conflicts.');
|
|
1660
|
+
this.name = 'NpmPeerDepsInstallError';
|
|
1661
|
+
}
|
|
1662
|
+
}
|
|
1663
|
+
/**
|
|
1664
|
+
* Detects npm peer-dependency resolution failures. Keyed on the `ERESOLVE`
|
|
1665
|
+
* error code, which npm consistently emits for this class of failure across
|
|
1666
|
+
* v7+ (`npm ERR! code ERESOLVE` / `npm error code ERESOLVE`). Falls back to a
|
|
1667
|
+
* small set of stable phrases in case the code line is missing from the
|
|
1668
|
+
* captured output.
|
|
1669
|
+
*/
|
|
1670
|
+
function isNpmPeerDepsError(stderr) {
|
|
1671
|
+
if (/\bERESOLVE\b/.test(stderr)) {
|
|
1672
|
+
return true;
|
|
1673
|
+
}
|
|
1674
|
+
const lowerStderr = stderr.toLowerCase();
|
|
1675
|
+
return (lowerStderr.includes('unable to resolve dependency tree') ||
|
|
1676
|
+
lowerStderr.includes('could not resolve dependency') ||
|
|
1677
|
+
lowerStderr.includes('conflicting peer dependency'));
|
|
1678
|
+
}
|
|
1679
|
+
function logNpmPeerDepsError(phase) {
|
|
1680
|
+
const peerDepsResolutionSteps = [
|
|
1681
|
+
'Recommended approaches (in order of preference):',
|
|
1682
|
+
'',
|
|
1683
|
+
'1. Use "overrides" in package.json to force compatible versions across the dependency tree.',
|
|
1684
|
+
' See https://docs.npmjs.com/cli/configuring-npm/package-json#overrides',
|
|
1685
|
+
'2. Persist legacy peer deps resolution in the project ".npmrc":',
|
|
1686
|
+
' npm config set legacy-peer-deps=true --location=project',
|
|
1687
|
+
' (bypasses peer dependency resolution; use with caution)',
|
|
1688
|
+
'3. As a last resort, force the installation by running "npm install --force".',
|
|
1689
|
+
' (does not persist and may produce broken installs)',
|
|
1690
|
+
];
|
|
1691
|
+
const manualInstallHint = [
|
|
1692
|
+
'If you installed the dependencies manually, pass "--skip-install" to avoid re-installing them:',
|
|
1693
|
+
' nx migrate --run-migrations --skip-install',
|
|
1694
|
+
];
|
|
1695
|
+
if (phase === 'pre-migration') {
|
|
1696
|
+
output_1.output.error({
|
|
1697
|
+
title: 'You need to resolve the peer dependency conflicts before the migration can continue',
|
|
1698
|
+
bodyLines: [
|
|
1699
|
+
...peerDepsResolutionSteps,
|
|
1700
|
+
'',
|
|
1701
|
+
'Once the conflicts are resolved, re-run the migrations:',
|
|
1702
|
+
' nx migrate --run-migrations',
|
|
1703
|
+
'',
|
|
1704
|
+
...manualInstallHint,
|
|
1705
|
+
],
|
|
1706
|
+
});
|
|
1707
|
+
}
|
|
1708
|
+
else {
|
|
1709
|
+
output_1.output.error({
|
|
1710
|
+
title: 'Some migrations have been applied, but installing the updated dependencies failed',
|
|
1711
|
+
bodyLines: [
|
|
1712
|
+
...peerDepsResolutionSteps,
|
|
1713
|
+
'',
|
|
1714
|
+
'Once the conflicts are resolved, run "npm install" to install the updated dependencies.',
|
|
1715
|
+
'If the migration was interrupted before completing, re-run the remaining migrations:',
|
|
1716
|
+
' nx migrate --run-migrations',
|
|
1717
|
+
'',
|
|
1718
|
+
...manualInstallHint,
|
|
1719
|
+
],
|
|
1720
|
+
});
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
function resolveAgenticRunId(migrations) {
|
|
1724
|
+
return (0, semver_1.rsort)(migrations.map((m) => (0, version_utils_1.normalizeVersion)(m.version)))[0];
|
|
1725
|
+
}
|
|
1726
|
+
function formatSkippedPromptsNextStep(skipped) {
|
|
1727
|
+
return [
|
|
1728
|
+
'Some prompt migrations were skipped. Review and apply each of the following prompt files to the workspace, in the listed order:',
|
|
1729
|
+
...skipped.map((m) => ` - ${m.prompt}`),
|
|
1730
|
+
].join('\n');
|
|
1731
|
+
}
|
|
1732
|
+
/**
|
|
1733
|
+
* Resolves the effective `--create-commits` state once the agentic flow has
|
|
1734
|
+
* been resolved. The agent's outer prompt only embeds the impl-phase file list
|
|
1735
|
+
* when per-migration commits isolate each migration's diff, so the diff-context
|
|
1736
|
+
* flag returned here gates that section.
|
|
1737
|
+
*/
|
|
1738
|
+
function resolveCreateCommits(args) {
|
|
1739
|
+
const { createCommits, agenticKind, isGitRepo, commitPrefixIsCustom } = args;
|
|
1740
|
+
// Explicit `--create-commits` without git is a hard error — the user asked
|
|
1741
|
+
// for something we cannot deliver.
|
|
1742
|
+
if (createCommits === true && !isGitRepo) {
|
|
1743
|
+
return {
|
|
1744
|
+
effective: false,
|
|
1745
|
+
agenticHasDiffContext: false,
|
|
1746
|
+
error: '`--create-commits` requires a git repository. Run `git init` first, or omit the flag.',
|
|
1747
|
+
};
|
|
1748
|
+
}
|
|
1749
|
+
if (agenticKind === 'enabled') {
|
|
1750
|
+
if (createCommits === false) {
|
|
1751
|
+
return {
|
|
1752
|
+
effective: false,
|
|
1753
|
+
agenticHasDiffContext: false,
|
|
1754
|
+
warning: "--no-create-commits was passed alongside --agentic. Without per-migration commits, the agent can't isolate the current migration's changes from earlier migrations in this run. Drop --no-create-commits for accurate per-migration review." +
|
|
1755
|
+
(commitPrefixIsCustom
|
|
1756
|
+
? ' Note: the custom --commit-prefix value will have no effect because commits are disabled.'
|
|
1757
|
+
: ''),
|
|
1758
|
+
};
|
|
1759
|
+
}
|
|
1760
|
+
// Without git we cannot soft-force commits the user didn't explicitly
|
|
1761
|
+
// opt into. Degrade rather than error: continue the agentic run, but
|
|
1762
|
+
// without per-file diff context (which depends on per-migration commits).
|
|
1763
|
+
if (!isGitRepo) {
|
|
1764
|
+
return {
|
|
1765
|
+
effective: false,
|
|
1766
|
+
agenticHasDiffContext: false,
|
|
1767
|
+
warning: '`--agentic` enables per-migration commits by default, but the workspace is not a git repository. Continuing without commits — the agent will not receive per-file diff context. Run `git init` to enable.' +
|
|
1768
|
+
(commitPrefixIsCustom
|
|
1769
|
+
? ' The custom --commit-prefix value will have no effect.'
|
|
1770
|
+
: ''),
|
|
1771
|
+
};
|
|
1772
|
+
}
|
|
1773
|
+
return { effective: true, agenticHasDiffContext: true };
|
|
1774
|
+
}
|
|
1775
|
+
// Commits aren't enabled here. A custom prefix only reaches this path via
|
|
1776
|
+
// nx.json (e.g. `migrate.commitPrefix` + `migrate.agentic` when the agentic
|
|
1777
|
+
// flow resolves to disabled); surface that it has no effect rather than
|
|
1778
|
+
// dropping it silently.
|
|
1779
|
+
return {
|
|
1780
|
+
effective: createCommits === true,
|
|
1781
|
+
agenticHasDiffContext: false,
|
|
1782
|
+
warning: commitPrefixIsCustom && createCommits !== true
|
|
1783
|
+
? 'A custom migrate commit prefix is configured, but commits are not enabled for this run, so it has no effect. Set `migrate.createCommits` to `true` (or pass `--create-commits`) to create a commit per migration.'
|
|
1784
|
+
: undefined,
|
|
1785
|
+
};
|
|
1786
|
+
}
|
|
1787
|
+
/**
|
|
1788
|
+
* Resolves whether the framework-owned generic-validation agent step should run
|
|
1789
|
+
* after generator-only migrations.
|
|
1790
|
+
*
|
|
1791
|
+
* Default-on when the agentic flow resolved to `enabled`; silently ignored
|
|
1792
|
+
* otherwise (no warning emitted) — `--validate` requires an active agent
|
|
1793
|
+
* session by definition. An explicit `--no-validate` (`validate === false`)
|
|
1794
|
+
* opts out even when agentic is enabled.
|
|
1795
|
+
*/
|
|
1796
|
+
function resolveShouldRunValidation(args) {
|
|
1797
|
+
return args.validate !== false && args.agenticKind === 'enabled';
|
|
1798
|
+
}
|
|
1799
|
+
async function executeMigrations(root, migrations, isVerbose, shouldCreateCommits, commitPrefix, shouldSkipInstall = false, agentic, agenticHasDiffContext = false, shouldRunValidation = false) {
|
|
1800
|
+
const changedDepInstaller = new ChangedDepInstaller(root, shouldSkipInstall);
|
|
1801
|
+
const migrationsWithNoChanges = [];
|
|
1802
|
+
const sortedMigrations = migrations.sort((a, b) => {
|
|
1803
|
+
// Under `--agentic`, hoist the v23 migration that ignores
|
|
1804
|
+
// `.nx/migrate-runs` to position 0 so its .gitignore update lands
|
|
1805
|
+
// before any per-migration commit absorbs the run's handoff scratch.
|
|
1806
|
+
// See `agentic/handoff-gitignore.ts` for the full rationale and the
|
|
1807
|
+
// inline-fallback path that covers intra-pre-v23 agentic runs.
|
|
1808
|
+
if (agentic?.kind === 'enabled') {
|
|
1809
|
+
if ((0, handoff_gitignore_1.isHandoffGitignoreMigration)(a))
|
|
1810
|
+
return -1;
|
|
1811
|
+
if ((0, handoff_gitignore_1.isHandoffGitignoreMigration)(b))
|
|
1812
|
+
return 1;
|
|
1813
|
+
}
|
|
1814
|
+
// special case for the split configuration migration to run first
|
|
1815
|
+
if (a.name === '15-7-0-split-configuration-into-project-json-files') {
|
|
1816
|
+
return -1;
|
|
1817
|
+
}
|
|
1818
|
+
if (b.name === '15-7-0-split-configuration-into-project-json-files') {
|
|
1819
|
+
return 1;
|
|
1820
|
+
}
|
|
1821
|
+
return (0, semver_1.lt)((0, version_utils_1.normalizeVersion)(a.version), (0, version_utils_1.normalizeVersion)(b.version))
|
|
1822
|
+
? -1
|
|
1823
|
+
: 1;
|
|
1824
|
+
});
|
|
1825
|
+
// Lazy-load the agentic chain so non-agentic runs don't pay its startup cost.
|
|
1826
|
+
let agenticRun;
|
|
1827
|
+
if (agentic?.kind === 'enabled' && sortedMigrations.length > 0) {
|
|
1828
|
+
const { initRunDir } = require('./agentic/handoff');
|
|
1829
|
+
const { runAgenticPromptStep } = require('./agentic/run-step');
|
|
1830
|
+
agenticRun = {
|
|
1831
|
+
agentic,
|
|
1832
|
+
runDir: initRunDir(root, resolveAgenticRunId(sortedMigrations)),
|
|
1833
|
+
runStep: runAgenticPromptStep,
|
|
1834
|
+
};
|
|
1835
|
+
}
|
|
1836
|
+
const printDroppedAgentContext = agentic?.kind === 'inside-agent'
|
|
1837
|
+
? require('./agentic/print-dropped-agent-context').printDroppedAgentContextForOuterAgent
|
|
1838
|
+
: undefined;
|
|
1839
|
+
logger_1.logger.info(`Running the following migrations:`);
|
|
1840
|
+
sortedMigrations.forEach((m) => logger_1.logger.info(m.description
|
|
1841
|
+
? `- ${m.package}: ${m.name} — ${m.description}`
|
|
1842
|
+
: `- ${m.package}: ${m.name}`));
|
|
1843
|
+
logger_1.logger.info('');
|
|
1844
|
+
// Tracked separately from `skippedPrompts` so the end-of-run logic can
|
|
1845
|
+
// render them distinctly per resolution mode.
|
|
1846
|
+
const migrationEmittedNextSteps = [];
|
|
1847
|
+
const skippedPrompts = [];
|
|
1848
|
+
// One record per migration the loop touched. `status: 'completed'` records
|
|
1849
|
+
// are pushed at the end of each successful iteration; `status: 'aborted'`
|
|
1850
|
+
// is pushed by the catch block when a migration throws mid-iteration, so
|
|
1851
|
+
// `outcomes` is the single source of truth for the recap and tally — no
|
|
1852
|
+
// parallel "pending" list. `outcomes.length` always equals `migrationIndex`
|
|
1853
|
+
// after the loop body runs.
|
|
1854
|
+
const outcomes = [];
|
|
1855
|
+
// Prompt-only migrations whose agent never ran. Hybrid migrations with a
|
|
1856
|
+
// skipped prompt are NOT counted here — their deterministic half still ran.
|
|
1857
|
+
let notRunMigrationsCount = 0;
|
|
1858
|
+
const skipReason = agentic?.kind === 'inside-agent'
|
|
1859
|
+
? 'deferred to the AI agent driving this run'
|
|
1860
|
+
: 'agentic flow disabled';
|
|
1861
|
+
const installDepsIfChanged = () => changedDepInstaller.installDepsIfChanged();
|
|
1862
|
+
// Returns the migrations whose own commits failed and whose diffs are
|
|
1863
|
+
// still sitting in the working tree — derived live from `outcomes`. The
|
|
1864
|
+
// next successful commit absorbs them via `git add -A`; its commit body
|
|
1865
|
+
// lists them so a reader of `git log -p` can see which prior migrations'
|
|
1866
|
+
// diffs got pulled in.
|
|
1867
|
+
const pendingForCommitBody = () => outcomes
|
|
1868
|
+
.filter((o) => o.commit.kind === 'failed')
|
|
1869
|
+
.map((o) => ({ package: o.migration.package, name: o.migration.name }));
|
|
1870
|
+
// True while at least one prior migration's commit has failed and its
|
|
1871
|
+
// diff hasn't been absorbed yet. While true, the working tree carries
|
|
1872
|
+
// prior-migration state, so the `hasDiffContext` flag in the hybrid-
|
|
1873
|
+
// agentic and validation-agentic prompt branches is suppressed (the
|
|
1874
|
+
// prompt-only-with-agentic branch doesn't use `hasDiffContext`).
|
|
1875
|
+
const hasPendingCommitDebt = () => outcomes.some((o) => o.commit.kind === 'failed');
|
|
1876
|
+
// Single funnel for per-migration commit attempts. Returns the
|
|
1877
|
+
// `CommitState` to record on the migration's outcome. On `committed`,
|
|
1878
|
+
// back-annotates any prior failed-commit outcomes to `kind: 'absorbed'`
|
|
1879
|
+
// (their diffs were just rolled into this commit via `git add -A`).
|
|
1880
|
+
async function attemptMigrationCommit(m) {
|
|
1881
|
+
const pending = pendingForCommitBody();
|
|
1882
|
+
const result = await (0, migrate_commits_1.commitMigrationIfRequested)(root, m, shouldCreateCommits, commitPrefix, installDepsIfChanged, pending);
|
|
1883
|
+
if (result.status === 'committed') {
|
|
1884
|
+
// This commit absorbed every pending failed-commit migration's diff.
|
|
1885
|
+
// Transition their `commit.kind: 'failed'` records to `'absorbed'` so
|
|
1886
|
+
// the failure recap (if a later migration throws) can anchor them
|
|
1887
|
+
// and the retained-state filter no longer counts them as
|
|
1888
|
+
// uncommitted.
|
|
1889
|
+
//
|
|
1890
|
+
// The key is `package:name`; matching on `name` alone would conflate
|
|
1891
|
+
// across packages. Guard the kind check so a subsequent absorption-
|
|
1892
|
+
// of-same-name cannot overwrite an earlier annotation.
|
|
1893
|
+
if (pending.length > 0) {
|
|
1894
|
+
const absorbedKeys = new Set(pending.map((p) => `${p.package}:${p.name}`));
|
|
1895
|
+
for (const o of outcomes) {
|
|
1896
|
+
const key = `${o.migration.package}:${o.migration.name}`;
|
|
1897
|
+
if (absorbedKeys.has(key) && o.commit.kind === 'failed') {
|
|
1898
|
+
o.commit = {
|
|
1899
|
+
kind: 'absorbed',
|
|
1900
|
+
into: { name: m.name, sha: result.sha },
|
|
1901
|
+
};
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
return { kind: 'landed', sha: result.sha };
|
|
1906
|
+
}
|
|
1907
|
+
if (result.status === 'failed') {
|
|
1908
|
+
// Diff is still in WT. Subsequent prompts cannot claim git-isolation
|
|
1909
|
+
// until a later commit absorbs the backlog.
|
|
1910
|
+
return { kind: 'failed' };
|
|
1911
|
+
}
|
|
1912
|
+
// `no-changes` and `disabled` — no commit attempted, nothing to record
|
|
1913
|
+
// as a commit failure.
|
|
1914
|
+
return { kind: 'none' };
|
|
1915
|
+
}
|
|
1916
|
+
const totalMigrations = sortedMigrations.length;
|
|
1917
|
+
let migrationIndex = 0;
|
|
1918
|
+
for (const m of sortedMigrations) {
|
|
1919
|
+
migrationIndex++;
|
|
1920
|
+
(0, migrate_output_1.logMigrationBoundary)(migrationIndex, totalMigrations, m.package, m.name);
|
|
1921
|
+
// Snapshot the WT for before/after comparison in the catch block.
|
|
1922
|
+
// Content-sensitive so a dirty→dirty case (this migration mutating an
|
|
1923
|
+
// already-dirty shared file like `package.json`) doesn't collapse.
|
|
1924
|
+
const baselineWorkingTreeSnapshot = (0, git_utils_1.getUncommittedChangesSnapshot)(root);
|
|
1925
|
+
// Tracks whether a failure originated in the agentic step so the error
|
|
1926
|
+
// event classifies it as 'agentic' rather than 'migration_exec'.
|
|
1927
|
+
let inAgenticStep = false;
|
|
1928
|
+
try {
|
|
1929
|
+
// Read this migration's collection once and derive everything from it:
|
|
1930
|
+
// the implementation context (passed to runNxOrAngularMigration) and the
|
|
1931
|
+
// documentation path (passed to the agent). Read fresh per iteration so a
|
|
1932
|
+
// prior migration's reinstall is reflected.
|
|
1933
|
+
const { resolvedCollection, documentationPath } = resolveMigrationForRun(root, m, !!agenticRun);
|
|
1934
|
+
let outcome;
|
|
1935
|
+
let commit = { kind: 'none' };
|
|
1936
|
+
if ((0, migration_shape_1.isPromptOnlyMigration)(m)) {
|
|
1937
|
+
if (agenticRun) {
|
|
1938
|
+
inAgenticStep = true;
|
|
1939
|
+
const stepResult = await agenticRun.runStep({
|
|
1940
|
+
root,
|
|
1941
|
+
migration: m,
|
|
1942
|
+
agentic: agenticRun.agentic,
|
|
1943
|
+
runDir: agenticRun.runDir,
|
|
1944
|
+
installDepsIfChanged,
|
|
1945
|
+
documentationPath,
|
|
1946
|
+
});
|
|
1947
|
+
inAgenticStep = false;
|
|
1948
|
+
commit = await attemptMigrationCommit(m);
|
|
1949
|
+
(0, migrate_output_1.logAgenticSuccessOutcome)(stepResult.ambiguous ? 'Marked complete by user' : 'Applied', commit.kind === 'landed' ? commit.sha : null, stepResult.summary);
|
|
1950
|
+
outcome = 'applied';
|
|
1951
|
+
}
|
|
1952
|
+
else {
|
|
1953
|
+
logger_1.logger.info(pc.dim(`↷ Skipped — ${skipReason}. Listed in next steps.`));
|
|
1954
|
+
skippedPrompts.push(m);
|
|
1955
|
+
notRunMigrationsCount++;
|
|
1956
|
+
outcome = 'deferred';
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
else if ((0, migration_shape_1.isHybridMigration)(m)) {
|
|
1960
|
+
const { changes, nextSteps, agentContext, logs, madeChanges } = await runNxOrAngularMigration(root, m, isVerbose,
|
|
1961
|
+
/* captureGeneratorOutput: */ !!agenticRun, resolvedCollection);
|
|
1962
|
+
migrationEmittedNextSteps.push(...nextSteps);
|
|
1963
|
+
if (agenticRun) {
|
|
1964
|
+
// Install any deps the deterministic phase added/bumped before the
|
|
1965
|
+
// agent runs — the prompt half may depend on them being present in
|
|
1966
|
+
// node_modules.
|
|
1967
|
+
await installDepsIfChanged();
|
|
1968
|
+
inAgenticStep = true;
|
|
1969
|
+
const stepResult = await agenticRun.runStep({
|
|
1970
|
+
root,
|
|
1971
|
+
migration: m,
|
|
1972
|
+
agentic: agenticRun.agentic,
|
|
1973
|
+
runDir: agenticRun.runDir,
|
|
1974
|
+
installDepsIfChanged,
|
|
1975
|
+
documentationPath,
|
|
1976
|
+
implContext: {
|
|
1977
|
+
logs,
|
|
1978
|
+
changes,
|
|
1979
|
+
agentContext,
|
|
1980
|
+
// When prior commits failed, the working tree carries their
|
|
1981
|
+
// diff. The git-inspect path of the prompt would mislead the
|
|
1982
|
+
// agent in that case; fall back to embedded `<files_changed>`.
|
|
1983
|
+
hasDiffContext: agenticHasDiffContext && !hasPendingCommitDebt(),
|
|
1984
|
+
},
|
|
1985
|
+
});
|
|
1986
|
+
inAgenticStep = false;
|
|
1987
|
+
commit = await attemptMigrationCommit(m);
|
|
1988
|
+
(0, migrate_output_1.logAgenticSuccessOutcome)(stepResult.ambiguous ? 'Marked complete by user' : 'Applied', commit.kind === 'landed' ? commit.sha : null, stepResult.summary);
|
|
1989
|
+
outcome = 'applied';
|
|
1990
|
+
}
|
|
1991
|
+
else {
|
|
1992
|
+
// The inner prompt step doesn't run here (agentic disabled, or
|
|
1993
|
+
// running inside an outer agent). Under `inside-agent`, surface the
|
|
1994
|
+
// generator-emitted `agentContext` to stdout so the outer driving
|
|
1995
|
+
// agent can ingest it. Under `disabled` the run is human-driven;
|
|
1996
|
+
// agent-targeted context would only add noise — drop.
|
|
1997
|
+
logger_1.logger.info(pc.dim(`↷ Prompt phase skipped — ${skipReason}. Listed in next steps.`));
|
|
1998
|
+
if (printDroppedAgentContext && agentContext.length > 0) {
|
|
1999
|
+
printDroppedAgentContext({ migration: m, agentContext });
|
|
2000
|
+
}
|
|
2001
|
+
skippedPrompts.push(m);
|
|
2002
|
+
if (!madeChanges) {
|
|
2003
|
+
migrationsWithNoChanges.push(m);
|
|
2004
|
+
}
|
|
2005
|
+
// Only attempt a commit when this migration's deterministic
|
|
2006
|
+
// phase actually produced changes. Otherwise the absorbing
|
|
2007
|
+
// `git add -A` would build a commit subject naming this no-op
|
|
2008
|
+
// migration even though its content is entirely prior pending
|
|
2009
|
+
// diffs — confusing `git log` / `git blame` attribution. Pending
|
|
2010
|
+
// stays pending and the next change-producing migration absorbs.
|
|
2011
|
+
if (madeChanges) {
|
|
2012
|
+
commit = await attemptMigrationCommit(m);
|
|
2013
|
+
}
|
|
2014
|
+
if (commit.kind === 'landed' && commit.sha) {
|
|
2015
|
+
logger_1.logger.info(pc.dim(`Committed as ${commit.sha}`));
|
|
2016
|
+
}
|
|
2017
|
+
outcome = 'deferred';
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
else {
|
|
2021
|
+
// Defer commit until validation succeeds; failed validation leaves
|
|
2022
|
+
// changes uncommitted in the working tree for the user to review.
|
|
2023
|
+
const validationRun = agenticRun && shouldRunValidation ? agenticRun : undefined;
|
|
2024
|
+
const { changes, nextSteps, agentContext, logs, madeChanges } = await runNxOrAngularMigration(root, m, isVerbose,
|
|
2025
|
+
/* captureGeneratorOutput: */ !!validationRun, resolvedCollection);
|
|
2026
|
+
migrationEmittedNextSteps.push(...nextSteps);
|
|
2027
|
+
const canRunValidation = !!validationRun && changes.length > 0;
|
|
2028
|
+
if (canRunValidation) {
|
|
2029
|
+
// Install any deps the deterministic phase added/bumped before the
|
|
2030
|
+
// validation agent runs — the agent may run tasks that need them.
|
|
2031
|
+
await installDepsIfChanged();
|
|
2032
|
+
inAgenticStep = true;
|
|
2033
|
+
const stepResult = await validationRun.runStep({
|
|
2034
|
+
root,
|
|
2035
|
+
migration: m,
|
|
2036
|
+
agentic: validationRun.agentic,
|
|
2037
|
+
runDir: validationRun.runDir,
|
|
2038
|
+
installDepsIfChanged,
|
|
2039
|
+
documentationPath,
|
|
2040
|
+
implContext: {
|
|
2041
|
+
logs,
|
|
2042
|
+
changes,
|
|
2043
|
+
agentContext,
|
|
2044
|
+
// See the hybrid agentic branch above for the rationale on
|
|
2045
|
+
// why pending commit debt gates git-inspect context.
|
|
2046
|
+
hasDiffContext: agenticHasDiffContext && !hasPendingCommitDebt(),
|
|
2047
|
+
},
|
|
2048
|
+
mode: 'generic-validation',
|
|
2049
|
+
});
|
|
2050
|
+
inAgenticStep = false;
|
|
2051
|
+
commit = await attemptMigrationCommit(m);
|
|
2052
|
+
(0, migrate_output_1.logAgenticSuccessOutcome)(stepResult.ambiguous
|
|
2053
|
+
? 'Marked complete by user'
|
|
2054
|
+
: 'Validation passed', commit.kind === 'landed' ? commit.sha : null, stepResult.summary);
|
|
2055
|
+
outcome = 'applied';
|
|
2056
|
+
}
|
|
2057
|
+
else {
|
|
2058
|
+
// Inner validation step didn't run. Surface `agentContext` under
|
|
2059
|
+
// `inside-agent` so the outer driving agent can ingest it.
|
|
2060
|
+
if (printDroppedAgentContext && agentContext.length > 0) {
|
|
2061
|
+
printDroppedAgentContext({ migration: m, agentContext });
|
|
2062
|
+
}
|
|
2063
|
+
if (!madeChanges) {
|
|
2064
|
+
migrationsWithNoChanges.push(m);
|
|
2065
|
+
outcome = 'no-changes';
|
|
2066
|
+
}
|
|
2067
|
+
else {
|
|
2068
|
+
commit = await attemptMigrationCommit(m);
|
|
2069
|
+
if (commit.kind === 'landed' && commit.sha) {
|
|
2070
|
+
logger_1.logger.info(pc.dim(`Committed as ${commit.sha}`));
|
|
2071
|
+
}
|
|
2072
|
+
outcome = 'applied';
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
}
|
|
2076
|
+
outcomes.push({
|
|
2077
|
+
migration: { package: m.package, name: m.name },
|
|
2078
|
+
status: 'completed',
|
|
2079
|
+
kind: outcome,
|
|
2080
|
+
commit,
|
|
2081
|
+
});
|
|
2082
|
+
logger_1.logger.info('');
|
|
2083
|
+
}
|
|
2084
|
+
catch (e) {
|
|
2085
|
+
// Record the in-flight migration as `aborted` so the recap and tally
|
|
2086
|
+
// see it. `commit: 'failed'` requires both: (1) commits were
|
|
2087
|
+
// requested — otherwise the "could not be created" recap line is
|
|
2088
|
+
// false; (2) the WT snapshot diverged from the iteration baseline —
|
|
2089
|
+
// net-new state, not the pre-existing pending diff. Else `'none'`.
|
|
2090
|
+
const leftNewDiff = (0, git_utils_1.getUncommittedChangesSnapshot)(root) !== baselineWorkingTreeSnapshot;
|
|
2091
|
+
outcomes.push({
|
|
2092
|
+
migration: { package: m.package, name: m.name },
|
|
2093
|
+
status: 'aborted',
|
|
2094
|
+
commit: shouldCreateCommits && leftNewDiff
|
|
2095
|
+
? { kind: 'failed' }
|
|
2096
|
+
: { kind: 'none' },
|
|
2097
|
+
});
|
|
2098
|
+
// `nx repair` reuses executeMigrations; only record for migrate runs.
|
|
2099
|
+
if ((0, migrate_analytics_1.hasMigrateRunStarted)()) {
|
|
2100
|
+
(0, migrate_analytics_1.reportMigrateRunError)({
|
|
2101
|
+
code: e instanceof NpmPeerDepsInstallError
|
|
2102
|
+
? 'npm_install'
|
|
2103
|
+
: inAgenticStep
|
|
2104
|
+
? 'agentic'
|
|
2105
|
+
: 'migration_exec',
|
|
2106
|
+
migrationPackage: m.package,
|
|
2107
|
+
migrationName: m.name,
|
|
2108
|
+
migrationCount: totalMigrations,
|
|
2109
|
+
error: e,
|
|
2110
|
+
});
|
|
2111
|
+
}
|
|
2112
|
+
if (!(e instanceof NpmPeerDepsInstallError)) {
|
|
2113
|
+
// `withGeneratorOutputCapture` attaches the generator's `console.*`
|
|
2114
|
+
// output as `capturedLogs` (best-effort; may be absent). Surface it
|
|
2115
|
+
// so the user sees what the generator printed before it crashed.
|
|
2116
|
+
const capturedLogs = e?.capturedLogs;
|
|
2117
|
+
const bodyLines = typeof capturedLogs === 'string' && capturedLogs.length > 0
|
|
2118
|
+
? [
|
|
2119
|
+
'Output from the generator before it failed:',
|
|
2120
|
+
'',
|
|
2121
|
+
...capturedLogs.split('\n'),
|
|
2122
|
+
]
|
|
2123
|
+
: undefined;
|
|
2124
|
+
output_1.output.error({
|
|
2125
|
+
title: `Failed to run ${m.name} from ${m.package}. This workspace is NOT up to date!`,
|
|
2126
|
+
bodyLines,
|
|
2127
|
+
});
|
|
2128
|
+
(0, migrate_output_1.logFailureRecap)({
|
|
2129
|
+
migrationIndex,
|
|
2130
|
+
totalMigrations,
|
|
2131
|
+
outcomes,
|
|
2132
|
+
migrationEmittedNextSteps,
|
|
2133
|
+
insideAgent: agentic?.kind === 'inside-agent',
|
|
2134
|
+
});
|
|
2135
|
+
}
|
|
2136
|
+
throw e;
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
if (!shouldCreateCommits) {
|
|
2140
|
+
await installDepsIfChanged();
|
|
2141
|
+
}
|
|
2142
|
+
if (changedDepInstaller.skippedInstall) {
|
|
2143
|
+
logSkippedPostMigrationInstall(root);
|
|
2144
|
+
}
|
|
2145
|
+
// Combined-view next-steps array kept for back-compat with repair.ts, which
|
|
2146
|
+
// consumes the single `nextSteps` field.
|
|
2147
|
+
const combinedNextSteps = [...migrationEmittedNextSteps];
|
|
2148
|
+
if (skippedPrompts.length > 0) {
|
|
2149
|
+
combinedNextSteps.push(formatSkippedPromptsNextStep(skippedPrompts));
|
|
2150
|
+
}
|
|
2151
|
+
return {
|
|
2152
|
+
migrationsWithNoChanges,
|
|
2153
|
+
skippedPromptsCount: skippedPrompts.length,
|
|
2154
|
+
notRunMigrationsCount,
|
|
2155
|
+
nextSteps: combinedNextSteps,
|
|
2156
|
+
skippedPrompts,
|
|
2157
|
+
migrationEmittedNextSteps,
|
|
2158
|
+
committedShasCount: (0, migrate_output_1.countLandedCommits)(outcomes),
|
|
2159
|
+
// Migrations whose commits failed and never got absorbed by a later
|
|
2160
|
+
// commit. The caller surfaces them so a successful run doesn't claim
|
|
2161
|
+
// "up to date" while leaving uncommitted diffs in the working tree.
|
|
2162
|
+
// Formatted as `package: name` for direct display.
|
|
2163
|
+
retainedAtSuccess: (0, migrate_output_1.retainedMigrations)(outcomes).map((p) => `${p.package}: ${p.name}`),
|
|
2164
|
+
};
|
|
2165
|
+
}
|
|
2166
|
+
class ChangedDepInstaller {
|
|
2167
|
+
constructor(root, shouldSkipInstall = false) {
|
|
2168
|
+
this.root = root;
|
|
2169
|
+
this.shouldSkipInstall = shouldSkipInstall;
|
|
2170
|
+
this._skippedInstall = false;
|
|
2171
|
+
this.initialDeps = getStringifiedPackageJsonDeps(root);
|
|
2172
|
+
}
|
|
2173
|
+
get skippedInstall() {
|
|
2174
|
+
return this._skippedInstall;
|
|
2175
|
+
}
|
|
2176
|
+
async installDepsIfChanged() {
|
|
2177
|
+
const currentDeps = getStringifiedPackageJsonDeps(this.root);
|
|
2178
|
+
if (this.initialDeps !== currentDeps) {
|
|
2179
|
+
if (this.shouldSkipInstall) {
|
|
2180
|
+
this._skippedInstall = true;
|
|
2181
|
+
}
|
|
2182
|
+
else {
|
|
2183
|
+
await runInstall(this.root, 'post-migration');
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
this.initialDeps = currentDeps;
|
|
2187
|
+
}
|
|
2188
|
+
}
|
|
2189
|
+
exports.ChangedDepInstaller = ChangedDepInstaller;
|
|
2190
|
+
function logSkippedPostMigrationInstall(root) {
|
|
2191
|
+
const packageManager = (0, package_manager_1.detectPackageManager)(root);
|
|
2192
|
+
const installCommand = (0, package_manager_1.getPackageManagerCommand)(packageManager, root).install;
|
|
2193
|
+
output_1.output.warn({
|
|
2194
|
+
title: 'Migrations updated your dependencies, but the install was skipped',
|
|
2195
|
+
bodyLines: [`Run "${installCommand}" to install the updated dependencies.`],
|
|
2196
|
+
});
|
|
2197
|
+
}
|
|
2198
|
+
async function runNxOrAngularMigration(root, migration, isVerbose, captureGeneratorOutput = false, resolvedCollection) {
|
|
2199
|
+
const { collection, collectionPath } = resolvedCollection ?? readMigrationCollection(migration.package, root);
|
|
2200
|
+
let changes = [];
|
|
2201
|
+
let nextSteps = [];
|
|
2202
|
+
let agentContext = [];
|
|
2203
|
+
let logs = '';
|
|
2204
|
+
// Angular's `ngResult.changes` is synthesized from the schematic's
|
|
2205
|
+
// DryRunEvent stream so Nx and Angular paths can share commit/validation
|
|
2206
|
+
// gating via `changes.length > 0`.
|
|
2207
|
+
let madeChanges = false;
|
|
2208
|
+
logger_1.logger.info(pc.dim('→ Running generator…'));
|
|
2209
|
+
if (!isAngularMigration(collection, migration.name)) {
|
|
2210
|
+
({ nextSteps, changes, agentContext, logs } = await runNxMigration(root, collectionPath, collection, migration.name, migration.version, captureGeneratorOutput));
|
|
2211
|
+
madeChanges = changes.length > 0;
|
|
2212
|
+
logger_1.logger.info(`Ran ${migration.name} from ${migration.package}`);
|
|
2213
|
+
if (migration.description) {
|
|
2214
|
+
logger_1.logger.info(` ${migration.description}`);
|
|
2215
|
+
}
|
|
2216
|
+
logger_1.logger.info('');
|
|
2217
|
+
if (!madeChanges) {
|
|
2218
|
+
logger_1.logger.info(`No changes were made\n`);
|
|
2219
|
+
return { changes, nextSteps, agentContext, logs, madeChanges };
|
|
2220
|
+
}
|
|
2221
|
+
logger_1.logger.info('Changes:');
|
|
2222
|
+
(0, tree_1.printChanges)(changes, ' ');
|
|
2223
|
+
logger_1.logger.info('');
|
|
2224
|
+
}
|
|
2225
|
+
else {
|
|
2226
|
+
const ngCliAdapter = await getNgCompatLayer();
|
|
2227
|
+
const migrationProjectGraph = await (0, project_graph_1.createProjectGraphAsync)();
|
|
2228
|
+
const ngResult = await ngCliAdapter.runMigration(root, migration.package, migration.name, (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(migrationProjectGraph).projects, isVerbose, migrationProjectGraph);
|
|
2229
|
+
changes = ngResult.changes;
|
|
2230
|
+
madeChanges = ngResult.madeChanges;
|
|
2231
|
+
logs = ngResult.loggingQueue.join('\n');
|
|
2232
|
+
logger_1.logger.info(`Ran ${migration.name} from ${migration.package}`);
|
|
2233
|
+
if (migration.description) {
|
|
2234
|
+
logger_1.logger.info(` ${migration.description}`);
|
|
2235
|
+
}
|
|
2236
|
+
logger_1.logger.info('');
|
|
2237
|
+
if (!madeChanges) {
|
|
2238
|
+
logger_1.logger.info(`No changes were made\n`);
|
|
2239
|
+
return { changes, nextSteps, agentContext, logs, madeChanges };
|
|
2240
|
+
}
|
|
2241
|
+
logger_1.logger.info('Changes:');
|
|
2242
|
+
ngResult.loggingQueue.forEach((log) => logger_1.logger.info(' ' + log));
|
|
2243
|
+
logger_1.logger.info('');
|
|
2244
|
+
}
|
|
2245
|
+
return { changes, nextSteps, agentContext, logs, madeChanges };
|
|
2246
|
+
}
|
|
2247
|
+
async function runMigrations(root, opts, args, isVerbose, shouldCreateCommits, commitPrefix, shouldSkipInstall = false) {
|
|
2248
|
+
if (!shouldSkipInstall && !process.env.NX_MIGRATE_SKIP_INSTALL) {
|
|
2249
|
+
await runInstall();
|
|
2250
|
+
}
|
|
2251
|
+
if (!__dirname.startsWith(workspace_root_1.workspaceRoot)) {
|
|
2252
|
+
// we are running from a temp installation with nx latest, switch to running
|
|
2253
|
+
// from local installation
|
|
2254
|
+
const exitCode = runOrReturnExitCode(() => (0, child_process_2.runNxSync)(`migrate ${args.join(' ')}`, {
|
|
2255
|
+
stdio: ['inherit', 'inherit', 'inherit'],
|
|
2256
|
+
env: {
|
|
2257
|
+
...process.env,
|
|
2258
|
+
NX_MIGRATE_SKIP_INSTALL: 'true',
|
|
2259
|
+
NX_MIGRATE_USE_LOCAL: 'true',
|
|
2260
|
+
},
|
|
2261
|
+
}));
|
|
2262
|
+
if (exitCode !== 0) {
|
|
2263
|
+
return exitCode;
|
|
2264
|
+
}
|
|
2265
|
+
return;
|
|
2266
|
+
}
|
|
2267
|
+
const migrationsExists = (0, fileutils_1.fileExists)(opts.runMigrations);
|
|
2268
|
+
if (opts.ifExists && !migrationsExists) {
|
|
2269
|
+
output_1.output.log({
|
|
2270
|
+
title: `Migrations file '${opts.runMigrations}' doesn't exist`,
|
|
2271
|
+
});
|
|
2272
|
+
return;
|
|
2273
|
+
}
|
|
2274
|
+
else if (!opts.ifExists && !migrationsExists) {
|
|
2275
|
+
throw new Error(`File '${opts.runMigrations}' doesn't exist, can't run migrations. Use flag --if-exists to run migrations only if the file exists`);
|
|
2276
|
+
}
|
|
2277
|
+
const migrations = (0, fileutils_1.readJsonFile)((0, path_1.join)(root, opts.runMigrations)).migrations;
|
|
2278
|
+
(0, migrate_analytics_1.reportMigrateRunStart)({
|
|
2279
|
+
createCommits: shouldCreateCommits ?? false,
|
|
2280
|
+
migrationCount: migrations.length,
|
|
2281
|
+
});
|
|
2282
|
+
const { resolveAgentic } = require('./agentic/select');
|
|
2283
|
+
let agentic;
|
|
2284
|
+
try {
|
|
2285
|
+
agentic = await resolveAgentic({
|
|
2286
|
+
agentic: opts.agentic,
|
|
2287
|
+
migrations,
|
|
2288
|
+
interactive: opts.interactive,
|
|
2289
|
+
});
|
|
2290
|
+
}
|
|
2291
|
+
catch (e) {
|
|
2292
|
+
(0, migrate_analytics_1.reportMigrateRunError)({ code: 'agentic', error: e });
|
|
2293
|
+
throw e;
|
|
2294
|
+
}
|
|
2295
|
+
const { effective: effectiveCreateCommits, agenticHasDiffContext, warning: createCommitsWarning, error: createCommitsError, } = resolveCreateCommits({
|
|
2296
|
+
createCommits: shouldCreateCommits,
|
|
2297
|
+
agenticKind: agentic.kind,
|
|
2298
|
+
isGitRepo: (0, git_utils_1.isGitRepository)(root),
|
|
2299
|
+
commitPrefixIsCustom: commitPrefix !== command_object_1.DEFAULT_MIGRATION_COMMIT_PREFIX,
|
|
2300
|
+
});
|
|
2301
|
+
if (createCommitsError) {
|
|
2302
|
+
throw new Error(createCommitsError);
|
|
2303
|
+
}
|
|
2304
|
+
if (createCommitsWarning) {
|
|
2305
|
+
output_1.output.warn({ title: createCommitsWarning });
|
|
2306
|
+
}
|
|
2307
|
+
const shouldRunValidation = resolveShouldRunValidation({
|
|
2308
|
+
validate: opts.validate,
|
|
2309
|
+
agenticKind: agentic.kind,
|
|
2310
|
+
});
|
|
2311
|
+
output_1.output.log({
|
|
2312
|
+
title: `Running migrations from '${opts.runMigrations}'` +
|
|
2313
|
+
(effectiveCreateCommits
|
|
2314
|
+
? ', with each applied in a dedicated commit'
|
|
2315
|
+
: ''),
|
|
2316
|
+
});
|
|
2317
|
+
if (effectiveCreateCommits) {
|
|
2318
|
+
(0, migrate_commits_1.commitCheckpointBeforeMigrations)(root, commitPrefix);
|
|
2319
|
+
}
|
|
2320
|
+
if (agentic.kind === 'enabled') {
|
|
2321
|
+
const { packageJson: nxPackageJson } = (0, package_json_1.readModulePackageJson)('nx', (0, installation_directory_1.getNxRequirePaths)(root));
|
|
2322
|
+
await (0, handoff_gitignore_1.applyAgenticHandoffGitignoreFallback)({
|
|
2323
|
+
migrations,
|
|
2324
|
+
installedNxVersion: nxPackageJson.version,
|
|
2325
|
+
effectiveCreateCommits,
|
|
2326
|
+
commitPrefix,
|
|
2327
|
+
root,
|
|
2328
|
+
});
|
|
2329
|
+
}
|
|
2330
|
+
const { migrationsWithNoChanges, skippedPromptsCount, notRunMigrationsCount, skippedPrompts, migrationEmittedNextSteps, committedShasCount, retainedAtSuccess, } = await executeMigrations(root, migrations, isVerbose, effectiveCreateCommits, commitPrefix, shouldSkipInstall, agentic, agenticHasDiffContext, shouldRunValidation);
|
|
2331
|
+
const ranWithChangesCount = migrations.length - notRunMigrationsCount - migrationsWithNoChanges.length;
|
|
2332
|
+
// The "applied" tally counts fully-completed migrations — those that
|
|
2333
|
+
// left no deferred work behind. Hybrid migrations whose prompt half was
|
|
2334
|
+
// deferred count as "deferred", not "applied".
|
|
2335
|
+
const appliedCount = migrations.length - skippedPrompts.length;
|
|
2336
|
+
const insideAgent = agentic.kind === 'inside-agent';
|
|
2337
|
+
const tallyLine = (0, migrate_output_1.buildTallyBodyLine)({
|
|
2338
|
+
appliedCount,
|
|
2339
|
+
committedShasCount,
|
|
2340
|
+
skippedPromptsCount,
|
|
2341
|
+
insideAgent,
|
|
2342
|
+
});
|
|
2343
|
+
const tallyBody = tallyLine ? [tallyLine] : undefined;
|
|
2344
|
+
// Only claim "up to date" when there's nothing pending: no deferred
|
|
2345
|
+
// prompts AND no migrations whose commits failed without being absorbed.
|
|
2346
|
+
const upToDateSuffix = skippedPromptsCount > 0 || retainedAtSuccess.length > 0
|
|
2347
|
+
? ''
|
|
2348
|
+
: ' This workspace is up to date!';
|
|
2349
|
+
// Demote `output.success` to `output.warn` when there's uncommitted state
|
|
2350
|
+
// retained from failed commits — the run did its work, but it would be
|
|
2351
|
+
// misleading to lead with a green "Successfully finished" before the
|
|
2352
|
+
// retained-state block. `.bind(output)` is required: assigning the method
|
|
2353
|
+
// reference to a local would otherwise call it with `this === undefined`.
|
|
2354
|
+
const completionLog = (retainedAtSuccess.length > 0 ? output_1.output.warn : output_1.output.success).bind(output_1.output);
|
|
2355
|
+
const completionTitlePrefix = retainedAtSuccess.length > 0
|
|
2356
|
+
? 'Finished running migrations with uncommitted state retained'
|
|
2357
|
+
: 'Successfully finished running migrations';
|
|
2358
|
+
if (notRunMigrationsCount === migrations.length && migrations.length > 0) {
|
|
2359
|
+
const remediation = insideAgent
|
|
2360
|
+
? 'The AI agent driving this run should apply each prompt — see next steps below.'
|
|
2361
|
+
: 'Re-run with --agentic to apply them. See next steps below.';
|
|
2362
|
+
output_1.output.warn({
|
|
2363
|
+
title: `No migrations from '${opts.runMigrations}' were applied — every entry is a prompt-only migration. ${remediation}`,
|
|
2364
|
+
bodyLines: tallyBody,
|
|
2365
|
+
});
|
|
2366
|
+
}
|
|
2367
|
+
else if (ranWithChangesCount > 0) {
|
|
2368
|
+
completionLog({
|
|
2369
|
+
title: `${completionTitlePrefix} from '${opts.runMigrations}'.${upToDateSuffix}`,
|
|
2370
|
+
bodyLines: tallyBody,
|
|
2371
|
+
});
|
|
2372
|
+
}
|
|
2373
|
+
else {
|
|
2374
|
+
// Pathological-but-possible: a no-op run that still has retained state
|
|
2375
|
+
// (e.g. pre-existing pending diffs that no commit absorbed). Demote
|
|
2376
|
+
// explicitly rather than rely on the implicit invariant.
|
|
2377
|
+
completionLog({
|
|
2378
|
+
title: `No changes were made from running '${opts.runMigrations}'.${upToDateSuffix}`,
|
|
2379
|
+
bodyLines: tallyBody,
|
|
2380
|
+
});
|
|
2381
|
+
}
|
|
2382
|
+
if (retainedAtSuccess.length > 0) {
|
|
2383
|
+
output_1.output.warn({
|
|
2384
|
+
title: `Working-tree state retained from ${retainedAtSuccess.length} migration${retainedAtSuccess.length === 1 ? '' : 's'} whose commits could not be created`,
|
|
2385
|
+
bodyLines: (0, migrate_output_1.buildRetainedAtSuccessBody)(retainedAtSuccess),
|
|
2386
|
+
});
|
|
2387
|
+
}
|
|
2388
|
+
if (insideAgent) {
|
|
2389
|
+
// Under inside-agent, emit a directive block so the outer agent has
|
|
2390
|
+
// explicit instructions to act on, not just relay.
|
|
2391
|
+
const directiveLines = (0, migrate_output_1.buildDirectiveBlockBodyLines)({
|
|
2392
|
+
skippedPrompts,
|
|
2393
|
+
migrationEmittedNextSteps,
|
|
2394
|
+
});
|
|
2395
|
+
if (directiveLines.length > 0) {
|
|
2396
|
+
output_1.output.log({
|
|
2397
|
+
title: 'Next steps for the AI agent driving this run',
|
|
2398
|
+
bodyLines: directiveLines,
|
|
2399
|
+
});
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2402
|
+
else if (skippedPromptsCount > 0 || migrationEmittedNextSteps.length > 0) {
|
|
2403
|
+
// Non-inside-agent path keeps the legacy "additional information" shape —
|
|
2404
|
+
// the consumer is the human user.
|
|
2405
|
+
const bodyLines = [];
|
|
2406
|
+
if (skippedPromptsCount > 0) {
|
|
2407
|
+
bodyLines.push(formatSkippedPromptsNextStep(skippedPrompts));
|
|
2408
|
+
}
|
|
2409
|
+
bodyLines.push(...migrationEmittedNextSteps);
|
|
2410
|
+
output_1.output.log({
|
|
2411
|
+
title: `Some migrations have additional information, see below.`,
|
|
2412
|
+
bodyLines: bodyLines.map((line) => `- ${line}`),
|
|
2413
|
+
});
|
|
2414
|
+
}
|
|
2415
|
+
(0, migrate_analytics_1.reportMigrateRunComplete)({
|
|
2416
|
+
agenticOutcome: agentic.kind,
|
|
2417
|
+
agentUsed: agentic.kind === 'enabled' ? agentic.selectedAgent.id : undefined,
|
|
2418
|
+
migrationCount: migrations.length,
|
|
2419
|
+
appliedCount,
|
|
2420
|
+
});
|
|
2421
|
+
}
|
|
2422
|
+
function getStringifiedPackageJsonDeps(root) {
|
|
2423
|
+
try {
|
|
2424
|
+
const { dependencies, devDependencies } = (0, fileutils_1.readJsonFile)((0, path_1.join)(root, 'package.json'));
|
|
2425
|
+
return JSON.stringify([dependencies, devDependencies]);
|
|
2426
|
+
}
|
|
2427
|
+
catch {
|
|
2428
|
+
// We don't really care if the .nx/installation property changes,
|
|
2429
|
+
// whenever nxw is invoked it will handle the dep updates.
|
|
2430
|
+
return '';
|
|
2431
|
+
}
|
|
2432
|
+
}
|
|
2433
|
+
async function runNxMigration(root, collectionPath, collection, name, migrationVersion, captureGeneratorOutput) {
|
|
2434
|
+
const { path: implPath, fnSymbol } = getImplementationPath(collection, collectionPath, name, migrationVersion);
|
|
2435
|
+
const fn = require(implPath)[fnSymbol];
|
|
2436
|
+
const host = new tree_1.FsTree(root, process.env.NX_VERBOSE_LOGGING === 'true', `migration ${collection.name}:${name}`);
|
|
2437
|
+
let result;
|
|
2438
|
+
let logs = '';
|
|
2439
|
+
if (captureGeneratorOutput) {
|
|
2440
|
+
const { withGeneratorOutputCapture } = require('./agentic/capture-generator-output');
|
|
2441
|
+
({ result, logs } = await withGeneratorOutputCapture(() => fn(host, {})));
|
|
2442
|
+
}
|
|
2443
|
+
else {
|
|
2444
|
+
result = await fn(host, {});
|
|
2445
|
+
}
|
|
2446
|
+
const { nextSteps, agentContext } = parseMigrationReturn(result);
|
|
2447
|
+
host.lock();
|
|
2448
|
+
const changes = host.listChanges();
|
|
2449
|
+
(0, tree_1.flushChanges)(root, changes);
|
|
2450
|
+
return { changes, nextSteps, agentContext, logs };
|
|
2451
|
+
}
|
|
2452
|
+
function parseMigrationReturn(value) {
|
|
2453
|
+
if (Array.isArray(value)) {
|
|
2454
|
+
return { nextSteps: filterStrings(value), agentContext: [] };
|
|
2455
|
+
}
|
|
2456
|
+
if (value && typeof value === 'object') {
|
|
2457
|
+
const obj = value;
|
|
2458
|
+
return {
|
|
2459
|
+
nextSteps: filterStrings(obj.nextSteps),
|
|
2460
|
+
agentContext: filterStrings(obj.agentContext),
|
|
2461
|
+
};
|
|
2462
|
+
}
|
|
2463
|
+
// Catches `void`, mistakenly-returned generator callbacks, malformed values.
|
|
2464
|
+
return { nextSteps: [], agentContext: [] };
|
|
2465
|
+
}
|
|
2466
|
+
// Bucket-level tolerance: a single non-string entry shouldn't discard the
|
|
2467
|
+
// whole `nextSteps` / `agentContext` array. Migration authors occasionally
|
|
2468
|
+
// push `null` / `undefined` / a number into the array; we drop the bad entries
|
|
2469
|
+
// and keep the rest so end-of-run guidance isn't silently lost.
|
|
2470
|
+
function filterStrings(value) {
|
|
2471
|
+
if (!Array.isArray(value))
|
|
2472
|
+
return [];
|
|
2473
|
+
return value.filter((v) => typeof v === 'string');
|
|
2474
|
+
}
|
|
2475
|
+
async function migrate(root, args, rawArgs) {
|
|
2476
|
+
await client_1.daemonClient.stop();
|
|
2477
|
+
return (0, handle_errors_1.handleErrors)(process.env.NX_VERBOSE_LOGGING === 'true', async () => {
|
|
2478
|
+
const mergedArgs = (0, migrate_config_1.applyNxJsonMigrateDefaults)(args, (0, configuration_1.readNxJson)().migrate);
|
|
2479
|
+
(0, migrate_config_1.assertCommitPrefixHasCommits)(mergedArgs);
|
|
2480
|
+
// One fetcher (registry-first, install fallback) shared by the `--include`
|
|
2481
|
+
// eligibility gate and the migration cascade so package metadata is fetched
|
|
2482
|
+
// at most once per package/version.
|
|
2483
|
+
const fetch = createFetcher((0, package_manager_1.getPackageManagerCommand)());
|
|
2484
|
+
// `--run-migrations` without a value parses as '' - undefined means the
|
|
2485
|
+
// generate phase.
|
|
2486
|
+
const isGenerateInvocation = mergedArgs['runMigrations'] === undefined;
|
|
2487
|
+
let opts;
|
|
2488
|
+
try {
|
|
2489
|
+
opts = await parseMigrationsOptions(mergedArgs, fetch);
|
|
2490
|
+
}
|
|
2491
|
+
catch (e) {
|
|
2492
|
+
if (isGenerateInvocation) {
|
|
2493
|
+
(0, migrate_analytics_1.reportMigrateGenerateError)('resolve_version', e);
|
|
2494
|
+
}
|
|
2495
|
+
throw e;
|
|
2496
|
+
}
|
|
2497
|
+
if (opts.type === 'generateMigrations') {
|
|
2498
|
+
await generateMigrationsJsonAndUpdatePackageJson(root, opts, fetch);
|
|
2499
|
+
}
|
|
2500
|
+
else {
|
|
2501
|
+
try {
|
|
2502
|
+
return await runMigrations(root, opts, rawArgs, mergedArgs['verbose'], mergedArgs['createCommits'], mergedArgs['commitPrefix'] ?? command_object_1.DEFAULT_MIGRATION_COMMIT_PREFIX, mergedArgs['skipInstall']);
|
|
2503
|
+
}
|
|
2504
|
+
catch (e) {
|
|
2505
|
+
// The remediation guidance is already logged by `runInstall`; swallow
|
|
2506
|
+
// the error here so `handleErrors` doesn't print a noisy stack after
|
|
2507
|
+
// the friendly output.
|
|
2508
|
+
if (e instanceof NpmPeerDepsInstallError) {
|
|
2509
|
+
(0, migrate_analytics_1.reportMigrateRunError)({ code: 'npm_install', error: e });
|
|
2510
|
+
return 1;
|
|
2511
|
+
}
|
|
2512
|
+
(0, migrate_analytics_1.reportMigrateRunError)({ code: 'other', error: e });
|
|
2513
|
+
throw e;
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
});
|
|
2517
|
+
}
|
|
2518
|
+
async function runMigration() {
|
|
2519
|
+
return (0, handle_errors_1.handleErrors)(process.env.NX_VERBOSE_LOGGING === 'true', async () => {
|
|
2520
|
+
const runLocalMigrate = () => runOrReturnExitCode(() => (0, child_process_2.runNxSync)(`_migrate ${process.argv.slice(3).join(' ')}`, {
|
|
2521
|
+
stdio: ['inherit', 'inherit', 'inherit'],
|
|
2522
|
+
}));
|
|
2523
|
+
if (process.env.NX_USE_LOCAL !== 'true' &&
|
|
2524
|
+
process.env.NX_MIGRATE_USE_LOCAL === undefined) {
|
|
2525
|
+
const p = await nxCliPath();
|
|
2526
|
+
if (p === null) {
|
|
2527
|
+
return runLocalMigrate();
|
|
2528
|
+
}
|
|
2529
|
+
// ensure local registry from process is not interfering with the install
|
|
2530
|
+
// when we start the process from temp folder the local registry would override the custom registry
|
|
2531
|
+
if (process.env.npm_config_registry &&
|
|
2532
|
+
process.env.npm_config_registry.match(/^https:\/\/registry\.(npmjs\.org|yarnpkg\.com)/)) {
|
|
2533
|
+
delete process.env.npm_config_registry;
|
|
2534
|
+
}
|
|
2535
|
+
return runOrReturnExitCode(() => (0, child_process_1.execSync)(`${p} _migrate ${process.argv.slice(3).join(' ')}`, {
|
|
2536
|
+
stdio: ['inherit', 'inherit', 'inherit'],
|
|
2537
|
+
windowsHide: true,
|
|
2538
|
+
}));
|
|
2539
|
+
}
|
|
2540
|
+
return runLocalMigrate();
|
|
2541
|
+
});
|
|
2542
|
+
}
|
|
2543
|
+
function readMigrationCollection(packageName, root) {
|
|
2544
|
+
const collectionPath = readPackageMigrationConfig(packageName, root).migrations;
|
|
2545
|
+
const collection = (0, fileutils_1.readJsonFile)(collectionPath);
|
|
2546
|
+
collection.name ??= packageName;
|
|
2547
|
+
return {
|
|
2548
|
+
collection,
|
|
2549
|
+
collectionPath,
|
|
2550
|
+
};
|
|
2551
|
+
}
|
|
2552
|
+
function getImplementationPath(collection, collectionPath, name, migrationVersion) {
|
|
2553
|
+
const g = collection.generators?.[name] || collection.schematics?.[name];
|
|
2554
|
+
if (!g) {
|
|
2555
|
+
throw new MigrationImplementationMissingError(`Unable to determine implementation path for "${collectionPath}:${name}"`, collectionPath, migrationVersion);
|
|
2556
|
+
}
|
|
2557
|
+
const implRelativePathAndMaybeSymbol = g.implementation || g.factory;
|
|
2558
|
+
const [implRelativePath, fnSymbol = 'default'] = implRelativePathAndMaybeSymbol.split('#');
|
|
2559
|
+
let implPath;
|
|
2560
|
+
try {
|
|
2561
|
+
implPath = require.resolve(implRelativePath, {
|
|
2562
|
+
paths: [(0, path_1.dirname)(collectionPath)],
|
|
2563
|
+
});
|
|
2564
|
+
}
|
|
2565
|
+
catch (e) {
|
|
2566
|
+
try {
|
|
2567
|
+
// workaround for a bug in node 12
|
|
2568
|
+
implPath = require.resolve(`${(0, path_1.dirname)(collectionPath)}/${implRelativePath}`);
|
|
2569
|
+
}
|
|
2570
|
+
catch {
|
|
2571
|
+
throw new MigrationImplementationMissingError(`Could not resolve implementation for migration "${name}" from "${collectionPath}"`, collectionPath, migrationVersion ?? g.version);
|
|
2572
|
+
}
|
|
2573
|
+
}
|
|
2574
|
+
return { path: implPath, fnSymbol };
|
|
2575
|
+
}
|
|
2576
|
+
/**
|
|
2577
|
+
* Resolves a migration's collection once and derives everything the run loop
|
|
2578
|
+
* needs from that single read: the implementation context (`collection` +
|
|
2579
|
+
* `collectionPath`, handed to `runNxOrAngularMigration`) and, for agentic runs,
|
|
2580
|
+
* the workspace-relative documentation path handed to the agent.
|
|
2581
|
+
*
|
|
2582
|
+
* Read fresh per migration (not cached across the loop) so a prior migration's
|
|
2583
|
+
* reinstall is reflected, exactly as before. Error handling matches each field's
|
|
2584
|
+
* role:
|
|
2585
|
+
* - Migrations that run an implementation REQUIRE the collection; an unreadable
|
|
2586
|
+
* collection throws and aborts that migration (caught by the run loop).
|
|
2587
|
+
* - Prompt-only migrations don't run an implementation, so the collection is
|
|
2588
|
+
* read only to resolve documentation - a failure there is non-fatal: the
|
|
2589
|
+
* prompt still runs and the supplementary doc is skipped with a warning.
|
|
2590
|
+
*/
|
|
2591
|
+
function resolveMigrationForRun(root, migration, resolveDocumentation) {
|
|
2592
|
+
let resolvedCollection;
|
|
2593
|
+
if (!(0, migration_shape_1.isPromptOnlyMigration)(migration)) {
|
|
2594
|
+
resolvedCollection = readMigrationCollection(migration.package, root);
|
|
2595
|
+
}
|
|
2596
|
+
else if (resolveDocumentation && migration.documentation) {
|
|
2597
|
+
try {
|
|
2598
|
+
resolvedCollection = readMigrationCollection(migration.package, root);
|
|
2599
|
+
}
|
|
2600
|
+
catch {
|
|
2601
|
+
// Non-fatal: documentation is supplementary; the warning below fires.
|
|
2602
|
+
}
|
|
2603
|
+
}
|
|
2604
|
+
let documentationPath;
|
|
2605
|
+
if (resolveDocumentation && migration.documentation) {
|
|
2606
|
+
documentationPath = resolvedCollection
|
|
2607
|
+
? resolveDocumentationFileToWorkspacePath(root, (0, path_1.dirname)(resolvedCollection.collectionPath), migration.documentation)
|
|
2608
|
+
: undefined;
|
|
2609
|
+
if (!documentationPath) {
|
|
2610
|
+
logger_1.logger.warn(`Could not resolve the "documentation" file "${migration.documentation}" declared for migration "${migration.package}: ${migration.name}". It will be skipped as additional context for the AI agent.`);
|
|
2611
|
+
}
|
|
2612
|
+
}
|
|
2613
|
+
return { resolvedCollection, documentationPath };
|
|
2614
|
+
}
|
|
2615
|
+
// Resolves a `documentation` path (relative to the package's migrations dir) to
|
|
2616
|
+
// a workspace-relative path - or the absolute path when it resolves outside the
|
|
2617
|
+
// workspace (unusual hoisted/symlinked layouts). The agent runs with cwd =
|
|
2618
|
+
// workspace root, so the workspace-relative form is preferred. Returns
|
|
2619
|
+
// undefined when the file can't be resolved.
|
|
2620
|
+
function resolveDocumentationFileToWorkspacePath(root, migrationsDir, documentation) {
|
|
2621
|
+
let documentationFile;
|
|
2622
|
+
try {
|
|
2623
|
+
documentationFile = require.resolve(documentation, {
|
|
2624
|
+
paths: [migrationsDir],
|
|
2625
|
+
});
|
|
2626
|
+
}
|
|
2627
|
+
catch {
|
|
2628
|
+
return undefined;
|
|
2629
|
+
}
|
|
2630
|
+
const relativePath = (0, path_1.relative)(root, documentationFile);
|
|
2631
|
+
return relativePath.startsWith('..') ? documentationFile : relativePath;
|
|
2632
|
+
}
|
|
2633
|
+
class MigrationImplementationMissingError extends Error {
|
|
2634
|
+
constructor(baseMessage, collectionPath, migrationVersion) {
|
|
2635
|
+
super(buildMigrationMissingMessage(baseMessage, collectionPath, migrationVersion));
|
|
2636
|
+
this.name = 'MigrationImplementationMissingError';
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
function buildMigrationMissingMessage(baseMessage, collectionPath, migrationVersion) {
|
|
2640
|
+
if (!migrationVersion) {
|
|
2641
|
+
return baseMessage;
|
|
2642
|
+
}
|
|
2643
|
+
try {
|
|
2644
|
+
const packageJsonPath = (0, path_1.join)((0, path_1.dirname)(collectionPath), 'package.json');
|
|
2645
|
+
if (!(0, fs_1.existsSync)(packageJsonPath)) {
|
|
2646
|
+
return baseMessage;
|
|
2647
|
+
}
|
|
2648
|
+
const packageJson = (0, fileutils_1.readJsonFile)(packageJsonPath);
|
|
2649
|
+
const installedVersion = packageJson.version;
|
|
2650
|
+
if (installedVersion &&
|
|
2651
|
+
(0, semver_1.lt)((0, version_utils_1.normalizeVersion)(installedVersion), (0, version_utils_1.normalizeVersion)(migrationVersion))) {
|
|
2652
|
+
const packageManager = (0, package_manager_1.detectPackageManager)();
|
|
2653
|
+
const pmc = (0, package_manager_1.getPackageManagerCommand)(packageManager);
|
|
2654
|
+
const overrideFieldName = getOverrideFieldName(packageManager);
|
|
2655
|
+
return (`${baseMessage}\n\n` +
|
|
2656
|
+
`The installed version of "${packageJson.name}" is ${installedVersion}, ` +
|
|
2657
|
+
`but this migration requires version ${migrationVersion}. ` +
|
|
2658
|
+
`This likely means the package version is being held back by an ${overrideFieldName} ` +
|
|
2659
|
+
`in your package.json. ` +
|
|
2660
|
+
`Remove the ${overrideFieldName} and run "${pmc.install}" to install the correct version.`);
|
|
2661
|
+
}
|
|
2662
|
+
}
|
|
2663
|
+
catch {
|
|
2664
|
+
// Fall through to return the base message if we can't read package info
|
|
2665
|
+
}
|
|
2666
|
+
return baseMessage;
|
|
2667
|
+
}
|
|
2668
|
+
function getOverrideFieldName(packageManager) {
|
|
2669
|
+
switch (packageManager) {
|
|
2670
|
+
case 'pnpm':
|
|
2671
|
+
return '"pnpm.overrides"';
|
|
2672
|
+
case 'yarn':
|
|
2673
|
+
return '"resolutions"';
|
|
2674
|
+
case 'npm':
|
|
2675
|
+
case 'bun':
|
|
2676
|
+
return '"overrides"';
|
|
2677
|
+
}
|
|
2678
|
+
}
|
|
2679
|
+
async function nxCliPath(nxWorkspaceRoot) {
|
|
2680
|
+
const version = process.env.NX_MIGRATE_CLI_VERSION || 'latest';
|
|
2681
|
+
const isVerbose = process.env.NX_VERBOSE_LOGGING === 'true';
|
|
2682
|
+
await (0, provenance_1.ensurePackageHasProvenance)('nx', version);
|
|
2683
|
+
try {
|
|
2684
|
+
const packageManager = (0, package_manager_1.detectPackageManager)();
|
|
2685
|
+
const pmc = (0, package_manager_1.getPackageManagerCommand)(packageManager);
|
|
2686
|
+
const { dirSync } = require('tmp');
|
|
2687
|
+
const tmpDir = dirSync().name;
|
|
2688
|
+
(0, fileutils_1.writeJsonFile)((0, path_1.join)(tmpDir, 'package.json'), {
|
|
2689
|
+
dependencies: {
|
|
2690
|
+
nx: version,
|
|
2691
|
+
},
|
|
2692
|
+
license: 'MIT',
|
|
2693
|
+
});
|
|
2694
|
+
const root = nxWorkspaceRoot ?? workspace_root_1.workspaceRoot;
|
|
2695
|
+
const isNonJs = !(0, fs_1.existsSync)((0, path_1.join)(root, 'package.json'));
|
|
2696
|
+
(0, package_manager_1.copyPackageManagerConfigurationFiles)(isNonJs ? (0, installation_directory_1.getNxInstallationPath)(root) : root, tmpDir);
|
|
2697
|
+
// Let's print the output of the install process to the console when verbose
|
|
2698
|
+
// is enabled, so it's easier to debug issues with the installation process
|
|
2699
|
+
const stdio = isVerbose
|
|
2700
|
+
? ['ignore', 'inherit', 'inherit']
|
|
2701
|
+
: 'ignore';
|
|
2702
|
+
if (pmc.preInstall) {
|
|
2703
|
+
// ensure package.json and repo in tmp folder is set to a proper package manager state
|
|
2704
|
+
(0, child_process_1.execSync)(pmc.preInstall, {
|
|
2705
|
+
cwd: tmpDir,
|
|
2706
|
+
stdio,
|
|
2707
|
+
windowsHide: true,
|
|
2708
|
+
});
|
|
2709
|
+
// if it's berry ensure we set the node_linker to node-modules
|
|
2710
|
+
if (packageManager === 'yarn' && pmc.ciInstall.includes('immutable')) {
|
|
2711
|
+
(0, child_process_1.execSync)('yarn config set nodeLinker node-modules', {
|
|
2712
|
+
cwd: tmpDir,
|
|
2713
|
+
stdio,
|
|
2714
|
+
windowsHide: true,
|
|
2715
|
+
});
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
(0, child_process_1.execSync)(`${pmc.install} ${pmc.ignoreScriptsFlag ?? ''}`, {
|
|
2719
|
+
cwd: tmpDir,
|
|
2720
|
+
stdio,
|
|
2721
|
+
windowsHide: true,
|
|
2722
|
+
});
|
|
2723
|
+
// Set NODE_PATH so that these modules can be used for module resolution
|
|
2724
|
+
addToNodePath((0, path_1.join)(tmpDir, 'node_modules'));
|
|
2725
|
+
addToNodePath((0, path_1.join)(nxWorkspaceRoot ?? workspace_root_1.workspaceRoot, 'node_modules'));
|
|
2726
|
+
return (0, path_1.join)(tmpDir, `node_modules`, '.bin', 'nx');
|
|
2727
|
+
}
|
|
2728
|
+
catch (e) {
|
|
2729
|
+
console.error(`Failed to install the ${version} version of the migration script. Using the current version.`);
|
|
2730
|
+
if (isVerbose) {
|
|
2731
|
+
console.error(e);
|
|
2732
|
+
}
|
|
2733
|
+
return null;
|
|
2734
|
+
}
|
|
2735
|
+
}
|
|
2736
|
+
function addToNodePath(dir) {
|
|
2737
|
+
// NODE_PATH is a delimited list of paths.
|
|
2738
|
+
// The delimiter is different for windows.
|
|
2739
|
+
const delimiter = require('os').platform() === 'win32' ? ';' : ':';
|
|
2740
|
+
const paths = process.env.NODE_PATH
|
|
2741
|
+
? process.env.NODE_PATH.split(delimiter)
|
|
2742
|
+
: [];
|
|
2743
|
+
// Add the tmp path
|
|
2744
|
+
paths.push(dir);
|
|
2745
|
+
// Update the env variable.
|
|
2746
|
+
process.env.NODE_PATH = paths.join(delimiter);
|
|
2747
|
+
}
|
|
2748
|
+
function isAngularMigration(collection, name) {
|
|
2749
|
+
return !collection.generators?.[name] && collection.schematics?.[name];
|
|
2750
|
+
}
|
|
2751
|
+
const getNgCompatLayer = (() => {
|
|
2752
|
+
let _ngCliAdapter;
|
|
2753
|
+
return async function getNgCompatLayer() {
|
|
2754
|
+
if (!_ngCliAdapter) {
|
|
2755
|
+
_ngCliAdapter = await (0, handle_import_1.handleImport)('../../adapter/ngcli-adapter.js', __dirname);
|
|
2756
|
+
require('../../adapter/compat');
|
|
2757
|
+
}
|
|
2758
|
+
return _ngCliAdapter;
|
|
2759
|
+
};
|
|
2760
|
+
})();
|