@ohos-ports/nx 23.2.0-beta.0 → 23.2.1-beta.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 +13 -60
- package/local-natives.js +59 -0
- package/package.json +9 -534
- package/LICENSE +0 -22
- package/dist/bin/init-local.d.ts +0 -8
- package/dist/bin/init-local.js +0 -186
- package/dist/bin/nx-cloud.d.ts +0 -3
- package/dist/bin/nx-cloud.js +0 -47
- package/dist/bin/nx.d.ts +0 -3
- package/dist/bin/nx.js +0 -341
- package/dist/bin/post-install.d.ts +0 -1
- package/dist/bin/post-install.js +0 -52
- package/dist/bin/run-executor.d.ts +0 -1
- package/dist/bin/run-executor.js +0 -66
- package/dist/plugins/package-json.d.ts +0 -4
- package/dist/plugins/package-json.js +0 -40
- package/dist/presets/core.json +0 -1
- package/dist/presets/npm.json +0 -7
- package/dist/release/changelog-renderer/index.d.ts +0 -110
- package/dist/release/changelog-renderer/index.js +0 -381
- package/dist/release/index.d.ts +0 -4
- package/dist/release/index.js +0 -13
- package/dist/src/adapter/angular-json.d.ts +0 -10
- package/dist/src/adapter/angular-json.js +0 -129
- package/dist/src/adapter/compat.d.ts +0 -2
- package/dist/src/adapter/compat.js +0 -154
- package/dist/src/adapter/ngcli-adapter.d.ts +0 -105
- package/dist/src/adapter/ngcli-adapter.js +0 -1083
- package/dist/src/adapter/rxjs-for-await.d.ts +0 -109
- package/dist/src/adapter/rxjs-for-await.js +0 -362
- package/dist/src/ai/clone-ai-config-repo.d.ts +0 -11
- package/dist/src/ai/clone-ai-config-repo.js +0 -155
- package/dist/src/ai/configure-ai-agents-disclaimer.d.ts +0 -5
- package/dist/src/ai/configure-ai-agents-disclaimer.js +0 -31
- package/dist/src/ai/constants.d.ts +0 -46
- package/dist/src/ai/constants.js +0 -92
- package/dist/src/ai/detect-ai-agent.d.ts +0 -2
- package/dist/src/ai/detect-ai-agent.js +0 -12
- package/dist/src/ai/set-up-ai-agents/get-agent-rules.d.ts +0 -5
- package/dist/src/ai/set-up-ai-agents/get-agent-rules.js +0 -26
- package/dist/src/ai/set-up-ai-agents/schema.d.ts +0 -11
- package/dist/src/ai/set-up-ai-agents/schema.json +0 -34
- package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.d.ts +0 -10
- package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.js +0 -578
- package/dist/src/ai/utils.d.ts +0 -33
- package/dist/src/ai/utils.js +0 -246
- package/dist/src/analytics/analytics.d.ts +0 -16
- package/dist/src/analytics/analytics.js +0 -246
- package/dist/src/analytics/index.d.ts +0 -1
- package/dist/src/analytics/index.js +0 -12
- package/dist/src/command-line/add/add.d.ts +0 -3
- package/dist/src/command-line/add/add.js +0 -138
- package/dist/src/command-line/add/command-object.d.ts +0 -8
- package/dist/src/command-line/add/command-object.js +0 -28
- package/dist/src/command-line/add/completion.d.ts +0 -1
- package/dist/src/command-line/add/completion.js +0 -15
- package/dist/src/command-line/affected/affected.d.ts +0 -10
- package/dist/src/command-line/affected/affected.js +0 -90
- package/dist/src/command-line/affected/command-object.d.ts +0 -6
- package/dist/src/command-line/affected/command-object.js +0 -83
- package/dist/src/command-line/affected/completion.d.ts +0 -1
- package/dist/src/command-line/affected/completion.js +0 -15
- package/dist/src/command-line/ai/ai-output.d.ts +0 -46
- package/dist/src/command-line/ai/ai-output.js +0 -86
- package/dist/src/command-line/completion/argv-layout.d.ts +0 -6
- package/dist/src/command-line/completion/argv-layout.js +0 -19
- package/dist/src/command-line/completion/command-completions.d.ts +0 -19
- package/dist/src/command-line/completion/command-completions.js +0 -120
- package/dist/src/command-line/completion/command-handlers.d.ts +0 -30
- package/dist/src/command-line/completion/command-handlers.js +0 -69
- package/dist/src/command-line/completion/command-object.d.ts +0 -10
- package/dist/src/command-line/completion/command-object.js +0 -102
- package/dist/src/command-line/completion/completion-providers.d.ts +0 -21
- package/dist/src/command-line/completion/completion-providers.js +0 -194
- package/dist/src/command-line/completion/infix-targets.d.ts +0 -1
- package/dist/src/command-line/completion/infix-targets.js +0 -48
- package/dist/src/command-line/completion/metadata.d.ts +0 -22
- package/dist/src/command-line/completion/metadata.js +0 -71
- package/dist/src/command-line/completion/registrations.d.ts +0 -9
- package/dist/src/command-line/completion/registrations.js +0 -16
- package/dist/src/command-line/completion/scripts/bash.sh +0 -51
- package/dist/src/command-line/completion/scripts/fish.fish +0 -47
- package/dist/src/command-line/completion/scripts/powershell.ps1 +0 -52
- package/dist/src/command-line/completion/scripts/zsh.zsh +0 -69
- package/dist/src/command-line/completion/scripts.d.ts +0 -18
- package/dist/src/command-line/completion/scripts.js +0 -140
- package/dist/src/command-line/completion/trigger.d.ts +0 -3
- package/dist/src/command-line/completion/trigger.js +0 -21
- package/dist/src/command-line/completion/value-completions.d.ts +0 -3
- package/dist/src/command-line/completion/value-completions.js +0 -21
- package/dist/src/command-line/configure-ai-agents/command-object.d.ts +0 -8
- package/dist/src/command-line/configure-ai-agents/command-object.js +0 -59
- package/dist/src/command-line/configure-ai-agents/configure-ai-agents.d.ts +0 -3
- package/dist/src/command-line/configure-ai-agents/configure-ai-agents.js +0 -436
- package/dist/src/command-line/daemon/command-object.d.ts +0 -3
- package/dist/src/command-line/daemon/command-object.js +0 -29
- package/dist/src/command-line/daemon/daemon.d.ts +0 -2
- package/dist/src/command-line/daemon/daemon.js +0 -31
- package/dist/src/command-line/deprecated/command-objects.d.ts +0 -9
- package/dist/src/command-line/deprecated/command-objects.js +0 -48
- package/dist/src/command-line/examples.d.ts +0 -12
- package/dist/src/command-line/examples.js +0 -403
- package/dist/src/command-line/exec/command-object.d.ts +0 -2
- package/dist/src/command-line/exec/command-object.js +0 -20
- package/dist/src/command-line/exec/exec.d.ts +0 -1
- package/dist/src/command-line/exec/exec.js +0 -143
- package/dist/src/command-line/format/command-object.d.ts +0 -3
- package/dist/src/command-line/format/command-object.js +0 -58
- package/dist/src/command-line/format/format.d.ts +0 -2
- package/dist/src/command-line/format/format.js +0 -216
- package/dist/src/command-line/generate/command-object.d.ts +0 -2
- package/dist/src/command-line/generate/command-object.js +0 -67
- package/dist/src/command-line/generate/completion.d.ts +0 -1
- package/dist/src/command-line/generate/completion.js +0 -9
- package/dist/src/command-line/generate/generate.d.ts +0 -21
- package/dist/src/command-line/generate/generate.js +0 -281
- package/dist/src/command-line/generate/generator-utils.d.ts +0 -18
- package/dist/src/command-line/generate/generator-utils.js +0 -91
- package/dist/src/command-line/graph/command-object.d.ts +0 -25
- package/dist/src/command-line/graph/command-object.js +0 -76
- package/dist/src/command-line/graph/completion.d.ts +0 -1
- package/dist/src/command-line/graph/completion.js +0 -13
- package/dist/src/command-line/graph/graph.d.ts +0 -70
- package/dist/src/command-line/graph/graph.js +0 -987
- package/dist/src/command-line/import/command-object.d.ts +0 -2
- package/dist/src/command-line/import/command-object.js +0 -63
- package/dist/src/command-line/import/import.d.ts +0 -26
- package/dist/src/command-line/import/import.js +0 -590
- package/dist/src/command-line/import/utils/ai-output.d.ts +0 -93
- package/dist/src/command-line/import/utils/ai-output.js +0 -209
- package/dist/src/command-line/import/utils/merge-remote-source.d.ts +0 -2
- package/dist/src/command-line/import/utils/merge-remote-source.js +0 -14
- package/dist/src/command-line/import/utils/prepare-source-repo.d.ts +0 -2
- package/dist/src/command-line/import/utils/prepare-source-repo.js +0 -27
- package/dist/src/command-line/index.d.ts +0 -22
- package/dist/src/command-line/index.js +0 -26
- package/dist/src/command-line/init/ai-agent-prompts.d.ts +0 -2
- package/dist/src/command-line/init/ai-agent-prompts.js +0 -30
- package/dist/src/command-line/init/command-object.d.ts +0 -2
- package/dist/src/command-line/init/command-object.js +0 -118
- package/dist/src/command-line/init/configure-plugins.d.ts +0 -34
- package/dist/src/command-line/init/configure-plugins.js +0 -214
- package/dist/src/command-line/init/implementation/add-nx-to-monorepo.d.ts +0 -6
- package/dist/src/command-line/init/implementation/add-nx-to-monorepo.js +0 -122
- package/dist/src/command-line/init/implementation/add-nx-to-nest.d.ts +0 -5
- package/dist/src/command-line/init/implementation/add-nx-to-nest.js +0 -353
- package/dist/src/command-line/init/implementation/add-nx-to-npm-repo.d.ts +0 -6
- package/dist/src/command-line/init/implementation/add-nx-to-npm-repo.js +0 -70
- package/dist/src/command-line/init/implementation/add-nx-to-turborepo.d.ts +0 -4
- package/dist/src/command-line/init/implementation/add-nx-to-turborepo.js +0 -37
- package/dist/src/command-line/init/implementation/angular/index.d.ts +0 -2
- package/dist/src/command-line/init/implementation/angular/index.js +0 -130
- package/dist/src/command-line/init/implementation/angular/integrated-workspace.d.ts +0 -1
- package/dist/src/command-line/init/implementation/angular/integrated-workspace.js +0 -9
- package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.d.ts +0 -2
- package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.js +0 -155
- package/dist/src/command-line/init/implementation/angular/standalone-workspace.d.ts +0 -1
- package/dist/src/command-line/init/implementation/angular/standalone-workspace.js +0 -204
- package/dist/src/command-line/init/implementation/angular/types.d.ts +0 -20
- package/dist/src/command-line/init/implementation/angular/types.js +0 -2
- package/dist/src/command-line/init/implementation/check-compatible-with-plugins.d.ts +0 -15
- package/dist/src/command-line/init/implementation/check-compatible-with-plugins.js +0 -136
- package/dist/src/command-line/init/implementation/deduce-default-base.d.ts +0 -1
- package/dist/src/command-line/init/implementation/deduce-default-base.js +0 -53
- package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +0 -11
- package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +0 -151
- package/dist/src/command-line/init/implementation/dot-nx/nxw.d.ts +0 -1
- package/dist/src/command-line/init/implementation/dot-nx/nxw.js +0 -123
- package/dist/src/command-line/init/implementation/format.d.ts +0 -18
- package/dist/src/command-line/init/implementation/format.js +0 -114
- package/dist/src/command-line/init/implementation/utils.d.ts +0 -35
- package/dist/src/command-line/init/implementation/utils.js +0 -422
- package/dist/src/command-line/init/init-v1.d.ts +0 -8
- package/dist/src/command-line/init/init-v1.js +0 -101
- package/dist/src/command-line/init/init-v2.d.ts +0 -23
- package/dist/src/command-line/init/init-v2.js +0 -622
- package/dist/src/command-line/init/utils/ai-output.d.ts +0 -72
- package/dist/src/command-line/init/utils/ai-output.js +0 -180
- package/dist/src/command-line/list/command-object.d.ts +0 -2
- package/dist/src/command-line/list/command-object.js +0 -21
- package/dist/src/command-line/list/list.d.ts +0 -15
- package/dist/src/command-line/list/list.js +0 -48
- package/dist/src/command-line/mcp/command-object.d.ts +0 -2
- package/dist/src/command-line/mcp/command-object.js +0 -29
- package/dist/src/command-line/mcp/mcp.d.ts +0 -2
- package/dist/src/command-line/mcp/mcp.js +0 -60
- package/dist/src/command-line/migrate/agentic/capture-generator-output.d.ts +0 -22
- package/dist/src/command-line/migrate/agentic/capture-generator-output.js +0 -100
- package/dist/src/command-line/migrate/agentic/cli-args.d.ts +0 -12
- package/dist/src/command-line/migrate/agentic/cli-args.js +0 -38
- package/dist/src/command-line/migrate/agentic/definitions.d.ts +0 -6
- package/dist/src/command-line/migrate/agentic/definitions.js +0 -148
- package/dist/src/command-line/migrate/agentic/detect-installed.d.ts +0 -10
- package/dist/src/command-line/migrate/agentic/detect-installed.js +0 -68
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.d.ts +0 -61
- package/dist/src/command-line/migrate/agentic/handoff-gitignore.js +0 -78
- package/dist/src/command-line/migrate/agentic/handoff.d.ts +0 -69
- package/dist/src/command-line/migrate/agentic/handoff.js +0 -193
- package/dist/src/command-line/migrate/agentic/inception.d.ts +0 -9
- package/dist/src/command-line/migrate/agentic/inception.js +0 -15
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.d.ts +0 -17
- package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.js +0 -57
- package/dist/src/command-line/migrate/agentic/prompts/generic-validation.d.ts +0 -56
- package/dist/src/command-line/migrate/agentic/prompts/generic-validation.js +0 -66
- package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.d.ts +0 -49
- package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.js +0 -53
- package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.d.ts +0 -26
- package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.js +0 -27
- package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.d.ts +0 -19
- package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.js +0 -145
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.d.ts +0 -46
- package/dist/src/command-line/migrate/agentic/prompts/system-prompt.js +0 -90
- package/dist/src/command-line/migrate/agentic/run-step.d.ts +0 -68
- package/dist/src/command-line/migrate/agentic/run-step.js +0 -124
- package/dist/src/command-line/migrate/agentic/runner.d.ts +0 -33
- package/dist/src/command-line/migrate/agentic/runner.js +0 -444
- package/dist/src/command-line/migrate/agentic/select.d.ts +0 -24
- package/dist/src/command-line/migrate/agentic/select.js +0 -251
- package/dist/src/command-line/migrate/agentic/types.d.ts +0 -132
- package/dist/src/command-line/migrate/agentic/types.js +0 -37
- package/dist/src/command-line/migrate/command-object.d.ts +0 -53
- package/dist/src/command-line/migrate/command-object.js +0 -152
- package/dist/src/command-line/migrate/execute-migration.d.ts +0 -91
- package/dist/src/command-line/migrate/execute-migration.js +0 -474
- package/dist/src/command-line/migrate/migrate-analytics.d.ts +0 -106
- package/dist/src/command-line/migrate/migrate-analytics.js +0 -317
- package/dist/src/command-line/migrate/migrate-commits.d.ts +0 -80
- package/dist/src/command-line/migrate/migrate-commits.js +0 -217
- package/dist/src/command-line/migrate/migrate-config.d.ts +0 -29
- package/dist/src/command-line/migrate/migrate-config.js +0 -112
- package/dist/src/command-line/migrate/migrate-output.d.ts +0 -218
- package/dist/src/command-line/migrate/migrate-output.js +0 -302
- package/dist/src/command-line/migrate/migrate-ui-api.d.ts +0 -89
- package/dist/src/command-line/migrate/migrate-ui-api.js +0 -437
- package/dist/src/command-line/migrate/migrate.d.ts +0 -242
- package/dist/src/command-line/migrate/migrate.js +0 -2807
- package/dist/src/command-line/migrate/migration-shape.d.ts +0 -16
- package/dist/src/command-line/migrate/migration-shape.js +0 -13
- package/dist/src/command-line/migrate/multi-major.d.ts +0 -37
- package/dist/src/command-line/migrate/multi-major.js +0 -215
- package/dist/src/command-line/migrate/prompt-files.d.ts +0 -31
- package/dist/src/command-line/migrate/prompt-files.js +0 -141
- package/dist/src/command-line/migrate/resolve-package-version.d.ts +0 -24
- package/dist/src/command-line/migrate/resolve-package-version.js +0 -245
- package/dist/src/command-line/migrate/run/agent-output.d.ts +0 -20
- package/dist/src/command-line/migrate/run/agent-output.js +0 -65
- package/dist/src/command-line/migrate/run/index.d.ts +0 -9
- package/dist/src/command-line/migrate/run/index.js +0 -23
- package/dist/src/command-line/migrate/run/orchestrator.d.ts +0 -20
- package/dist/src/command-line/migrate/run/orchestrator.js +0 -1200
- package/dist/src/command-line/migrate/run/run-id.d.ts +0 -16
- package/dist/src/command-line/migrate/run/run-id.js +0 -56
- package/dist/src/command-line/migrate/run/run-state.d.ts +0 -157
- package/dist/src/command-line/migrate/run/run-state.js +0 -438
- package/dist/src/command-line/migrate/run/state-lock.d.ts +0 -25
- package/dist/src/command-line/migrate/run/state-lock.js +0 -76
- package/dist/src/command-line/migrate/run/state-machine.d.ts +0 -84
- package/dist/src/command-line/migrate/run/state-machine.js +0 -315
- package/dist/src/command-line/migrate/run/util.d.ts +0 -59
- package/dist/src/command-line/migrate/run/util.js +0 -148
- package/dist/src/command-line/migrate/run/worker.d.ts +0 -16
- package/dist/src/command-line/migrate/run/worker.js +0 -682
- package/dist/src/command-line/migrate/run-migration-process.js +0 -110
- package/dist/src/command-line/migrate/safe-prompt.d.ts +0 -21
- package/dist/src/command-line/migrate/safe-prompt.js +0 -47
- package/dist/src/command-line/migrate/sort-migrations.d.ts +0 -16
- package/dist/src/command-line/migrate/sort-migrations.js +0 -32
- package/dist/src/command-line/migrate/step-actions.d.ts +0 -5
- package/dist/src/command-line/migrate/step-actions.js +0 -12
- package/dist/src/command-line/migrate/text.d.ts +0 -18
- package/dist/src/command-line/migrate/text.js +0 -26
- package/dist/src/command-line/migrate/update-filters.d.ts +0 -11
- package/dist/src/command-line/migrate/update-filters.js +0 -45
- package/dist/src/command-line/migrate/version-skew-guard.d.ts +0 -60
- package/dist/src/command-line/migrate/version-skew-guard.js +0 -175
- package/dist/src/command-line/migrate/version-utils.d.ts +0 -5
- package/dist/src/command-line/migrate/version-utils.js +0 -52
- package/dist/src/command-line/new/command-object.d.ts +0 -2
- package/dist/src/command-line/new/command-object.js +0 -26
- package/dist/src/command-line/new/new.d.ts +0 -3
- package/dist/src/command-line/new/new.js +0 -30
- package/dist/src/command-line/nx-cloud/apply-locally/apply-locally.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/apply-locally/apply-locally.js +0 -13
- package/dist/src/command-line/nx-cloud/apply-locally/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/apply-locally/command-object.js +0 -16
- package/dist/src/command-line/nx-cloud/complete-run/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/complete-run/command-object.js +0 -17
- package/dist/src/command-line/nx-cloud/complete-run/stop-all-agents.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/complete-run/stop-all-agents.js +0 -13
- package/dist/src/command-line/nx-cloud/connect/command-object.d.ts +0 -3
- package/dist/src/command-line/nx-cloud/connect/command-object.js +0 -28
- package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.d.ts +0 -13
- package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +0 -266
- package/dist/src/command-line/nx-cloud/connect/view-logs.d.ts +0 -1
- package/dist/src/command-line/nx-cloud/connect/view-logs.js +0 -55
- package/dist/src/command-line/nx-cloud/download-cloud-client/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/download-cloud-client/command-object.js +0 -13
- package/dist/src/command-line/nx-cloud/download-cloud-client/download-cloud-client.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/download-cloud-client/download-cloud-client.js +0 -32
- package/dist/src/command-line/nx-cloud/fix-ci/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/fix-ci/command-object.js +0 -16
- package/dist/src/command-line/nx-cloud/fix-ci/fix-ci.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/fix-ci/fix-ci.js +0 -13
- package/dist/src/command-line/nx-cloud/login/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/login/command-object.js +0 -20
- package/dist/src/command-line/nx-cloud/login/login.d.ts +0 -5
- package/dist/src/command-line/nx-cloud/login/login.js +0 -10
- package/dist/src/command-line/nx-cloud/logout/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/logout/command-object.js +0 -16
- package/dist/src/command-line/nx-cloud/logout/logout.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/logout/logout.js +0 -7
- package/dist/src/command-line/nx-cloud/record/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/record/command-object.js +0 -19
- package/dist/src/command-line/nx-cloud/record/record.d.ts +0 -5
- package/dist/src/command-line/nx-cloud/record/record.js +0 -33
- package/dist/src/command-line/nx-cloud/start-agent/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/start-agent/command-object.js +0 -16
- package/dist/src/command-line/nx-cloud/start-agent/start-agent.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/start-agent/start-agent.js +0 -13
- package/dist/src/command-line/nx-cloud/start-ci-run/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/start-ci-run/command-object.js +0 -16
- package/dist/src/command-line/nx-cloud/start-ci-run/start-ci-run.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/start-ci-run/start-ci-run.js +0 -13
- package/dist/src/command-line/nx-cloud/start-nx-agents/command-object.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/start-nx-agents/command-object.js +0 -16
- package/dist/src/command-line/nx-cloud/start-nx-agents/start-nx-agents.d.ts +0 -4
- package/dist/src/command-line/nx-cloud/start-nx-agents/start-nx-agents.js +0 -13
- package/dist/src/command-line/nx-cloud/utils.d.ts +0 -2
- package/dist/src/command-line/nx-cloud/utils.js +0 -34
- package/dist/src/command-line/nx-commands.d.ts +0 -10
- package/dist/src/command-line/nx-commands.js +0 -183
- package/dist/src/command-line/register/command-object.d.ts +0 -6
- package/dist/src/command-line/register/command-object.js +0 -27
- package/dist/src/command-line/register/register.d.ts +0 -2
- package/dist/src/command-line/register/register.js +0 -9
- package/dist/src/command-line/release/changelog/commit-utils.d.ts +0 -13
- package/dist/src/command-line/release/changelog/commit-utils.js +0 -63
- package/dist/src/command-line/release/changelog/version-plan-filtering.d.ts +0 -43
- package/dist/src/command-line/release/changelog/version-plan-filtering.js +0 -156
- package/dist/src/command-line/release/changelog/version-plan-utils.d.ts +0 -31
- package/dist/src/command-line/release/changelog/version-plan-utils.js +0 -92
- package/dist/src/command-line/release/changelog.d.ts +0 -28
- package/dist/src/command-line/release/changelog.js +0 -905
- package/dist/src/command-line/release/command-object.d.ts +0 -96
- package/dist/src/command-line/release/command-object.js +0 -342
- package/dist/src/command-line/release/config/config.d.ts +0 -70
- package/dist/src/command-line/release/config/config.js +0 -1204
- package/dist/src/command-line/release/config/conventional-commits.d.ts +0 -2
- package/dist/src/command-line/release/config/conventional-commits.js +0 -106
- package/dist/src/command-line/release/config/deep-merge-json.d.ts +0 -1
- package/dist/src/command-line/release/config/deep-merge-json.js +0 -28
- package/dist/src/command-line/release/config/filter-release-groups.d.ts +0 -23
- package/dist/src/command-line/release/config/filter-release-groups.js +0 -157
- package/dist/src/command-line/release/config/use-legacy-versioning.d.ts +0 -2
- package/dist/src/command-line/release/config/use-legacy-versioning.js +0 -8
- package/dist/src/command-line/release/config/version-plans.d.ts +0 -42
- package/dist/src/command-line/release/config/version-plans.js +0 -278
- package/dist/src/command-line/release/index.d.ts +0 -49
- package/dist/src/command-line/release/index.js +0 -49
- package/dist/src/command-line/release/plan-check.d.ts +0 -4
- package/dist/src/command-line/release/plan-check.js +0 -170
- package/dist/src/command-line/release/plan.d.ts +0 -4
- package/dist/src/command-line/release/plan.js +0 -248
- package/dist/src/command-line/release/publish.d.ts +0 -9
- package/dist/src/command-line/release/publish.js +0 -295
- package/dist/src/command-line/release/release.d.ts +0 -5
- package/dist/src/command-line/release/release.js +0 -299
- package/dist/src/command-line/release/utils/diff.d.ts +0 -21
- package/dist/src/command-line/release/utils/diff.js +0 -168
- package/dist/src/command-line/release/utils/exec-command.d.ts +0 -1
- package/dist/src/command-line/release/utils/exec-command.js +0 -34
- package/dist/src/command-line/release/utils/generate-version-plan-content.d.ts +0 -1
- package/dist/src/command-line/release/utils/generate-version-plan-content.js +0 -20
- package/dist/src/command-line/release/utils/get-touched-projects-for-group.d.ts +0 -7
- package/dist/src/command-line/release/utils/get-touched-projects-for-group.js +0 -78
- package/dist/src/command-line/release/utils/git.d.ts +0 -126
- package/dist/src/command-line/release/utils/git.js +0 -597
- package/dist/src/command-line/release/utils/launch-editor.d.ts +0 -1
- package/dist/src/command-line/release/utils/launch-editor.js +0 -46
- package/dist/src/command-line/release/utils/markdown.d.ts +0 -6
- package/dist/src/command-line/release/utils/markdown.js +0 -28
- package/dist/src/command-line/release/utils/print-changes.d.ts +0 -6
- package/dist/src/command-line/release/utils/print-changes.js +0 -63
- package/dist/src/command-line/release/utils/print-config.d.ts +0 -7
- package/dist/src/command-line/release/utils/print-config.js +0 -36
- package/dist/src/command-line/release/utils/release-graph.d.ts +0 -248
- package/dist/src/command-line/release/utils/release-graph.js +0 -769
- package/dist/src/command-line/release/utils/remote-release-clients/extract-repo-slug.d.ts +0 -9
- package/dist/src/command-line/release/utils/remote-release-clients/extract-repo-slug.js +0 -61
- package/dist/src/command-line/release/utils/remote-release-clients/github.d.ts +0 -58
- package/dist/src/command-line/release/utils/remote-release-clients/github.js +0 -336
- package/dist/src/command-line/release/utils/remote-release-clients/gitlab.d.ts +0 -62
- package/dist/src/command-line/release/utils/remote-release-clients/gitlab.js +0 -259
- package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.d.ts +0 -111
- package/dist/src/command-line/release/utils/remote-release-clients/remote-release-client.js +0 -138
- package/dist/src/command-line/release/utils/repository-git-tags.d.ts +0 -25
- package/dist/src/command-line/release/utils/repository-git-tags.js +0 -125
- package/dist/src/command-line/release/utils/resolve-changelog-renderer.d.ts +0 -2
- package/dist/src/command-line/release/utils/resolve-changelog-renderer.js +0 -22
- package/dist/src/command-line/release/utils/resolve-nx-json-error-message.d.ts +0 -1
- package/dist/src/command-line/release/utils/resolve-nx-json-error-message.js +0 -53
- package/dist/src/command-line/release/utils/resolve-semver-specifier.d.ts +0 -7
- package/dist/src/command-line/release/utils/resolve-semver-specifier.js +0 -41
- package/dist/src/command-line/release/utils/semver.d.ts +0 -26
- package/dist/src/command-line/release/utils/semver.js +0 -111
- package/dist/src/command-line/release/utils/shared-legacy.d.ts +0 -25
- package/dist/src/command-line/release/utils/shared-legacy.js +0 -2
- package/dist/src/command-line/release/utils/shared.d.ts +0 -64
- package/dist/src/command-line/release/utils/shared.js +0 -379
- package/dist/src/command-line/release/utils/version-plan-utils.d.ts +0 -40
- package/dist/src/command-line/release/utils/version-plan-utils.js +0 -111
- package/dist/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts +0 -8
- package/dist/src/command-line/release/version/derive-specifier-from-conventional-commits.js +0 -61
- package/dist/src/command-line/release/version/deriver-specifier-from-version-plans.d.ts +0 -8
- package/dist/src/command-line/release/version/deriver-specifier-from-version-plans.js +0 -59
- package/dist/src/command-line/release/version/project-logger.d.ts +0 -8
- package/dist/src/command-line/release/version/project-logger.js +0 -47
- package/dist/src/command-line/release/version/release-group-processor.d.ts +0 -139
- package/dist/src/command-line/release/version/release-group-processor.js +0 -706
- package/dist/src/command-line/release/version/resolve-current-version.d.ts +0 -32
- package/dist/src/command-line/release/version/resolve-current-version.js +0 -240
- package/dist/src/command-line/release/version/topological-sort.d.ts +0 -9
- package/dist/src/command-line/release/version/topological-sort.js +0 -41
- package/dist/src/command-line/release/version/version-actions.d.ts +0 -224
- package/dist/src/command-line/release/version/version-actions.js +0 -255
- package/dist/src/command-line/release/version.d.ts +0 -28
- package/dist/src/command-line/release/version.js +0 -382
- package/dist/src/command-line/repair/command-object.d.ts +0 -2
- package/dist/src/command-line/repair/command-object.js +0 -21
- package/dist/src/command-line/repair/repair.d.ts +0 -3
- package/dist/src/command-line/repair/repair.js +0 -41
- package/dist/src/command-line/report/command-object.d.ts +0 -2
- package/dist/src/command-line/report/command-object.js +0 -12
- package/dist/src/command-line/report/report.d.ts +0 -71
- package/dist/src/command-line/report/report.js +0 -405
- package/dist/src/command-line/reset/command-object.d.ts +0 -8
- package/dist/src/command-line/reset/command-object.js +0 -27
- package/dist/src/command-line/reset/reset.d.ts +0 -2
- package/dist/src/command-line/reset/reset.js +0 -185
- package/dist/src/command-line/run/command-object.d.ts +0 -6
- package/dist/src/command-line/run/command-object.js +0 -43
- package/dist/src/command-line/run/completion.d.ts +0 -1
- package/dist/src/command-line/run/completion.js +0 -7
- package/dist/src/command-line/run/executor-utils.d.ts +0 -12
- package/dist/src/command-line/run/executor-utils.js +0 -96
- package/dist/src/command-line/run/run-one.d.ts +0 -17
- package/dist/src/command-line/run/run-one.js +0 -155
- package/dist/src/command-line/run/run.d.ts +0 -51
- package/dist/src/command-line/run/run.js +0 -179
- package/dist/src/command-line/run-many/command-object.d.ts +0 -2
- package/dist/src/command-line/run-many/command-object.js +0 -18
- package/dist/src/command-line/run-many/completion.d.ts +0 -1
- package/dist/src/command-line/run-many/completion.js +0 -13
- package/dist/src/command-line/run-many/run-many.d.ts +0 -10
- package/dist/src/command-line/run-many/run-many.js +0 -90
- package/dist/src/command-line/show/command-object.d.ts +0 -40
- package/dist/src/command-line/show/command-object.js +0 -237
- package/dist/src/command-line/show/completion.d.ts +0 -1
- package/dist/src/command-line/show/completion.js +0 -27
- package/dist/src/command-line/show/project.d.ts +0 -2
- package/dist/src/command-line/show/project.js +0 -103
- package/dist/src/command-line/show/projects.d.ts +0 -2
- package/dist/src/command-line/show/projects.js +0 -80
- package/dist/src/command-line/show/show-target/index.d.ts +0 -3
- package/dist/src/command-line/show/show-target/index.js +0 -9
- package/dist/src/command-line/show/show-target/info.d.ts +0 -28
- package/dist/src/command-line/show/show-target/info.js +0 -389
- package/dist/src/command-line/show/show-target/inputs.d.ts +0 -2
- package/dist/src/command-line/show/show-target/inputs.js +0 -83
- package/dist/src/command-line/show/show-target/outputs.d.ts +0 -2
- package/dist/src/command-line/show/show-target/outputs.js +0 -70
- package/dist/src/command-line/show/show-target/utils.d.ts +0 -54
- package/dist/src/command-line/show/show-target/utils.js +0 -265
- package/dist/src/command-line/sync/command-object.d.ts +0 -6
- package/dist/src/command-line/sync/command-object.js +0 -21
- package/dist/src/command-line/sync/sync.d.ts +0 -6
- package/dist/src/command-line/sync/sync.js +0 -120
- package/dist/src/command-line/watch/command-object.d.ts +0 -2
- package/dist/src/command-line/watch/command-object.js +0 -91
- package/dist/src/command-line/watch/completion.d.ts +0 -1
- package/dist/src/command-line/watch/completion.js +0 -10
- package/dist/src/command-line/watch/watch.d.ts +0 -31
- package/dist/src/command-line/watch/watch.js +0 -211
- package/dist/src/command-line/yargs-utils/arguments-of.d.ts +0 -11
- package/dist/src/command-line/yargs-utils/arguments-of.js +0 -9
- package/dist/src/command-line/yargs-utils/documentation.d.ts +0 -2
- package/dist/src/command-line/yargs-utils/documentation.js +0 -12
- package/dist/src/command-line/yargs-utils/shared-options.d.ts +0 -91
- package/dist/src/command-line/yargs-utils/shared-options.js +0 -397
- package/dist/src/commands-runner/command-graph.d.ts +0 -13
- package/dist/src/commands-runner/command-graph.js +0 -2
- package/dist/src/commands-runner/create-command-graph.d.ts +0 -4
- package/dist/src/commands-runner/create-command-graph.js +0 -72
- package/dist/src/commands-runner/get-command-projects.d.ts +0 -3
- package/dist/src/commands-runner/get-command-projects.js +0 -33
- package/dist/src/config/calculate-default-project-name.d.ts +0 -4
- package/dist/src/config/calculate-default-project-name.js +0 -41
- package/dist/src/config/configuration.d.ts +0 -8
- package/dist/src/config/configuration.js +0 -17
- package/dist/src/config/misc-interfaces.d.ts +0 -266
- package/dist/src/config/misc-interfaces.js +0 -2
- package/dist/src/config/nx-json.d.ts +0 -963
- package/dist/src/config/nx-json.js +0 -40
- package/dist/src/config/project-graph.d.ts +0 -137
- package/dist/src/config/project-graph.js +0 -45
- package/dist/src/config/schema-utils.d.ts +0 -37
- package/dist/src/config/schema-utils.js +0 -199
- package/dist/src/config/task-graph.d.ts +0 -6
- package/dist/src/config/task-graph.js +0 -2
- package/dist/src/config/to-project-name.d.ts +0 -5
- package/dist/src/config/to-project-name.js +0 -12
- package/dist/src/config/workspace-json-project-json.d.ts +0 -273
- package/dist/src/config/workspace-json-project-json.js +0 -2
- package/dist/src/core/graph/environment.js +0 -1
- package/dist/src/core/graph/favicon.ico +0 -0
- package/dist/src/core/graph/index.html +0 -32
- package/dist/src/core/graph/main.js +0 -1
- package/dist/src/core/graph/runtime.js +0 -1
- package/dist/src/core/graph/styles.css +0 -2
- package/dist/src/core/graph/styles.js +0 -1
- package/dist/src/daemon/cache.d.ts +0 -10
- package/dist/src/daemon/cache.js +0 -58
- package/dist/src/daemon/client/client.d.ts +0 -161
- package/dist/src/daemon/client/client.js +0 -1255
- package/dist/src/daemon/client/daemon-environment.d.ts +0 -64
- package/dist/src/daemon/client/daemon-environment.js +0 -378
- package/dist/src/daemon/client/daemon-socket-messenger.d.ts +0 -12
- package/dist/src/daemon/client/daemon-socket-messenger.js +0 -63
- package/dist/src/daemon/is-nx-version-mismatch.d.ts +0 -1
- package/dist/src/daemon/is-nx-version-mismatch.js +0 -8
- package/dist/src/daemon/is-on-daemon.d.ts +0 -1
- package/dist/src/daemon/is-on-daemon.js +0 -6
- package/dist/src/daemon/is-v8-serializer-enabled.d.ts +0 -5
- package/dist/src/daemon/is-v8-serializer-enabled.js +0 -10
- package/dist/src/daemon/logger.d.ts +0 -39
- package/dist/src/daemon/logger.js +0 -80
- package/dist/src/daemon/message-types/configure-ai-agents.d.ts +0 -20
- package/dist/src/daemon/message-types/configure-ai-agents.js +0 -19
- package/dist/src/daemon/message-types/daemon-message.d.ts +0 -39
- package/dist/src/daemon/message-types/daemon-message.js +0 -54
- package/dist/src/daemon/message-types/flush-sync-generator-changes-to-disk.d.ts +0 -6
- package/dist/src/daemon/message-types/flush-sync-generator-changes-to-disk.js +0 -11
- package/dist/src/daemon/message-types/force-shutdown.d.ts +0 -5
- package/dist/src/daemon/message-types/force-shutdown.js +0 -11
- package/dist/src/daemon/message-types/get-context-file-data.d.ts +0 -5
- package/dist/src/daemon/message-types/get-context-file-data.js +0 -11
- package/dist/src/daemon/message-types/get-files-in-directory.d.ts +0 -6
- package/dist/src/daemon/message-types/get-files-in-directory.js +0 -11
- package/dist/src/daemon/message-types/get-nx-workspace-files.d.ts +0 -6
- package/dist/src/daemon/message-types/get-nx-workspace-files.js +0 -11
- package/dist/src/daemon/message-types/get-registered-sync-generators.d.ts +0 -5
- package/dist/src/daemon/message-types/get-registered-sync-generators.js +0 -11
- package/dist/src/daemon/message-types/get-sync-generator-changes.d.ts +0 -6
- package/dist/src/daemon/message-types/get-sync-generator-changes.js +0 -11
- package/dist/src/daemon/message-types/glob.d.ts +0 -14
- package/dist/src/daemon/message-types/glob.js +0 -19
- package/dist/src/daemon/message-types/hash-glob.d.ts +0 -13
- package/dist/src/daemon/message-types/hash-glob.js +0 -19
- package/dist/src/daemon/message-types/nx-console.d.ts +0 -17
- package/dist/src/daemon/message-types/nx-console.js +0 -19
- package/dist/src/daemon/message-types/register-project-graph-listener.d.ts +0 -5
- package/dist/src/daemon/message-types/register-project-graph-listener.js +0 -11
- package/dist/src/daemon/message-types/run-tasks-execution-hooks.d.ts +0 -13
- package/dist/src/daemon/message-types/run-tasks-execution-hooks.js +0 -19
- package/dist/src/daemon/message-types/streaming-messages.d.ts +0 -14
- package/dist/src/daemon/message-types/streaming-messages.js +0 -19
- package/dist/src/daemon/message-types/task-history.d.ts +0 -19
- package/dist/src/daemon/message-types/task-history.js +0 -27
- package/dist/src/daemon/message-types/update-workspace-context.d.ts +0 -8
- package/dist/src/daemon/message-types/update-workspace-context.js +0 -11
- package/dist/src/daemon/sandbox-socket-hint.d.ts +0 -27
- package/dist/src/daemon/sandbox-socket-hint.js +0 -136
- package/dist/src/daemon/server/client-socket-context.d.ts +0 -23
- package/dist/src/daemon/server/client-socket-context.js +0 -88
- package/dist/src/daemon/server/dotenv-graph-changes.d.ts +0 -97
- package/dist/src/daemon/server/dotenv-graph-changes.js +0 -284
- package/dist/src/daemon/server/file-watching/changed-projects.d.ts +0 -10
- package/dist/src/daemon/server/file-watching/changed-projects.js +0 -53
- package/dist/src/daemon/server/file-watching/file-change-events.d.ts +0 -7
- package/dist/src/daemon/server/file-watching/file-change-events.js +0 -19
- package/dist/src/daemon/server/file-watching/file-watcher-sockets.d.ts +0 -17
- package/dist/src/daemon/server/file-watching/file-watcher-sockets.js +0 -82
- package/dist/src/daemon/server/file-watching/route-workspace-changes.d.ts +0 -9
- package/dist/src/daemon/server/file-watching/route-workspace-changes.js +0 -76
- package/dist/src/daemon/server/handle-client-env.d.ts +0 -8
- package/dist/src/daemon/server/handle-client-env.js +0 -92
- package/dist/src/daemon/server/handle-configure-ai-agents.d.ts +0 -3
- package/dist/src/daemon/server/handle-configure-ai-agents.js +0 -101
- package/dist/src/daemon/server/handle-context-file-data.d.ts +0 -2
- package/dist/src/daemon/server/handle-context-file-data.js +0 -12
- package/dist/src/daemon/server/handle-flush-sync-generator-changes-to-disk.d.ts +0 -2
- package/dist/src/daemon/server/handle-flush-sync-generator-changes-to-disk.js +0 -11
- package/dist/src/daemon/server/handle-force-shutdown.d.ts +0 -5
- package/dist/src/daemon/server/handle-force-shutdown.js +0 -18
- package/dist/src/daemon/server/handle-get-files-in-directory.d.ts +0 -2
- package/dist/src/daemon/server/handle-get-files-in-directory.js +0 -12
- package/dist/src/daemon/server/handle-get-registered-sync-generators.d.ts +0 -2
- package/dist/src/daemon/server/handle-get-registered-sync-generators.js +0 -11
- package/dist/src/daemon/server/handle-get-sync-generator-changes.d.ts +0 -2
- package/dist/src/daemon/server/handle-get-sync-generator-changes.js +0 -20
- package/dist/src/daemon/server/handle-glob.d.ts +0 -3
- package/dist/src/daemon/server/handle-glob.js +0 -20
- package/dist/src/daemon/server/handle-hash-glob.d.ts +0 -3
- package/dist/src/daemon/server/handle-hash-glob.js +0 -20
- package/dist/src/daemon/server/handle-hash-tasks.d.ts +0 -12
- package/dist/src/daemon/server/handle-hash-tasks.js +0 -28
- package/dist/src/daemon/server/handle-nx-console.d.ts +0 -3
- package/dist/src/daemon/server/handle-nx-console.js +0 -54
- package/dist/src/daemon/server/handle-nx-workspace-files.d.ts +0 -2
- package/dist/src/daemon/server/handle-nx-workspace-files.js +0 -12
- package/dist/src/daemon/server/handle-outputs-changes.d.ts +0 -10
- package/dist/src/daemon/server/handle-outputs-changes.js +0 -86
- package/dist/src/daemon/server/handle-outputs-tracking.d.ts +0 -15
- package/dist/src/daemon/server/handle-outputs-tracking.js +0 -35
- package/dist/src/daemon/server/handle-process-in-background.d.ts +0 -6
- package/dist/src/daemon/server/handle-process-in-background.js +0 -32
- package/dist/src/daemon/server/handle-request-project-graph.d.ts +0 -3
- package/dist/src/daemon/server/handle-request-project-graph.js +0 -36
- package/dist/src/daemon/server/handle-request-shutdown.d.ts +0 -5
- package/dist/src/daemon/server/handle-request-shutdown.js +0 -27
- package/dist/src/daemon/server/handle-task-history.d.ts +0 -13
- package/dist/src/daemon/server/handle-task-history.js +0 -30
- package/dist/src/daemon/server/handle-tasks-execution-hooks.d.ts +0 -19
- package/dist/src/daemon/server/handle-tasks-execution-hooks.js +0 -35
- package/dist/src/daemon/server/handle-update-workspace-context.d.ts +0 -2
- package/dist/src/daemon/server/handle-update-workspace-context.js +0 -11
- package/dist/src/daemon/server/latest-nx.d.ts +0 -10
- package/dist/src/daemon/server/latest-nx.js +0 -56
- package/dist/src/daemon/server/nx-console-operations.d.ts +0 -26
- package/dist/src/daemon/server/nx-console-operations.js +0 -97
- package/dist/src/daemon/server/outputs-tracking.d.ts +0 -23
- package/dist/src/daemon/server/outputs-tracking.js +0 -120
- package/dist/src/daemon/server/project-graph-incremental-recomputation.d.ts +0 -47
- package/dist/src/daemon/server/project-graph-incremental-recomputation.js +0 -660
- package/dist/src/daemon/server/project-graph-listener-sockets.d.ts +0 -7
- package/dist/src/daemon/server/project-graph-listener-sockets.js +0 -25
- package/dist/src/daemon/server/server.d.ts +0 -10
- package/dist/src/daemon/server/server.js +0 -465
- package/dist/src/daemon/server/shutdown-utils.d.ts +0 -23
- package/dist/src/daemon/server/shutdown-utils.js +0 -159
- package/dist/src/daemon/server/start.d.ts +0 -1
- package/dist/src/daemon/server/start.js +0 -20
- package/dist/src/daemon/server/sync-generators.d.ts +0 -14
- package/dist/src/daemon/server/sync-generators.js +0 -368
- package/dist/src/daemon/server/watcher.d.ts +0 -18
- package/dist/src/daemon/server/watcher.js +0 -126
- package/dist/src/daemon/socket-utils.d.ts +0 -43
- package/dist/src/daemon/socket-utils.js +0 -131
- package/dist/src/daemon/tmp-dir.d.ts +0 -62
- package/dist/src/daemon/tmp-dir.js +0 -477
- package/dist/src/devkit-exports.d.ts +0 -139
- package/dist/src/devkit-exports.js +0 -143
- package/dist/src/devkit-internals.d.ts +0 -144
- package/dist/src/devkit-internals.js +0 -331
- package/dist/src/devkit-testing-exports.d.ts +0 -2
- package/dist/src/devkit-testing-exports.js +0 -8
- package/dist/src/executors/noop/noop.impl.d.ts +0 -3
- package/dist/src/executors/noop/noop.impl.js +0 -6
- package/dist/src/executors/noop/schema.json +0 -10
- package/dist/src/executors/run-commands/run-commands.impl.d.ts +0 -59
- package/dist/src/executors/run-commands/run-commands.impl.js +0 -301
- package/dist/src/executors/run-commands/running-tasks.d.ts +0 -52
- package/dist/src/executors/run-commands/running-tasks.js +0 -603
- package/dist/src/executors/run-commands/schema.json +0 -198
- package/dist/src/executors/run-script/run-script.impl.d.ts +0 -8
- package/dist/src/executors/run-script/run-script.impl.js +0 -86
- package/dist/src/executors/run-script/schema.json +0 -28
- package/dist/src/executors/utils/convert-nx-executor.d.ts +0 -10
- package/dist/src/executors/utils/convert-nx-executor.js +0 -83
- package/dist/src/generators/internal-utils/format-changed-files.d.ts +0 -24
- package/dist/src/generators/internal-utils/format-changed-files.js +0 -163
- package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +0 -26
- package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.js +0 -70
- package/dist/src/generators/testing-utils/create-tree.d.ts +0 -5
- package/dist/src/generators/testing-utils/create-tree.js +0 -14
- package/dist/src/generators/tree.d.ts +0 -127
- package/dist/src/generators/tree.js +0 -310
- package/dist/src/generators/utils/generate-files.d.ts +0 -44
- package/dist/src/generators/utils/generate-files.js +0 -114
- package/dist/src/generators/utils/glob.d.ts +0 -22
- package/dist/src/generators/utils/glob.js +0 -51
- package/dist/src/generators/utils/json.d.ts +0 -28
- package/dist/src/generators/utils/json.js +0 -48
- package/dist/src/generators/utils/nx-json.d.ts +0 -10
- package/dist/src/generators/utils/nx-json.js +0 -62
- package/dist/src/generators/utils/project-configuration.d.ts +0 -51
- package/dist/src/generators/utils/project-configuration.js +0 -299
- package/dist/src/hasher/check-task-files.d.ts +0 -86
- package/dist/src/hasher/check-task-files.js +0 -378
- package/dist/src/hasher/create-task-hasher.d.ts +0 -4
- package/dist/src/hasher/create-task-hasher.js +0 -15
- package/dist/src/hasher/file-hasher.d.ts +0 -3
- package/dist/src/hasher/file-hasher.js +0 -23
- package/dist/src/hasher/hash-plan-inspector.d.ts +0 -33
- package/dist/src/hasher/hash-plan-inspector.js +0 -70
- package/dist/src/hasher/hash-task.d.ts +0 -17
- package/dist/src/hasher/hash-task.js +0 -191
- package/dist/src/hasher/native-task-hasher-impl.d.ts +0 -18
- package/dist/src/hasher/native-task-hasher-impl.js +0 -38
- package/dist/src/hasher/task-hasher.d.ts +0 -160
- package/dist/src/hasher/task-hasher.js +0 -301
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +0 -2
- package/dist/src/migrations/update-15-0-0/prefix-outputs.d.ts +0 -2
- package/dist/src/migrations/update-15-0-0/prefix-outputs.js +0 -54
- package/dist/src/migrations/update-16-0-0/remove-nrwl-cli.d.ts +0 -2
- package/dist/src/migrations/update-16-0-0/remove-nrwl-cli.js +0 -16
- package/dist/src/migrations/update-16-0-0/update-depends-on-to-tokens.d.ts +0 -2
- package/dist/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +0 -82
- package/dist/src/migrations/update-16-0-0/update-nx-cloud-runner.d.ts +0 -2
- package/dist/src/migrations/update-16-0-0/update-nx-cloud-runner.js +0 -29
- package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.d.ts +0 -2
- package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.js +0 -50
- package/dist/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.d.ts +0 -12
- package/dist/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.js +0 -67
- package/dist/src/migrations/update-17-0-0/move-cache-directory.d.ts +0 -2
- package/dist/src/migrations/update-17-0-0/move-cache-directory.js +0 -35
- package/dist/src/migrations/update-17-0-0/move-cache-directory.md +0 -31
- package/dist/src/migrations/update-17-0-0/rm-default-collection-npm-scope.d.ts +0 -2
- package/dist/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +0 -72
- package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.d.ts +0 -2
- package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +0 -126
- package/dist/src/migrations/update-17-2-0/move-default-base.d.ts +0 -5
- package/dist/src/migrations/update-17-2-0/move-default-base.js +0 -20
- package/dist/src/migrations/update-17-3-0/update-nxw.d.ts +0 -2
- package/dist/src/migrations/update-17-3-0/update-nxw.js +0 -7
- package/dist/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.d.ts +0 -2
- package/dist/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +0 -11
- package/dist/src/migrations/update-19-2-0/move-workspace-data-directory.d.ts +0 -4
- package/dist/src/migrations/update-19-2-0/move-workspace-data-directory.js +0 -33
- package/dist/src/migrations/update-19-2-4/set-project-name.d.ts +0 -2
- package/dist/src/migrations/update-19-2-4/set-project-name.js +0 -34
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.d.ts +0 -2
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.js +0 -25
- package/dist/src/migrations/update-20-0-0/move-use-daemon-process.md +0 -27
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.d.ts +0 -2
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.js +0 -20
- package/dist/src/migrations/update-20-0-1/use-legacy-cache.md +0 -24
- package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.d.ts +0 -2
- package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.js +0 -38
- package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.md +0 -49
- package/dist/src/migrations/update-21-0-0/release-version-config-changes.d.ts +0 -2
- package/dist/src/migrations/update-21-0-0/release-version-config-changes.js +0 -101
- package/dist/src/migrations/update-21-0-0/release-version-config-changes.md +0 -54
- package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.d.ts +0 -2
- package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.js +0 -38
- package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.md +0 -28
- package/dist/src/migrations/update-21-0-0/remove-legacy-cache.d.ts +0 -2
- package/dist/src/migrations/update-21-0-0/remove-legacy-cache.js +0 -17
- package/dist/src/migrations/update-21-0-0/remove-legacy-cache.md +0 -22
- package/dist/src/migrations/update-22-0-0/consolidate-release-tag-config.d.ts +0 -2
- package/dist/src/migrations/update-22-0-0/consolidate-release-tag-config.js +0 -100
- package/dist/src/migrations/update-22-0-0/release-version-config-changes.d.ts +0 -2
- package/dist/src/migrations/update-22-0-0/release-version-config-changes.js +0 -101
- package/dist/src/migrations/update-22-1-0/update-nx-wrapper.d.ts +0 -2
- package/dist/src/migrations/update-22-1-0/update-nx-wrapper.js +0 -7
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.d.ts +0 -2
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.js +0 -19
- package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.md +0 -11
- package/dist/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.d.ts +0 -2
- package/dist/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.js +0 -16
- package/dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.d.ts +0 -2
- package/dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.js +0 -16
- package/dist/src/migrations/update-22-6-0/enable-analytics-prompt.d.ts +0 -2
- package/dist/src/migrations/update-22-6-0/enable-analytics-prompt.js +0 -23
- package/dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.d.ts +0 -2
- package/dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.js +0 -16
- package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.d.ts +0 -2
- package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.js +0 -16
- package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.d.ts +0 -9
- package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.js +0 -18
- package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.d.ts +0 -12
- package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.js +0 -250
- package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.md +0 -50
- package/dist/src/migrations/utils/target-defaults.d.ts +0 -28
- package/dist/src/migrations/utils/target-defaults.js +0 -46
- package/dist/src/native/assert-supported-platform.d.ts +0 -1
- package/dist/src/native/assert-supported-platform.js +0 -39
- package/dist/src/native/browser.js +0 -1
- package/dist/src/native/index.d.ts +0 -858
- package/dist/src/native/index.js +0 -222
- package/dist/src/native/native-bindings.js +0 -642
- package/dist/src/native/native-file-cache-location.d.ts +0 -17
- package/dist/src/native/native-file-cache-location.js +0 -97
- package/dist/src/native/nx.openharmony-arm64.node +0 -0
- package/dist/src/native/nx.wasi-browser.js +0 -131
- package/dist/src/native/nx.wasi.cjs +0 -161
- 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 +0 -3
- package/dist/src/native/transform-objects.js +0 -51
- package/dist/src/native/wasi-worker-browser.mjs +0 -30
- package/dist/src/native/wasi-worker.mjs +0 -63
- package/dist/src/nx-cloud/debug-logger.d.ts +0 -1
- package/dist/src/nx-cloud/debug-logger.js +0 -8
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.d.ts +0 -14
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +0 -159
- package/dist/src/nx-cloud/generators/connect-to-nx-cloud/schema.json +0 -41
- package/dist/src/nx-cloud/models/onboarding-status.d.ts +0 -1
- package/dist/src/nx-cloud/models/onboarding-status.js +0 -2
- package/dist/src/nx-cloud/nx-cloud-tasks-runner-shell.d.ts +0 -16
- package/dist/src/nx-cloud/nx-cloud-tasks-runner-shell.js +0 -41
- package/dist/src/nx-cloud/resolution-helpers.d.ts +0 -1
- package/dist/src/nx-cloud/resolution-helpers.js +0 -19
- package/dist/src/nx-cloud/update-manager.d.ts +0 -23
- package/dist/src/nx-cloud/update-manager.js +0 -267
- package/dist/src/nx-cloud/utilities/axios.d.ts +0 -4
- package/dist/src/nx-cloud/utilities/axios.js +0 -17
- package/dist/src/nx-cloud/utilities/client.d.ts +0 -10
- package/dist/src/nx-cloud/utilities/client.js +0 -42
- package/dist/src/nx-cloud/utilities/environment.d.ts +0 -3
- package/dist/src/nx-cloud/utilities/environment.js +0 -48
- package/dist/src/nx-cloud/utilities/get-cloud-options.d.ts +0 -5
- package/dist/src/nx-cloud/utilities/get-cloud-options.js +0 -26
- package/dist/src/nx-cloud/utilities/is-workspace-claimed.d.ts +0 -1
- package/dist/src/nx-cloud/utilities/is-workspace-claimed.js +0 -25
- package/dist/src/nx-cloud/utilities/onboarding.d.ts +0 -5
- package/dist/src/nx-cloud/utilities/onboarding.js +0 -31
- package/dist/src/nx-cloud/utilities/url-shorten.d.ts +0 -2
- package/dist/src/nx-cloud/utilities/url-shorten.js +0 -85
- package/dist/src/plugins/js/hasher/hasher.d.ts +0 -5
- package/dist/src/plugins/js/hasher/hasher.js +0 -51
- package/dist/src/plugins/js/index.d.ts +0 -4
- package/dist/src/plugins/js/index.js +0 -201
- package/dist/src/plugins/js/lock-file/bun-parser.d.ts +0 -14
- package/dist/src/plugins/js/lock-file/bun-parser.js +0 -992
- package/dist/src/plugins/js/lock-file/lock-file.d.ts +0 -85
- package/dist/src/plugins/js/lock-file/lock-file.js +0 -442
- package/dist/src/plugins/js/lock-file/npm-parser.d.ts +0 -10
- package/dist/src/plugins/js/lock-file/npm-parser.js +0 -595
- package/dist/src/plugins/js/lock-file/pnpm-parser.d.ts +0 -10
- package/dist/src/plugins/js/lock-file/pnpm-parser.js +0 -1047
- package/dist/src/plugins/js/lock-file/project-graph-pruning.d.ts +0 -35
- package/dist/src/plugins/js/lock-file/project-graph-pruning.js +0 -290
- package/dist/src/plugins/js/lock-file/pruned-output.d.ts +0 -330
- package/dist/src/plugins/js/lock-file/pruned-output.js +0 -1441
- package/dist/src/plugins/js/lock-file/utils/package-json.d.ts +0 -10
- package/dist/src/plugins/js/lock-file/utils/package-json.js +0 -38
- package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.d.ts +0 -21
- package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.js +0 -875
- package/dist/src/plugins/js/lock-file/yarn-parser.d.ts +0 -10
- package/dist/src/plugins/js/lock-file/yarn-parser.js +0 -536
- package/dist/src/plugins/js/package-json/create-package-json.d.ts +0 -29
- package/dist/src/plugins/js/package-json/create-package-json.js +0 -312
- package/dist/src/plugins/js/project-graph/affected/lock-file-changes.d.ts +0 -3
- package/dist/src/plugins/js/project-graph/affected/lock-file-changes.js +0 -150
- package/dist/src/plugins/js/project-graph/affected/npm-packages.d.ts +0 -4
- package/dist/src/plugins/js/project-graph/affected/npm-packages.js +0 -124
- package/dist/src/plugins/js/project-graph/affected/touched-projects.d.ts +0 -2
- package/dist/src/plugins/js/project-graph/affected/touched-projects.js +0 -18
- package/dist/src/plugins/js/project-graph/affected/tsconfig-json-changes.d.ts +0 -4
- package/dist/src/plugins/js/project-graph/affected/tsconfig-json-changes.js +0 -63
- package/dist/src/plugins/js/project-graph/build-dependencies/build-dependencies.d.ts +0 -6
- package/dist/src/plugins/js/project-graph/build-dependencies/build-dependencies.js +0 -45
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts +0 -4
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +0 -88
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.d.ts +0 -4
- package/dist/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +0 -75
- package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts +0 -81
- package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +0 -464
- package/dist/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.d.ts +0 -2
- package/dist/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.js +0 -31
- package/dist/src/plugins/js/utils/config.d.ts +0 -2
- package/dist/src/plugins/js/utils/config.js +0 -61
- package/dist/src/plugins/js/utils/get-workspace-packages-from-graph.d.ts +0 -2
- package/dist/src/plugins/js/utils/get-workspace-packages-from-graph.js +0 -13
- package/dist/src/plugins/js/utils/packages.d.ts +0 -8
- package/dist/src/plugins/js/utils/packages.js +0 -91
- package/dist/src/plugins/js/utils/register.d.ts +0 -350
- package/dist/src/plugins/js/utils/register.js +0 -1270
- package/dist/src/plugins/js/utils/resolve-relative-to-dir.d.ts +0 -5
- package/dist/src/plugins/js/utils/resolve-relative-to-dir.js +0 -17
- package/dist/src/plugins/js/utils/typescript.d.ts +0 -32
- package/dist/src/plugins/js/utils/typescript.js +0 -157
- package/dist/src/plugins/js/versions.d.ts +0 -1
- package/dist/src/plugins/js/versions.js +0 -4
- package/dist/src/plugins/package-json/create-nodes.d.ts +0 -28
- package/dist/src/plugins/package-json/create-nodes.js +0 -243
- package/dist/src/plugins/package-json/index.d.ts +0 -2
- package/dist/src/plugins/package-json/index.js +0 -6
- package/dist/src/plugins/project-json/build-nodes/project-json.d.ts +0 -5
- package/dist/src/plugins/project-json/build-nodes/project-json.js +0 -33
- package/dist/src/project-graph/affected/affected-project-graph-models.d.ts +0 -11
- package/dist/src/project-graph/affected/affected-project-graph-models.js +0 -2
- package/dist/src/project-graph/affected/affected-project-graph.d.ts +0 -4
- package/dist/src/project-graph/affected/affected-project-graph.js +0 -90
- package/dist/src/project-graph/affected/locators/project-glob-changes.d.ts +0 -2
- package/dist/src/project-graph/affected/locators/project-glob-changes.js +0 -47
- package/dist/src/project-graph/affected/locators/workspace-json-changes.d.ts +0 -4
- package/dist/src/project-graph/affected/locators/workspace-json-changes.js +0 -47
- package/dist/src/project-graph/affected/locators/workspace-projects.d.ts +0 -3
- package/dist/src/project-graph/affected/locators/workspace-projects.js +0 -74
- package/dist/src/project-graph/build-project-graph.d.ts +0 -26
- package/dist/src/project-graph/build-project-graph.js +0 -309
- package/dist/src/project-graph/error-types.d.ts +0 -151
- package/dist/src/project-graph/error-types.js +0 -484
- package/dist/src/project-graph/file-map-utils.d.ts +0 -18
- package/dist/src/project-graph/file-map-utils.js +0 -61
- package/dist/src/project-graph/file-utils.d.ts +0 -31
- package/dist/src/project-graph/file-utils.js +0 -187
- package/dist/src/project-graph/nx-deps-cache.d.ts +0 -62
- package/dist/src/project-graph/nx-deps-cache.js +0 -345
- package/dist/src/project-graph/operators.d.ts +0 -11
- package/dist/src/project-graph/operators.js +0 -70
- package/dist/src/project-graph/plugins/get-plugins.d.ts +0 -51
- package/dist/src/project-graph/plugins/get-plugins.js +0 -401
- package/dist/src/project-graph/plugins/in-process-loader.d.ts +0 -10
- package/dist/src/project-graph/plugins/in-process-loader.js +0 -61
- package/dist/src/project-graph/plugins/index.d.ts +0 -4
- package/dist/src/project-graph/plugins/index.js +0 -12
- package/dist/src/project-graph/plugins/isolation/enabled.d.ts +0 -1
- package/dist/src/project-graph/plugins/isolation/enabled.js +0 -19
- package/dist/src/project-graph/plugins/isolation/index.d.ts +0 -1
- package/dist/src/project-graph/plugins/isolation/index.js +0 -5
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.d.ts +0 -79
- package/dist/src/project-graph/plugins/isolation/isolated-plugin.js +0 -553
- package/dist/src/project-graph/plugins/isolation/load-isolated-plugin.d.ts +0 -3
- package/dist/src/project-graph/plugins/isolation/load-isolated-plugin.js +0 -24
- package/dist/src/project-graph/plugins/isolation/message-types.d.ts +0 -59
- package/dist/src/project-graph/plugins/isolation/message-types.js +0 -9
- package/dist/src/project-graph/plugins/isolation/messaging.d.ts +0 -155
- package/dist/src/project-graph/plugins/isolation/messaging.js +0 -87
- package/dist/src/project-graph/plugins/isolation/plugin-lifecycle-manager.d.ts +0 -82
- package/dist/src/project-graph/plugins/isolation/plugin-lifecycle-manager.js +0 -188
- package/dist/src/project-graph/plugins/isolation/plugin-worker.d.ts +0 -2
- package/dist/src/project-graph/plugins/isolation/plugin-worker.js +0 -221
- package/dist/src/project-graph/plugins/isolation/worker-streaming.d.ts +0 -14
- package/dist/src/project-graph/plugins/isolation/worker-streaming.js +0 -39
- package/dist/src/project-graph/plugins/load-resolved-plugin.d.ts +0 -3
- package/dist/src/project-graph/plugins/load-resolved-plugin.js +0 -24
- package/dist/src/project-graph/plugins/loaded-nx-plugin.d.ts +0 -41
- package/dist/src/project-graph/plugins/loaded-nx-plugin.js +0 -104
- package/dist/src/project-graph/plugins/public-api.d.ts +0 -139
- package/dist/src/project-graph/plugins/public-api.js +0 -4
- package/dist/src/project-graph/plugins/resolve-plugin.d.ts +0 -25
- package/dist/src/project-graph/plugins/resolve-plugin.js +0 -277
- package/dist/src/project-graph/plugins/tasks-execution-hooks.d.ts +0 -3
- package/dist/src/project-graph/plugins/tasks-execution-hooks.js +0 -67
- package/dist/src/project-graph/plugins/transpiler.d.ts +0 -20
- package/dist/src/project-graph/plugins/transpiler.js +0 -99
- package/dist/src/project-graph/plugins/utils.d.ts +0 -4
- package/dist/src/project-graph/plugins/utils.js +0 -32
- package/dist/src/project-graph/project-graph-builder.d.ts +0 -133
- package/dist/src/project-graph/project-graph-builder.js +0 -395
- package/dist/src/project-graph/project-graph.d.ts +0 -54
- package/dist/src/project-graph/project-graph.js +0 -460
- package/dist/src/project-graph/utils/build-all-workspace-files.d.ts +0 -2
- package/dist/src/project-graph/utils/build-all-workspace-files.js +0 -14
- package/dist/src/project-graph/utils/find-project-for-path.d.ts +0 -20
- package/dist/src/project-graph/utils/find-project-for-path.js +0 -55
- package/dist/src/project-graph/utils/implicit-project-dependencies.d.ts +0 -3
- package/dist/src/project-graph/utils/implicit-project-dependencies.js +0 -18
- package/dist/src/project-graph/utils/normalize-project-nodes.d.ts +0 -6
- package/dist/src/project-graph/utils/normalize-project-nodes.js +0 -117
- package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.d.ts +0 -48
- package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.js +0 -270
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.d.ts +0 -49
- package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.js +0 -296
- package/dist/src/project-graph/utils/project-configuration/source-maps.d.ts +0 -34
- package/dist/src/project-graph/utils/project-configuration/source-maps.js +0 -85
- package/dist/src/project-graph/utils/project-configuration/target-defaults.d.ts +0 -50
- package/dist/src/project-graph/utils/project-configuration/target-defaults.js +0 -466
- package/dist/src/project-graph/utils/project-configuration/target-merging.d.ts +0 -32
- package/dist/src/project-graph/utils/project-configuration/target-merging.js +0 -507
- package/dist/src/project-graph/utils/project-configuration/target-normalization.d.ts +0 -12
- package/dist/src/project-graph/utils/project-configuration/target-normalization.js +0 -313
- package/dist/src/project-graph/utils/project-configuration/utils.d.ts +0 -38
- package/dist/src/project-graph/utils/project-configuration/utils.js +0 -215
- package/dist/src/project-graph/utils/project-configuration-utils.d.ts +0 -86
- package/dist/src/project-graph/utils/project-configuration-utils.js +0 -325
- package/dist/src/project-graph/utils/retrieve-workspace-files.d.ts +0 -35
- package/dist/src/project-graph/utils/retrieve-workspace-files.js +0 -110
- package/dist/src/tasks-runner/batch/batch-messages.d.ts +0 -35
- package/dist/src/tasks-runner/batch/batch-messages.js +0 -9
- package/dist/src/tasks-runner/batch/run-batch.d.ts +0 -1
- package/dist/src/tasks-runner/batch/run-batch.js +0 -78
- package/dist/src/tasks-runner/cache.d.ts +0 -94
- package/dist/src/tasks-runner/cache.js +0 -604
- package/dist/src/tasks-runner/create-task-graph.d.ts +0 -41
- package/dist/src/tasks-runner/create-task-graph.js +0 -305
- package/dist/src/tasks-runner/default-tasks-runner.d.ts +0 -25
- package/dist/src/tasks-runner/default-tasks-runner.js +0 -74
- package/dist/src/tasks-runner/fork.d.ts +0 -1
- package/dist/src/tasks-runner/fork.js +0 -73
- package/dist/src/tasks-runner/forked-process-task-runner.d.ts +0 -42
- package/dist/src/tasks-runner/forked-process-task-runner.js +0 -299
- package/dist/src/tasks-runner/init-tasks-runner.d.ts +0 -7
- package/dist/src/tasks-runner/init-tasks-runner.js +0 -86
- package/dist/src/tasks-runner/is-tui-enabled.d.ts +0 -18
- package/dist/src/tasks-runner/is-tui-enabled.js +0 -93
- package/dist/src/tasks-runner/legacy-depends-on-warning.d.ts +0 -18
- package/dist/src/tasks-runner/legacy-depends-on-warning.js +0 -109
- package/dist/src/tasks-runner/life-cycle.d.ts +0 -86
- package/dist/src/tasks-runner/life-cycle.js +0 -148
- package/dist/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.d.ts +0 -25
- package/dist/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +0 -366
- package/dist/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.d.ts +0 -24
- package/dist/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +0 -238
- package/dist/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.d.ts +0 -5
- package/dist/src/tasks-runner/life-cycles/empty-terminal-output-life-cycle.js +0 -16
- package/dist/src/tasks-runner/life-cycles/formatting-utils.d.ts +0 -3
- package/dist/src/tasks-runner/life-cycles/formatting-utils.js +0 -55
- package/dist/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.d.ts +0 -13
- package/dist/src/tasks-runner/life-cycles/invoke-runner-terminal-output-life-cycle.js +0 -67
- package/dist/src/tasks-runner/life-cycles/performance-analysis.d.ts +0 -173
- package/dist/src/tasks-runner/life-cycles/performance-analysis.js +0 -508
- package/dist/src/tasks-runner/life-cycles/performance-life-cycle.d.ts +0 -59
- package/dist/src/tasks-runner/life-cycles/performance-life-cycle.js +0 -193
- package/dist/src/tasks-runner/life-cycles/performance-report.d.ts +0 -77
- package/dist/src/tasks-runner/life-cycles/performance-report.js +0 -428
- package/dist/src/tasks-runner/life-cycles/pretty-time.d.ts +0 -4
- package/dist/src/tasks-runner/life-cycles/pretty-time.js +0 -73
- package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.d.ts +0 -54
- package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +0 -203
- package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.d.ts +0 -54
- package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +0 -193
- package/dist/src/tasks-runner/life-cycles/store-run-information-life-cycle.d.ts +0 -17
- package/dist/src/tasks-runner/life-cycles/store-run-information-life-cycle.js +0 -87
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle-old.d.ts +0 -11
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle-old.js +0 -91
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle.d.ts +0 -16
- package/dist/src/tasks-runner/life-cycles/task-history-life-cycle.js +0 -112
- package/dist/src/tasks-runner/life-cycles/task-profiling-life-cycle.d.ts +0 -14
- package/dist/src/tasks-runner/life-cycles/task-profiling-life-cycle.js +0 -73
- package/dist/src/tasks-runner/life-cycles/task-results-life-cycle.d.ts +0 -6
- package/dist/src/tasks-runner/life-cycles/task-results-life-cycle.js +0 -17
- package/dist/src/tasks-runner/life-cycles/task-telemetry-life-cycle.d.ts +0 -9
- package/dist/src/tasks-runner/life-cycles/task-telemetry-life-cycle.js +0 -42
- package/dist/src/tasks-runner/life-cycles/task-timings-life-cycle.d.ts +0 -8
- package/dist/src/tasks-runner/life-cycles/task-timings-life-cycle.js +0 -39
- package/dist/src/tasks-runner/life-cycles/tui-summary-life-cycle.d.ts +0 -19
- package/dist/src/tasks-runner/life-cycles/tui-summary-life-cycle.js +0 -339
- package/dist/src/tasks-runner/life-cycles/view-logs-utils.d.ts +0 -1
- package/dist/src/tasks-runner/life-cycles/view-logs-utils.js +0 -15
- package/dist/src/tasks-runner/process-metrics-service.d.ts +0 -53
- package/dist/src/tasks-runner/process-metrics-service.js +0 -161
- package/dist/src/tasks-runner/pseudo-ipc.d.ts +0 -48
- package/dist/src/tasks-runner/pseudo-ipc.js +0 -157
- package/dist/src/tasks-runner/pseudo-terminal.d.ts +0 -72
- package/dist/src/tasks-runner/pseudo-terminal.js +0 -209
- package/dist/src/tasks-runner/remove-old-cache-records.d.ts +0 -1
- package/dist/src/tasks-runner/remove-old-cache-records.js +0 -60
- package/dist/src/tasks-runner/run-command.d.ts +0 -42
- package/dist/src/tasks-runner/run-command.js +0 -895
- package/dist/src/tasks-runner/running-tasks/batch-process.d.ts +0 -74
- package/dist/src/tasks-runner/running-tasks/batch-process.js +0 -263
- package/dist/src/tasks-runner/running-tasks/node-child-process.d.ts +0 -40
- package/dist/src/tasks-runner/running-tasks/node-child-process.js +0 -175
- package/dist/src/tasks-runner/running-tasks/noop-child-process.d.ts +0 -16
- package/dist/src/tasks-runner/running-tasks/noop-child-process.js +0 -22
- package/dist/src/tasks-runner/running-tasks/output-prefix.d.ts +0 -13
- package/dist/src/tasks-runner/running-tasks/output-prefix.js +0 -63
- package/dist/src/tasks-runner/running-tasks/running-task.d.ts +0 -11
- package/dist/src/tasks-runner/running-tasks/running-task.js +0 -6
- package/dist/src/tasks-runner/running-tasks/shared-running-task.d.ts +0 -14
- package/dist/src/tasks-runner/running-tasks/shared-running-task.js +0 -30
- package/dist/src/tasks-runner/task-env-paths.d.ts +0 -1
- package/dist/src/tasks-runner/task-env-paths.js +0 -45
- package/dist/src/tasks-runner/task-env.d.ts +0 -56
- package/dist/src/tasks-runner/task-env.js +0 -237
- package/dist/src/tasks-runner/task-graph-utils.d.ts +0 -30
- package/dist/src/tasks-runner/task-graph-utils.js +0 -225
- package/dist/src/tasks-runner/task-io-service.d.ts +0 -96
- package/dist/src/tasks-runner/task-io-service.js +0 -122
- package/dist/src/tasks-runner/task-orchestrator.d.ts +0 -260
- package/dist/src/tasks-runner/task-orchestrator.js +0 -1521
- package/dist/src/tasks-runner/tasks-runner.d.ts +0 -24
- package/dist/src/tasks-runner/tasks-runner.js +0 -2
- package/dist/src/tasks-runner/tasks-schedule.d.ts +0 -48
- package/dist/src/tasks-runner/tasks-schedule.js +0 -258
- package/dist/src/tasks-runner/utils.d.ts +0 -61
- package/dist/src/tasks-runner/utils.js +0 -447
- package/dist/src/utils/ab-testing.d.ts +0 -59
- package/dist/src/utils/ab-testing.js +0 -142
- package/dist/src/utils/acknowledge-build-scripts.d.ts +0 -13
- package/dist/src/utils/acknowledge-build-scripts.js +0 -102
- package/dist/src/utils/all-file-data.d.ts +0 -2
- package/dist/src/utils/all-file-data.js +0 -8
- package/dist/src/utils/analytics-enabled.d.ts +0 -7
- package/dist/src/utils/analytics-enabled.js +0 -11
- package/dist/src/utils/analytics-prompt.d.ts +0 -9
- package/dist/src/utils/analytics-prompt.js +0 -81
- package/dist/src/utils/assert-workspace-validity.d.ts +0 -3
- package/dist/src/utils/assert-workspace-validity.js +0 -90
- package/dist/src/utils/async-iterator.d.ts +0 -2
- package/dist/src/utils/async-iterator.js +0 -18
- package/dist/src/utils/binary-extensions.d.ts +0 -1
- package/dist/src/utils/binary-extensions.js +0 -279
- package/dist/src/utils/cache-directory.d.ts +0 -68
- package/dist/src/utils/cache-directory.js +0 -337
- package/dist/src/utils/call-sites.d.ts +0 -14
- package/dist/src/utils/call-sites.js +0 -28
- package/dist/src/utils/catalog/bun-manager-utils.d.ts +0 -8
- package/dist/src/utils/catalog/bun-manager-utils.js +0 -174
- package/dist/src/utils/catalog/bun-manager.d.ts +0 -28
- package/dist/src/utils/catalog/bun-manager.js +0 -130
- package/dist/src/utils/catalog/index.d.ts +0 -22
- package/dist/src/utils/catalog/index.js +0 -87
- package/dist/src/utils/catalog/manager-factory.d.ts +0 -5
- package/dist/src/utils/catalog/manager-factory.js +0 -23
- package/dist/src/utils/catalog/manager-utils.d.ts +0 -15
- package/dist/src/utils/catalog/manager-utils.js +0 -237
- package/dist/src/utils/catalog/manager.d.ts +0 -52
- package/dist/src/utils/catalog/manager.js +0 -43
- package/dist/src/utils/catalog/pnpm-manager.d.ts +0 -23
- package/dist/src/utils/catalog/pnpm-manager.js +0 -142
- package/dist/src/utils/catalog/types.d.ts +0 -15
- package/dist/src/utils/catalog/types.js +0 -2
- package/dist/src/utils/catalog/yarn-manager.d.ts +0 -26
- package/dist/src/utils/catalog/yarn-manager.js +0 -130
- package/dist/src/utils/child-process.d.ts +0 -52
- package/dist/src/utils/child-process.js +0 -194
- package/dist/src/utils/chunkify.d.ts +0 -17
- package/dist/src/utils/chunkify.js +0 -51
- package/dist/src/utils/code-frames.d.ts +0 -14
- package/dist/src/utils/code-frames.js +0 -116
- package/dist/src/utils/collapse-expanded-outputs.d.ts +0 -10
- package/dist/src/utils/collapse-expanded-outputs.js +0 -72
- package/dist/src/utils/command-line-utils.d.ts +0 -57
- package/dist/src/utils/command-line-utils.js +0 -259
- package/dist/src/utils/compile-cache.d.ts +0 -24
- package/dist/src/utils/compile-cache.js +0 -49
- package/dist/src/utils/consume-messages-from-socket.d.ts +0 -44
- package/dist/src/utils/consume-messages-from-socket.js +0 -291
- package/dist/src/utils/db-connection.d.ts +0 -14
- package/dist/src/utils/db-connection.js +0 -56
- package/dist/src/utils/default-base.d.ts +0 -1
- package/dist/src/utils/default-base.js +0 -17
- package/dist/src/utils/delayed-spinner.d.ts +0 -51
- package/dist/src/utils/delayed-spinner.js +0 -88
- package/dist/src/utils/dotenv.d.ts +0 -7
- package/dist/src/utils/dotenv.js +0 -19
- package/dist/src/utils/enable-compile-cache.d.ts +0 -1
- package/dist/src/utils/enable-compile-cache.js +0 -7
- package/dist/src/utils/exit-codes.d.ts +0 -24
- package/dist/src/utils/exit-codes.js +0 -94
- package/dist/src/utils/fileutils.d.ts +0 -72
- package/dist/src/utils/fileutils.js +0 -117
- package/dist/src/utils/find-matching-projects.d.ts +0 -18
- package/dist/src/utils/find-matching-projects.js +0 -222
- package/dist/src/utils/find-workspace-root.d.ts +0 -11
- package/dist/src/utils/find-workspace-root.js +0 -33
- package/dist/src/utils/formatters/index.d.ts +0 -13
- package/dist/src/utils/formatters/index.js +0 -74
- package/dist/src/utils/formatters/oxfmt.d.ts +0 -32
- package/dist/src/utils/formatters/oxfmt.js +0 -764
- package/dist/src/utils/formatters/prettier.d.ts +0 -26
- package/dist/src/utils/formatters/prettier.js +0 -201
- package/dist/src/utils/formatters/shared.d.ts +0 -5
- package/dist/src/utils/formatters/shared.js +0 -8
- package/dist/src/utils/get-package-name-from-import-path.d.ts +0 -1
- package/dist/src/utils/get-package-name-from-import-path.js +0 -17
- package/dist/src/utils/git-revision.d.ts +0 -12
- package/dist/src/utils/git-revision.js +0 -25
- package/dist/src/utils/git-utils.d.ts +0 -106
- package/dist/src/utils/git-utils.index-filter.d.ts +0 -1
- package/dist/src/utils/git-utils.index-filter.js +0 -23
- package/dist/src/utils/git-utils.js +0 -933
- package/dist/src/utils/git-utils.tree-filter.d.ts +0 -1
- package/dist/src/utils/git-utils.tree-filter.js +0 -47
- package/dist/src/utils/git-worktrees.d.ts +0 -30
- package/dist/src/utils/git-worktrees.js +0 -212
- package/dist/src/utils/globs.d.ts +0 -3
- package/dist/src/utils/globs.js +0 -18
- package/dist/src/utils/handle-errors.d.ts +0 -1
- package/dist/src/utils/handle-errors.js +0 -91
- package/dist/src/utils/handle-import.d.ts +0 -15
- package/dist/src/utils/handle-import.js +0 -86
- package/dist/src/utils/has-nx-js-plugin.d.ts +0 -9
- package/dist/src/utils/has-nx-js-plugin.js +0 -24
- package/dist/src/utils/ignore.d.ts +0 -178
- package/dist/src/utils/ignore.js +0 -294
- package/dist/src/utils/installation-directory.d.ts +0 -2
- package/dist/src/utils/installation-directory.js +0 -12
- package/dist/src/utils/installed-nx-version.d.ts +0 -23
- package/dist/src/utils/installed-nx-version.js +0 -113
- package/dist/src/utils/is-ci.d.ts +0 -1
- package/dist/src/utils/is-ci.js +0 -26
- package/dist/src/utils/is-sandbox.d.ts +0 -1
- package/dist/src/utils/is-sandbox.js +0 -11
- package/dist/src/utils/json-diff.d.ts +0 -18
- package/dist/src/utils/json-diff.js +0 -112
- package/dist/src/utils/json.d.ts +0 -44
- package/dist/src/utils/json.js +0 -62
- package/dist/src/utils/kill-child-on-host-exit.d.ts +0 -7
- package/dist/src/utils/kill-child-on-host-exit.js +0 -42
- package/dist/src/utils/legacy-task-history.d.ts +0 -8
- package/dist/src/utils/legacy-task-history.js +0 -87
- package/dist/src/utils/logger.d.ts +0 -23
- package/dist/src/utils/logger.js +0 -74
- package/dist/src/utils/long-running-target.d.ts +0 -10
- package/dist/src/utils/long-running-target.js +0 -19
- package/dist/src/utils/machine-id-cache.d.ts +0 -5
- package/dist/src/utils/machine-id-cache.js +0 -93
- package/dist/src/utils/min-release-age/behavior/bun.d.ts +0 -30
- package/dist/src/utils/min-release-age/behavior/bun.js +0 -274
- package/dist/src/utils/min-release-age/behavior/npm.d.ts +0 -21
- package/dist/src/utils/min-release-age/behavior/npm.js +0 -296
- package/dist/src/utils/min-release-age/behavior/pnpm.d.ts +0 -23
- package/dist/src/utils/min-release-age/behavior/pnpm.js +0 -527
- package/dist/src/utils/min-release-age/behavior/yarn.d.ts +0 -22
- package/dist/src/utils/min-release-age/behavior/yarn.js +0 -314
- package/dist/src/utils/min-release-age/constants.d.ts +0 -3
- package/dist/src/utils/min-release-age/constants.js +0 -8
- package/dist/src/utils/min-release-age/errors.d.ts +0 -28
- package/dist/src/utils/min-release-age/errors.js +0 -22
- package/dist/src/utils/min-release-age/packument.d.ts +0 -13
- package/dist/src/utils/min-release-age/packument.js +0 -34
- package/dist/src/utils/min-release-age/pick.d.ts +0 -72
- package/dist/src/utils/min-release-age/pick.js +0 -206
- package/dist/src/utils/min-release-age/pnpm-exclude-writer.d.ts +0 -12
- package/dist/src/utils/min-release-age/pnpm-exclude-writer.js +0 -58
- package/dist/src/utils/min-release-age/policy.d.ts +0 -38
- package/dist/src/utils/min-release-age/policy.js +0 -59
- package/dist/src/utils/min-release-age/resolve.d.ts +0 -8
- package/dist/src/utils/min-release-age/resolve.js +0 -14
- package/dist/src/utils/nx-cloud-utils.d.ts +0 -4
- package/dist/src/utils/nx-cloud-utils.js +0 -28
- package/dist/src/utils/nx-console-prompt.d.ts +0 -1
- package/dist/src/utils/nx-console-prompt.js +0 -61
- package/dist/src/utils/nx-key.d.ts +0 -6
- package/dist/src/utils/nx-key.js +0 -50
- package/dist/src/utils/nx-package-group.d.ts +0 -8
- package/dist/src/utils/nx-package-group.js +0 -15
- package/dist/src/utils/nx-tmp-dir.d.ts +0 -23
- package/dist/src/utils/nx-tmp-dir.js +0 -45
- package/dist/src/utils/object-sort.d.ts +0 -1
- package/dist/src/utils/object-sort.js +0 -9
- package/dist/src/utils/output.d.ts +0 -232
- package/dist/src/utils/output.js +0 -548
- package/dist/src/utils/owned-private-dir.d.ts +0 -145
- package/dist/src/utils/owned-private-dir.js +0 -362
- package/dist/src/utils/package-json.d.ts +0 -231
- package/dist/src/utils/package-json.js +0 -387
- package/dist/src/utils/package-manager-config/bunfig.d.ts +0 -14
- package/dist/src/utils/package-manager-config/bunfig.js +0 -49
- package/dist/src/utils/package-manager-config/npmrc.d.ts +0 -23
- package/dist/src/utils/package-manager-config/npmrc.js +0 -124
- package/dist/src/utils/package-manager-config/pnpm-config.d.ts +0 -17
- package/dist/src/utils/package-manager-config/pnpm-config.js +0 -60
- package/dist/src/utils/package-manager.d.ts +0 -161
- package/dist/src/utils/package-manager.js +0 -850
- package/dist/src/utils/params.d.ts +0 -146
- package/dist/src/utils/params.js +0 -768
- package/dist/src/utils/path.d.ts +0 -19
- package/dist/src/utils/path.js +0 -38
- package/dist/src/utils/perf-hooks.d.ts +0 -19
- package/dist/src/utils/perf-logging.d.ts +0 -1
- package/dist/src/utils/perf-logging.js +0 -46
- package/dist/src/utils/permission-errors.d.ts +0 -11
- package/dist/src/utils/permission-errors.js +0 -17
- package/dist/src/utils/plugin-cache-utils.d.ts +0 -82
- package/dist/src/utils/plugin-cache-utils.js +0 -212
- package/dist/src/utils/plugin-progress-text.d.ts +0 -1
- package/dist/src/utils/plugin-progress-text.js +0 -15
- package/dist/src/utils/plugins/atomizer-utils.d.ts +0 -11
- package/dist/src/utils/plugins/atomizer-utils.js +0 -23
- package/dist/src/utils/plugins/core-plugins.d.ts +0 -6
- package/dist/src/utils/plugins/core-plugins.js +0 -117
- package/dist/src/utils/plugins/index.d.ts +0 -5
- package/dist/src/utils/plugins/index.js +0 -15
- package/dist/src/utils/plugins/installed-plugins.d.ts +0 -5
- package/dist/src/utils/plugins/installed-plugins.js +0 -76
- package/dist/src/utils/plugins/local-plugins.d.ts +0 -22
- package/dist/src/utils/plugins/local-plugins.js +0 -60
- package/dist/src/utils/plugins/output.d.ts +0 -34
- package/dist/src/utils/plugins/output.js +0 -201
- package/dist/src/utils/plugins/plugin-capabilities.d.ts +0 -15
- package/dist/src/utils/plugins/plugin-capabilities.js +0 -78
- package/dist/src/utils/pnpm-workspace.d.ts +0 -8
- package/dist/src/utils/pnpm-workspace.js +0 -2
- package/dist/src/utils/print-help.d.ts +0 -11
- package/dist/src/utils/print-help.js +0 -259
- package/dist/src/utils/progress-topics.d.ts +0 -19
- package/dist/src/utils/progress-topics.js +0 -21
- package/dist/src/utils/project-graph-utils.d.ts +0 -18
- package/dist/src/utils/project-graph-utils.js +0 -78
- package/dist/src/utils/promised-based-queue.d.ts +0 -6
- package/dist/src/utils/promised-based-queue.js +0 -43
- package/dist/src/utils/prompt-helpers.d.ts +0 -53
- package/dist/src/utils/prompt-helpers.js +0 -111
- package/dist/src/utils/provenance.d.ts +0 -47
- package/dist/src/utils/provenance.js +0 -107
- package/dist/src/utils/registry-config/bun.d.ts +0 -2
- package/dist/src/utils/registry-config/bun.js +0 -257
- package/dist/src/utils/registry-config/index.d.ts +0 -13
- package/dist/src/utils/registry-config/index.js +0 -102
- package/dist/src/utils/registry-config/pnpm.d.ts +0 -2
- package/dist/src/utils/registry-config/pnpm.js +0 -1551
- package/dist/src/utils/registry-config/utils.d.ts +0 -195
- package/dist/src/utils/registry-config/utils.js +0 -496
- package/dist/src/utils/registry-config/yarn-berry.d.ts +0 -2
- package/dist/src/utils/registry-config/yarn-berry.js +0 -612
- package/dist/src/utils/registry-config/yarn-classic.d.ts +0 -2
- package/dist/src/utils/registry-config/yarn-classic.js +0 -1001
- package/dist/src/utils/require-nx-key.d.ts +0 -1
- package/dist/src/utils/require-nx-key.js +0 -23
- package/dist/src/utils/safe-spawn.d.ts +0 -24
- package/dist/src/utils/safe-spawn.js +0 -104
- package/dist/src/utils/serializable-error.d.ts +0 -4
- package/dist/src/utils/serializable-error.js +0 -33
- package/dist/src/utils/serialize-overrides-into-command-line.d.ts +0 -3
- package/dist/src/utils/serialize-overrides-into-command-line.js +0 -41
- package/dist/src/utils/serialize-target.d.ts +0 -1
- package/dist/src/utils/serialize-target.js +0 -6
- package/dist/src/utils/shell-quoting.d.ts +0 -25
- package/dist/src/utils/shell-quoting.js +0 -76
- package/dist/src/utils/socket-refused-exit-code.d.ts +0 -15
- package/dist/src/utils/socket-refused-exit-code.js +0 -18
- package/dist/src/utils/spinner.d.ts +0 -24
- package/dist/src/utils/spinner.js +0 -77
- package/dist/src/utils/split-target.d.ts +0 -15
- package/dist/src/utils/split-target.js +0 -239
- package/dist/src/utils/strip-indents.d.ts +0 -14
- package/dist/src/utils/strip-indents.js +0 -23
- package/dist/src/utils/sync-generators.d.ts +0 -66
- package/dist/src/utils/sync-generators.js +0 -355
- package/dist/src/utils/tar.d.ts +0 -8
- package/dist/src/utils/tar.js +0 -44
- package/dist/src/utils/task-history.d.ts +0 -17
- package/dist/src/utils/task-history.js +0 -51
- package/dist/src/utils/terminal-link.d.ts +0 -20
- package/dist/src/utils/terminal-link.js +0 -85
- package/dist/src/utils/update-nxw.d.ts +0 -2
- package/dist/src/utils/update-nxw.js +0 -22
- package/dist/src/utils/versions.d.ts +0 -1
- package/dist/src/utils/versions.js +0 -4
- package/dist/src/utils/wait-for-socket-connection.d.ts +0 -26
- package/dist/src/utils/wait-for-socket-connection.js +0 -59
- package/dist/src/utils/workspace-context.d.ts +0 -21
- package/dist/src/utils/workspace-context.js +0 -120
- package/dist/src/utils/workspace-id.d.ts +0 -20
- package/dist/src/utils/workspace-id.js +0 -54
- package/dist/src/utils/workspace-root.d.ts +0 -6
- package/dist/src/utils/workspace-root.js +0 -40
- package/dist/src/utils/write-formatted-json-file.d.ts +0 -7
- package/dist/src/utils/write-formatted-json-file.js +0 -24
- package/dist/src/utils/yarn-syml/index.d.ts +0 -23
- package/dist/src/utils/yarn-syml/index.js +0 -151
- package/dist/src/utils/yarn-syml/syml-grammar.js +0 -1911
- package/dist/tasks-runners/default.d.ts +0 -1
- package/dist/tasks-runners/default.js +0 -5
- package/executors.json +0 -19
- package/generators.json +0 -16
- package/migrations.json +0 -195
- package/schemas/migrations-schema.json +0 -186
- package/schemas/nx-schema.json +0 -1615
- package/schemas/project-schema.json +0 -426
- package/schemas/workspace-schema.json +0 -185
|
@@ -1,1270 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NODENEXT_ESM_RESOLVER_SOURCE = void 0;
|
|
4
|
-
exports.forceRegisterEsmLoader = forceRegisterEsmLoader;
|
|
5
|
-
exports.resolveTsNodeEsmCompilerOptions = resolveTsNodeEsmCompilerOptions;
|
|
6
|
-
exports.nodeNextEsmResolveHook = nodeNextEsmResolveHook;
|
|
7
|
-
exports.ensureNodeNextEsmResolverRegistered = ensureNodeNextEsmResolverRegistered;
|
|
8
|
-
exports.ensureCjsResolverPatched = ensureCjsResolverPatched;
|
|
9
|
-
exports.ensureResolveConditionsInjected = ensureResolveConditionsInjected;
|
|
10
|
-
exports.isNativeStripPreferred = isNativeStripPreferred;
|
|
11
|
-
exports.registerTsProject = registerTsProject;
|
|
12
|
-
exports.getSwcTranspiler = getSwcTranspiler;
|
|
13
|
-
exports.getTsNodeTranspiler = getTsNodeTranspiler;
|
|
14
|
-
exports.getTranspiler = getTranspiler;
|
|
15
|
-
exports.isNativeTypeStripError = isNativeTypeStripError;
|
|
16
|
-
exports.isCjsSyntaxError = isCjsSyntaxError;
|
|
17
|
-
exports.isRequireInEsmScopeError = isRequireInEsmScopeError;
|
|
18
|
-
exports.isTsEsmSyntaxError = isTsEsmSyntaxError;
|
|
19
|
-
exports.isTsEsmNamedExportLinkageError = isTsEsmNamedExportLinkageError;
|
|
20
|
-
exports.loadTsFile = loadTsFile;
|
|
21
|
-
exports.requireWithTsconfigFallback = requireWithTsconfigFallback;
|
|
22
|
-
exports.registerTranspiler = registerTranspiler;
|
|
23
|
-
exports.registerTsConfigPaths = registerTsConfigPaths;
|
|
24
|
-
exports.getTsNodeCompilerOptions = getTsNodeCompilerOptions;
|
|
25
|
-
const path_1 = require("path");
|
|
26
|
-
const fs_1 = require("fs");
|
|
27
|
-
const logger_1 = require("../../../utils/logger");
|
|
28
|
-
const workspace_root_1 = require("../../../utils/workspace-root");
|
|
29
|
-
const typescript_1 = require("./typescript");
|
|
30
|
-
const swcNodeInstalled = packageIsInstalled('@swc-node/register');
|
|
31
|
-
const tsNodeInstalled = packageIsInstalled('ts-node/register');
|
|
32
|
-
let ts;
|
|
33
|
-
let isTsEsmLoaderRegistered = false;
|
|
34
|
-
/**
|
|
35
|
-
* Force-register an ESM loader (`@swc-node/register/esm` if available, else
|
|
36
|
-
* `ts-node/esm`) via `Module.register` so dynamic `import()` of TS files
|
|
37
|
-
* goes through a transpiler.
|
|
38
|
-
*
|
|
39
|
-
* **IMPORTANT — global side effect:** `Module.register` is one-shot per
|
|
40
|
-
* process and applies to *every* subsequent ESM resolution in the process.
|
|
41
|
-
* Calling this trades native Node.js TypeScript stripping for transpiled
|
|
42
|
-
* loading on the dynamic-import path for the rest of the run. CJS
|
|
43
|
-
* `require()` is unaffected (different hook), so `.cts` files via require
|
|
44
|
-
* keep using native strip + swc-node's `Module._extensions` hook.
|
|
45
|
-
*
|
|
46
|
-
* Required for the niche case where an ESM config (`.mts` or `.ts` resolved
|
|
47
|
-
* as ESM) combines top-level await with TypeScript syntax that native strip
|
|
48
|
-
* can't handle (`enum`, runtime `namespace`, etc.). TLA forces dynamic
|
|
49
|
-
* `import()`, which bypasses the CJS hook chain - the only way to intercept
|
|
50
|
-
* is `Module.register`.
|
|
51
|
-
*
|
|
52
|
-
* Idempotent: subsequent calls are no-ops.
|
|
53
|
-
*
|
|
54
|
-
* Throws if neither `@swc-node/register` nor `ts-node` is installed.
|
|
55
|
-
*/
|
|
56
|
-
function forceRegisterEsmLoader() {
|
|
57
|
-
ensureEsmLoaderRegistered({ required: true });
|
|
58
|
-
}
|
|
59
|
-
function ensureEsmLoaderRegistered(opts) {
|
|
60
|
-
if (isTsEsmLoaderRegistered)
|
|
61
|
-
return;
|
|
62
|
-
const module = require('node:module');
|
|
63
|
-
if (typeof module.register !== 'function') {
|
|
64
|
-
if (opts.required) {
|
|
65
|
-
throw new Error(`${logger_1.NX_PREFIX} Module.register is not available in this Node.js version - cannot register an ESM loader for the TypeScript fallback. ${STRIP_TYPES_OPT_OUT_HINT}`);
|
|
66
|
-
}
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
// Prefer @swc-node/register/esm (faster) over ts-node/esm.
|
|
70
|
-
const swcEsm = tryResolveLoader('@swc-node/register/esm');
|
|
71
|
-
const tsNodeEsm = tryResolveLoader('ts-node/esm');
|
|
72
|
-
const loaderPath = swcEsm ?? tsNodeEsm;
|
|
73
|
-
if (!loaderPath) {
|
|
74
|
-
if (opts.required) {
|
|
75
|
-
throw new Error(`${logger_1.NX_PREFIX} Cannot register an ESM TypeScript loader to fall back from native stripping. Install @swc-node/register or ts-node, or ${STRIP_TYPES_OPT_OUT_HINT}`);
|
|
76
|
-
}
|
|
77
|
-
isTsEsmLoaderRegistered = true;
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
if (process.env.NX_VERBOSE_LOGGING === 'true') {
|
|
81
|
-
const loaderName = swcEsm ? '@swc-node/register/esm' : 'ts-node/esm';
|
|
82
|
-
logger_1.logger.warn((0, logger_1.stripIndent)(`${logger_1.NX_PREFIX} Registering ESM TypeScript loader ${loaderName}. All subsequent ESM imports in this process will go through it - native Node.js TypeScript stripping is forfeited for the dynamic-import path.`));
|
|
83
|
-
}
|
|
84
|
-
const url = require('node:url');
|
|
85
|
-
if (!swcEsm) {
|
|
86
|
-
// ts-node/esm reads TS_NODE_COMPILER_OPTIONS from its hooks thread, which
|
|
87
|
-
// snapshots process.env only when the first hook in the process registers,
|
|
88
|
-
// possibly long before this call. A registered setter module runs on the
|
|
89
|
-
// hooks thread itself, so the value lands there without mutating this
|
|
90
|
-
// process's env (which an existing hooks thread would never see, and
|
|
91
|
-
// child processes would inherit).
|
|
92
|
-
module.register('data:text/javascript,' +
|
|
93
|
-
encodeURIComponent(`process.env.TS_NODE_COMPILER_OPTIONS = ${JSON.stringify(resolveTsNodeEsmCompilerOptions(process.env.TS_NODE_COMPILER_OPTIONS))};`));
|
|
94
|
-
}
|
|
95
|
-
module.register(url.pathToFileURL(loaderPath));
|
|
96
|
-
isTsEsmLoaderRegistered = true;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Effective `TS_NODE_COMPILER_OPTIONS` value for `ts-node/esm`. CommonJS emit
|
|
100
|
-
* can never work for the true-ESM loads the loader exists for (`import.meta`
|
|
101
|
-
* fails with TS1343), and CommonJS-format files are deferred to the `require`
|
|
102
|
-
* pipeline untouched, so `module`/`moduleResolution` are forced to `nodenext`
|
|
103
|
-
* over any inherited value. Values that are not a JSON object pass through
|
|
104
|
-
* unchanged for ts-node to handle.
|
|
105
|
-
*
|
|
106
|
-
* Exported so the merge semantics can be exercised directly in unit tests.
|
|
107
|
-
*/
|
|
108
|
-
function resolveTsNodeEsmCompilerOptions(raw) {
|
|
109
|
-
if (raw === undefined) {
|
|
110
|
-
return JSON.stringify({ moduleResolution: 'nodenext', module: 'nodenext' });
|
|
111
|
-
}
|
|
112
|
-
try {
|
|
113
|
-
const parsed = JSON.parse(raw);
|
|
114
|
-
if (typeof parsed === 'object' &&
|
|
115
|
-
parsed !== null &&
|
|
116
|
-
!Array.isArray(parsed)) {
|
|
117
|
-
return JSON.stringify({
|
|
118
|
-
...parsed,
|
|
119
|
-
module: 'nodenext',
|
|
120
|
-
moduleResolution: 'nodenext',
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
catch { }
|
|
125
|
-
return raw;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Source of a minimal ESM resolution hook that rewrites TypeScript NodeNext
|
|
129
|
-
* `.js`/`.mjs`/`.cjs` relative specifiers to their `.ts`/`.mts`/`.cts` sources.
|
|
130
|
-
* Inlined as a string so it can be registered as a self-contained `data:`
|
|
131
|
-
* module - it relies only on Node's default resolver (no ts-node/swc-node) and
|
|
132
|
-
* defers loading to Node's native TypeScript stripping. The ESM counterpart to
|
|
133
|
-
* the CJS `ensureCjsResolverPatched`.
|
|
134
|
-
*
|
|
135
|
-
* Only rewrites when the default resolution fails with ERR_MODULE_NOT_FOUND,
|
|
136
|
-
* the importing module is itself TypeScript, and the specifier is relative, so
|
|
137
|
-
* it never hijacks resolution that would otherwise succeed.
|
|
138
|
-
*
|
|
139
|
-
* Used only as the fallback for runtimes without `module.registerHooks()`
|
|
140
|
-
* (Node < 22.15 / < 23.5); newer runtimes register the in-thread synchronous
|
|
141
|
-
* twin `nodeNextEsmResolveHook` instead. Keep the two in sync.
|
|
142
|
-
*
|
|
143
|
-
* Exported so the hook can be exercised directly in unit tests.
|
|
144
|
-
*/
|
|
145
|
-
exports.NODENEXT_ESM_RESOLVER_SOURCE = `
|
|
146
|
-
const EXT_FALLBACK = { '.js': ['.ts', '.tsx'], '.mjs': ['.mts'], '.cjs': ['.cts'] };
|
|
147
|
-
const TS_PARENT_RE = /\\.(?:ts|tsx|mts|cts)(?:$|\\?)/;
|
|
148
|
-
export async function resolve(specifier, context, nextResolve) {
|
|
149
|
-
try {
|
|
150
|
-
return await nextResolve(specifier, context);
|
|
151
|
-
} catch (err) {
|
|
152
|
-
if (err?.code !== 'ERR_MODULE_NOT_FOUND') throw err;
|
|
153
|
-
const parent = context.parentURL;
|
|
154
|
-
if (!parent || !TS_PARENT_RE.test(parent)) throw err;
|
|
155
|
-
if (!(specifier.startsWith('./') || specifier.startsWith('../') || specifier.startsWith('file:'))) throw err;
|
|
156
|
-
const m = specifier.match(/(\\.(?:js|mjs|cjs))($|\\?)/);
|
|
157
|
-
if (!m) throw err;
|
|
158
|
-
const fallbacks = EXT_FALLBACK[m[1]];
|
|
159
|
-
if (!fallbacks) throw err;
|
|
160
|
-
const base = specifier.slice(0, m.index);
|
|
161
|
-
const suffix = specifier.slice(m.index + m[1].length);
|
|
162
|
-
for (const ext of fallbacks) {
|
|
163
|
-
try { return await nextResolve(base + ext + suffix, context); } catch {}
|
|
164
|
-
}
|
|
165
|
-
throw err;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
`;
|
|
169
|
-
const NODENEXT_EXT_FALLBACK = {
|
|
170
|
-
'.js': ['.ts', '.tsx'],
|
|
171
|
-
'.mjs': ['.mts'],
|
|
172
|
-
'.cjs': ['.cts'],
|
|
173
|
-
};
|
|
174
|
-
const NODENEXT_TS_PARENT_RE = /\.(?:ts|tsx|mts|cts)(?:$|\?)/;
|
|
175
|
-
/**
|
|
176
|
-
* Synchronous in-thread twin of `NODENEXT_ESM_RESOLVER_SOURCE` for
|
|
177
|
-
* `module.registerHooks()`: `nextResolve` throws synchronously rather than
|
|
178
|
-
* rejecting, so this uses try/catch instead of `await`. Keep the two in sync.
|
|
179
|
-
* Exported for unit tests.
|
|
180
|
-
*/
|
|
181
|
-
function nodeNextEsmResolveHook(specifier, context, nextResolve) {
|
|
182
|
-
try {
|
|
183
|
-
return nextResolve(specifier, context);
|
|
184
|
-
}
|
|
185
|
-
catch (err) {
|
|
186
|
-
if (err?.code !== 'ERR_MODULE_NOT_FOUND')
|
|
187
|
-
throw err;
|
|
188
|
-
const parent = context.parentURL;
|
|
189
|
-
if (!parent || !NODENEXT_TS_PARENT_RE.test(parent))
|
|
190
|
-
throw err;
|
|
191
|
-
if (!(specifier.startsWith('./') ||
|
|
192
|
-
specifier.startsWith('../') ||
|
|
193
|
-
specifier.startsWith('file:'))) {
|
|
194
|
-
throw err;
|
|
195
|
-
}
|
|
196
|
-
const m = specifier.match(/(\.(?:js|mjs|cjs))($|\?)/);
|
|
197
|
-
if (!m)
|
|
198
|
-
throw err;
|
|
199
|
-
const fallbacks = NODENEXT_EXT_FALLBACK[m[1]];
|
|
200
|
-
if (!fallbacks)
|
|
201
|
-
throw err;
|
|
202
|
-
const base = specifier.slice(0, m.index);
|
|
203
|
-
const suffix = specifier.slice(m.index + m[1].length);
|
|
204
|
-
for (const ext of fallbacks) {
|
|
205
|
-
try {
|
|
206
|
-
return nextResolve(base + ext + suffix, context);
|
|
207
|
-
}
|
|
208
|
-
catch {
|
|
209
|
-
// try the next fallback
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
throw err;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
let nodeNextEsmResolverRegistered = false;
|
|
216
|
-
/**
|
|
217
|
-
* Register an ESM resolution hook that rewrites TypeScript NodeNext-style
|
|
218
|
-
* `.js`/`.mjs`/`.cjs` relative specifiers to their `.ts`/`.mts`/`.cts` sources.
|
|
219
|
-
* This is the ESM counterpart to `ensureCjsResolverPatched`: Node's native type
|
|
220
|
-
* stripping loads the `.ts` file, but neither native strip nor Node's ESM
|
|
221
|
-
* resolver rewrites the extension, so `import './foo.js'` from a `.ts` source
|
|
222
|
-
* where only `foo.ts` exists fails with ERR_MODULE_NOT_FOUND without it.
|
|
223
|
-
*
|
|
224
|
-
* Prefers `module.registerHooks()` (Node 22.15+ / 23.5+), passing the in-thread
|
|
225
|
-
* `nodeNextEsmResolveHook`. Falls back to `module.register()` with the inlined
|
|
226
|
-
* `data:` module (`NODENEXT_ESM_RESOLVER_SOURCE`) on older runtimes that lack
|
|
227
|
-
* `registerHooks` - `module.register()` emits a runtime DeprecationWarning
|
|
228
|
-
* (DEP0205) on Node 25.9+/26+, so it is only used when nothing better exists.
|
|
229
|
-
* Either way the hook relies only on Node's default resolver - no
|
|
230
|
-
* ts-node/swc-node.
|
|
231
|
-
*
|
|
232
|
-
* Idempotent and best-effort: a no-op when no registration API is available,
|
|
233
|
-
* when a TypeScript transpiler is already preloaded (see
|
|
234
|
-
* `isTsTranspilerPreloaded`), or if registration fails.
|
|
235
|
-
*/
|
|
236
|
-
function ensureNodeNextEsmResolverRegistered() {
|
|
237
|
-
if (nodeNextEsmResolverRegistered)
|
|
238
|
-
return;
|
|
239
|
-
nodeNextEsmResolverRegistered = true;
|
|
240
|
-
const module = require('node:module');
|
|
241
|
-
// Skip when a transpiler was preloaded via `--require`/`--import` (e.g.
|
|
242
|
-
// `--require ts-node/register`, which Nx uses only when it runs from `.ts`
|
|
243
|
-
// source). The `module.register()` fallback below spins up a loader-hook
|
|
244
|
-
// worker thread on which Node re-runs those preloads, resolved relative to
|
|
245
|
-
// the *current* working directory - and Nx plugin workers `chdir()` into the
|
|
246
|
-
// analyzed workspace first. If that workspace can't resolve the preloaded
|
|
247
|
-
// module, the loader worker throws and can leave module resolution in a bad
|
|
248
|
-
// state, so we must avoid the call entirely; catching it is not a clean
|
|
249
|
-
// recovery. `module.registerHooks()` runs in-thread with no such worker, but
|
|
250
|
-
// we keep the skip uniform so resolver coverage doesn't vary by Node version.
|
|
251
|
-
//
|
|
252
|
-
// Consequence: in that from-`.ts`-source invocation a `type: module` plugin
|
|
253
|
-
// using NodeNext `.js` specifiers won't get this resolver (a preloaded
|
|
254
|
-
// `ts-node` does NOT rewrite `.js` -> `.ts` for ESM). Published Nx is
|
|
255
|
-
// unaffected - its workers run compiled `.js` with no preload.
|
|
256
|
-
if (isTsTranspilerPreloaded())
|
|
257
|
-
return;
|
|
258
|
-
// Synchronous in-thread hooks (Node 22.15+ / 23.5+). Preferred because
|
|
259
|
-
// `module.register()` is deprecated (DEP0205) from Node 25.9+/26+.
|
|
260
|
-
const registerHooks = module.registerHooks;
|
|
261
|
-
if (typeof registerHooks === 'function') {
|
|
262
|
-
try {
|
|
263
|
-
registerHooks.call(module, { resolve: nodeNextEsmResolveHook });
|
|
264
|
-
}
|
|
265
|
-
catch {
|
|
266
|
-
// Best-effort: leave Node's native handling in place rather than failing.
|
|
267
|
-
}
|
|
268
|
-
return;
|
|
269
|
-
}
|
|
270
|
-
if (typeof module.register !== 'function')
|
|
271
|
-
return;
|
|
272
|
-
try {
|
|
273
|
-
module.register('data:text/javascript,' + encodeURIComponent(exports.NODENEXT_ESM_RESOLVER_SOURCE));
|
|
274
|
-
}
|
|
275
|
-
catch {
|
|
276
|
-
// Best-effort: leave Node's native handling in place for the
|
|
277
|
-
// dynamic-import path rather than failing the load.
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Whether this process was started with a TypeScript transpiler preloaded via
|
|
282
|
-
* a `--require`/`--import`/`--loader` flag (e.g. `--require ts-node/register`),
|
|
283
|
-
* either directly in `process.execArgv` or through `NODE_OPTIONS`. Used to skip
|
|
284
|
-
* a redundant ESM loader registration that would otherwise crash a loader-hook
|
|
285
|
-
* worker re-running the preload from a `chdir()`'d cwd - see
|
|
286
|
-
* `ensureNodeNextEsmResolverRegistered`.
|
|
287
|
-
*/
|
|
288
|
-
function isTsTranspilerPreloaded() {
|
|
289
|
-
const PRELOAD_FLAGS = [
|
|
290
|
-
'-r',
|
|
291
|
-
'--require',
|
|
292
|
-
'--import',
|
|
293
|
-
'--loader',
|
|
294
|
-
'--experimental-loader',
|
|
295
|
-
];
|
|
296
|
-
const TRANSPILER_RE = /(?:ts-node|@?swc-node)/;
|
|
297
|
-
// Flags passed directly (e.g. spawn(..., ['--require', 'ts-node/register'])).
|
|
298
|
-
const execArgv = process.execArgv ?? [];
|
|
299
|
-
for (let i = 0; i < execArgv.length; i++) {
|
|
300
|
-
const arg = execArgv[i];
|
|
301
|
-
const eqIdx = arg.indexOf('=');
|
|
302
|
-
if (eqIdx !== -1) {
|
|
303
|
-
if (PRELOAD_FLAGS.includes(arg.slice(0, eqIdx)) &&
|
|
304
|
-
TRANSPILER_RE.test(arg.slice(eqIdx + 1))) {
|
|
305
|
-
return true;
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
else if (PRELOAD_FLAGS.includes(arg) &&
|
|
309
|
-
TRANSPILER_RE.test(execArgv[i + 1] ?? '')) {
|
|
310
|
-
return true;
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
// Preloads passed via NODE_OPTIONS don't surface in execArgv.
|
|
314
|
-
const nodeOptions = process.env.NODE_OPTIONS;
|
|
315
|
-
if (nodeOptions &&
|
|
316
|
-
TRANSPILER_RE.test(nodeOptions) &&
|
|
317
|
-
PRELOAD_FLAGS.some((flag) => nodeOptions.includes(flag))) {
|
|
318
|
-
return true;
|
|
319
|
-
}
|
|
320
|
-
return false;
|
|
321
|
-
}
|
|
322
|
-
let cjsResolverPatched = false;
|
|
323
|
-
/**
|
|
324
|
-
* Patches Node's CJS resolver to fall back from `.js`/`.mjs`/`.cjs` to the
|
|
325
|
-
* corresponding TypeScript source extension (`.ts`/`.tsx`, `.mts`, `.cts`)
|
|
326
|
-
* when the requesting file is itself a `.ts`/`.tsx`/`.mts`/`.cts` source.
|
|
327
|
-
*
|
|
328
|
-
* Required for TypeScript NodeNext-style relative imports: `import './foo.js'`
|
|
329
|
-
* inside a `.ts` file resolves to `./foo.ts` at compile time, but the `.js`
|
|
330
|
-
* specifier survives transpilation to CJS. Node's native CJS resolver doesn't
|
|
331
|
-
* rewrite extensions and there is no officially-supported Node API for this —
|
|
332
|
-
* Node's native strip-types deliberately doesn't either — so a resolver patch
|
|
333
|
-
* is the prevailing solution in the ecosystem (used by `tsx` and ts-node's
|
|
334
|
-
* `experimentalResolver`).
|
|
335
|
-
*
|
|
336
|
-
* Patches `Module._resolveFilename` (not `_findPath`, matching tsx's narrower
|
|
337
|
-
* surface). Gates on the requesting file being TS so vanilla `.js` code
|
|
338
|
-
* requesting missing `.js` files keeps failing — no silent hijack. Only fires
|
|
339
|
-
* the fallback on `MODULE_NOT_FOUND` so existing `.js` resolution is
|
|
340
|
-
* unaffected when both files exist. Idempotent on repeat calls.
|
|
341
|
-
*/
|
|
342
|
-
function ensureCjsResolverPatched() {
|
|
343
|
-
if (cjsResolverPatched)
|
|
344
|
-
return;
|
|
345
|
-
cjsResolverPatched = true;
|
|
346
|
-
const Module = require('node:module');
|
|
347
|
-
const original = Module._resolveFilename;
|
|
348
|
-
if (typeof original !== 'function')
|
|
349
|
-
return;
|
|
350
|
-
const TS_PARENT_RE = /\.(?:ts|tsx|mts|cts)$/;
|
|
351
|
-
const EXT_FALLBACK = {
|
|
352
|
-
'.js': ['.ts', '.tsx'],
|
|
353
|
-
'.mjs': ['.mts'],
|
|
354
|
-
'.cjs': ['.cts'],
|
|
355
|
-
};
|
|
356
|
-
Module._resolveFilename = function (request, parent, ...rest) {
|
|
357
|
-
try {
|
|
358
|
-
return original.call(this, request, parent, ...rest);
|
|
359
|
-
}
|
|
360
|
-
catch (err) {
|
|
361
|
-
if (err?.code !== 'MODULE_NOT_FOUND')
|
|
362
|
-
throw err;
|
|
363
|
-
if (!parent?.filename || !TS_PARENT_RE.test(parent.filename))
|
|
364
|
-
throw err;
|
|
365
|
-
const match = request.match(/(\.(?:js|mjs|cjs))$/);
|
|
366
|
-
if (!match)
|
|
367
|
-
throw err;
|
|
368
|
-
const fallbacks = EXT_FALLBACK[match[1]];
|
|
369
|
-
if (!fallbacks)
|
|
370
|
-
throw err;
|
|
371
|
-
const base = request.slice(0, -match[1].length);
|
|
372
|
-
for (const ext of fallbacks) {
|
|
373
|
-
try {
|
|
374
|
-
return original.call(this, base + ext, parent, ...rest);
|
|
375
|
-
}
|
|
376
|
-
catch {
|
|
377
|
-
// try the next fallback
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
throw err;
|
|
381
|
-
}
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
function tryResolveLoader(specifier) {
|
|
385
|
-
try {
|
|
386
|
-
return require.resolve(specifier);
|
|
387
|
-
}
|
|
388
|
-
catch {
|
|
389
|
-
return null;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
/**
|
|
393
|
-
* tsx is a utility to run TypeScript files in node which is growing in popularity:
|
|
394
|
-
* https://tsx.is
|
|
395
|
-
*
|
|
396
|
-
* Behind the scenes it is invoking node with relevant --require and --import flags.
|
|
397
|
-
*
|
|
398
|
-
* If the user is invoking Nx via a script which is being invoked via tsx, then we
|
|
399
|
-
* do not need to register any transpiler at all as the environment will have already
|
|
400
|
-
* been configured by tsx. In fact, registering a transpiler such as ts-node or swc
|
|
401
|
-
* in this case causes issues.
|
|
402
|
-
*
|
|
403
|
-
* Because node is being invoked by tsx, the tsx binary does not end up in the final
|
|
404
|
-
* process.argv and so we need to check a few possible things to account for usage
|
|
405
|
-
* via different package managers (e.g. pnpm does not set process._ to tsx, but rather
|
|
406
|
-
* pnpm itself, modern yarn does not set process._ at all etc.).
|
|
407
|
-
*/
|
|
408
|
-
const isInvokedByTsx = (() => {
|
|
409
|
-
if (process.env._?.endsWith(`${path_1.sep}tsx`)) {
|
|
410
|
-
return true;
|
|
411
|
-
}
|
|
412
|
-
const requireArgs = [];
|
|
413
|
-
const importArgs = [];
|
|
414
|
-
(process.execArgv ?? []).forEach((arg, i) => {
|
|
415
|
-
if (arg === '-r' || arg === '--require') {
|
|
416
|
-
requireArgs.push(process.execArgv[i + 1]);
|
|
417
|
-
}
|
|
418
|
-
if (arg === '--import') {
|
|
419
|
-
importArgs.push(process.execArgv[i + 1]);
|
|
420
|
-
}
|
|
421
|
-
});
|
|
422
|
-
const isTsxPath = (p) => p.includes(`${path_1.sep}tsx${path_1.sep}`);
|
|
423
|
-
return (requireArgs.some((a) => isTsxPath(a)) ||
|
|
424
|
-
importArgs.some((a) => isTsxPath(a)));
|
|
425
|
-
})();
|
|
426
|
-
let resolveConditionsInjected = false;
|
|
427
|
-
/**
|
|
428
|
-
* Make Node's module resolver honor the given export conditions for the rest of
|
|
429
|
-
* the process, via `module.registerHooks()`. Used when a local plugin is loaded
|
|
430
|
-
* from source in-process (no child process to pass `--conditions` to at spawn):
|
|
431
|
-
* the hook appends the conditions to every resolution so the plugin's transitive
|
|
432
|
-
* workspace imports resolve to source the same way the plugin entry did.
|
|
433
|
-
*
|
|
434
|
-
* No-op when:
|
|
435
|
-
* - `conditions` is empty (nothing to inject);
|
|
436
|
-
* - every target condition is already active at startup (a spawned plugin
|
|
437
|
-
* worker or daemon was launched with the full `--conditions` set, so Node's
|
|
438
|
-
* resolver already honors them and the per-resolve hook would be redundant);
|
|
439
|
-
* - `module.registerHooks` is unavailable (Node < 22.15 / < 23.5). Those
|
|
440
|
-
* runtimes keep the `NODE_OPTIONS=--conditions` escape hatch.
|
|
441
|
-
*
|
|
442
|
-
* Idempotent and best-effort.
|
|
443
|
-
*/
|
|
444
|
-
function ensureResolveConditionsInjected(conditions) {
|
|
445
|
-
if (resolveConditionsInjected)
|
|
446
|
-
return;
|
|
447
|
-
resolveConditionsInjected = true;
|
|
448
|
-
if (!conditions.length)
|
|
449
|
-
return;
|
|
450
|
-
// Skip only when Node already honors every target condition (e.g. a worker or
|
|
451
|
-
// daemon spawned with the full `--conditions` set); a partial overlap still
|
|
452
|
-
// needs the hook to add the missing ones.
|
|
453
|
-
const activeConditions = getConditionsActiveAtStartup();
|
|
454
|
-
if (conditions.every((condition) => activeConditions.has(condition)))
|
|
455
|
-
return;
|
|
456
|
-
const module = require('node:module');
|
|
457
|
-
const registerHooks = module.registerHooks;
|
|
458
|
-
if (typeof registerHooks !== 'function')
|
|
459
|
-
return;
|
|
460
|
-
try {
|
|
461
|
-
registerHooks.call(module, {
|
|
462
|
-
resolve(specifier, context, nextResolve) {
|
|
463
|
-
const merged = context.conditions
|
|
464
|
-
? [...context.conditions, ...conditions]
|
|
465
|
-
: conditions;
|
|
466
|
-
return nextResolve(specifier, { ...context, conditions: merged });
|
|
467
|
-
},
|
|
468
|
-
});
|
|
469
|
-
}
|
|
470
|
-
catch {
|
|
471
|
-
// Best-effort: leave Node's native resolution in place rather than failing.
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
/**
|
|
475
|
-
* Export conditions this process was started with, parsed from `--conditions`
|
|
476
|
-
* (or its `-C` alias) in `process.execArgv` and `NODE_OPTIONS`. Node's resolver
|
|
477
|
-
* already honors these, so the injected hook only needs to cover target
|
|
478
|
-
* conditions not present here.
|
|
479
|
-
*/
|
|
480
|
-
function getConditionsActiveAtStartup() {
|
|
481
|
-
const active = new Set();
|
|
482
|
-
const collect = (tokens) => {
|
|
483
|
-
for (let i = 0; i < tokens.length; i++) {
|
|
484
|
-
const token = tokens[i];
|
|
485
|
-
if (token === '--conditions' || token === '-C') {
|
|
486
|
-
const value = tokens[i + 1];
|
|
487
|
-
if (value) {
|
|
488
|
-
active.add(value);
|
|
489
|
-
i++;
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
else if (token.startsWith('--conditions=')) {
|
|
493
|
-
active.add(token.slice('--conditions='.length));
|
|
494
|
-
}
|
|
495
|
-
else if (token.startsWith('-C=')) {
|
|
496
|
-
active.add(token.slice('-C='.length));
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
};
|
|
500
|
-
collect(process.execArgv ?? []);
|
|
501
|
-
const nodeOptions = process.env.NODE_OPTIONS;
|
|
502
|
-
if (nodeOptions)
|
|
503
|
-
collect(nodeOptions.split(/\s+/).filter(Boolean));
|
|
504
|
-
return active;
|
|
505
|
-
}
|
|
506
|
-
/**
|
|
507
|
-
* Whether the current Node.js runtime exposes native TypeScript type
|
|
508
|
-
* stripping. This is the authoritative gate - it correctly handles every
|
|
509
|
-
* way Node ships TS support:
|
|
510
|
-
* - Node 23.6+: unflagged, on by default
|
|
511
|
-
* - Node 22.18+ LTS: backported unflagged
|
|
512
|
-
* - Node 22.6-22.17 + `--experimental-strip-types` (or `--experimental-transform-types`)
|
|
513
|
-
*
|
|
514
|
-
* `process.features.typescript` is `'strip' | 'transform' | false`.
|
|
515
|
-
*/
|
|
516
|
-
const nodeSupportsNativeTypescript = !!process.features
|
|
517
|
-
?.typescript;
|
|
518
|
-
/**
|
|
519
|
-
* When process.features.typescript is truthy, default to letting Node.js
|
|
520
|
-
* handle TypeScript natively via type stripping and skip registering swc-node
|
|
521
|
-
* or ts-node. Users can opt out by setting NX_PREFER_NODE_STRIP_TYPES=false.
|
|
522
|
-
*
|
|
523
|
-
* Some constructs (enum, runtime namespace, legacy decorators,
|
|
524
|
-
* import = require, parameter properties, etc.) aren't supported by native
|
|
525
|
-
* type stripping. `loadTsFile` catches these failures and falls back to
|
|
526
|
-
* registering swc/ts-node + tsconfig-paths automatically.
|
|
527
|
-
*
|
|
528
|
-
* Setting NX_PREFER_TS_NODE=true also opts out, since that flag explicitly
|
|
529
|
-
* requests ts-node for transpilation.
|
|
530
|
-
*
|
|
531
|
-
* See: https://nodejs.org/api/typescript.html#full-typescript-support
|
|
532
|
-
*/
|
|
533
|
-
const preferNodeStripTypes = (() => {
|
|
534
|
-
if (!nodeSupportsNativeTypescript) {
|
|
535
|
-
return false;
|
|
536
|
-
}
|
|
537
|
-
if (process.env.NX_PREFER_TS_NODE === 'true') {
|
|
538
|
-
return false;
|
|
539
|
-
}
|
|
540
|
-
return process.env.NX_PREFER_NODE_STRIP_TYPES !== 'false';
|
|
541
|
-
})();
|
|
542
|
-
/**
|
|
543
|
-
* Skip tsconfig-paths registration on the swc/ts-node fallback path. Useful
|
|
544
|
-
* for workspaces relying on package manager workspaces (pnpm, yarn, npm) for
|
|
545
|
-
* project linking, where tsconfig path aliases aren't needed.
|
|
546
|
-
*/
|
|
547
|
-
const disableTsConfigPaths = process.env.NX_DISABLE_TSCONFIG_PATHS === 'true';
|
|
548
|
-
/**
|
|
549
|
-
* Whether Nx will defer to Node's native TypeScript stripping for the next
|
|
550
|
-
* `.ts` load. Mirrors the gate used by `loadTsFile`/`registerTsProject` so
|
|
551
|
-
* other registration sites (e.g. plugin transpiler) can stay aligned.
|
|
552
|
-
*/
|
|
553
|
-
function isNativeStripPreferred() {
|
|
554
|
-
return preferNodeStripTypes;
|
|
555
|
-
}
|
|
556
|
-
/**
|
|
557
|
-
* This function registers either ts-node or swc-node to transpile TypeScript files on the fly.
|
|
558
|
-
* It also registers tsconfig-paths to handle path mapping based on the provided tsconfig.
|
|
559
|
-
*
|
|
560
|
-
* The TypeScript transpiler registration is done regardless of NX_PREFER_NODE_STRIP_TYPES.
|
|
561
|
-
* If you want to skip transpiler registration, it is recommended that you check `process.features.typescript`.
|
|
562
|
-
*
|
|
563
|
-
* @returns cleanup function
|
|
564
|
-
*/
|
|
565
|
-
function registerTsProject(tsConfigPath) {
|
|
566
|
-
// See explanation alongside isInvokedByTsx declaration
|
|
567
|
-
if (isInvokedByTsx) {
|
|
568
|
-
return () => { };
|
|
569
|
-
}
|
|
570
|
-
const { compilerOptions, tsConfigRaw } = readCompilerOptions(tsConfigPath);
|
|
571
|
-
const cleanupFunctions = [
|
|
572
|
-
registerTsConfigPaths(tsConfigPath),
|
|
573
|
-
registerTranspiler(compilerOptions, tsConfigRaw),
|
|
574
|
-
];
|
|
575
|
-
// Best-effort ESM loader registration so dynamic import() of .ts/.mts
|
|
576
|
-
// files goes through a transpiler. No-op if no ESM loader package is
|
|
577
|
-
// installed.
|
|
578
|
-
ensureEsmLoaderRegistered({ required: false });
|
|
579
|
-
// CJS-side fallback so NodeNext `.js` specifiers in `.ts` sources resolve
|
|
580
|
-
// to the matching `.ts` file when require()'d.
|
|
581
|
-
ensureCjsResolverPatched();
|
|
582
|
-
return () => {
|
|
583
|
-
for (const fn of cleanupFunctions) {
|
|
584
|
-
fn();
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
|
-
}
|
|
588
|
-
function getSwcTranspiler(compilerOptions) {
|
|
589
|
-
// These are requires to prevent it from registering when it shouldn't
|
|
590
|
-
const register = require('@swc-node/register/register')
|
|
591
|
-
.register;
|
|
592
|
-
const cleanupFn = register({
|
|
593
|
-
...compilerOptions,
|
|
594
|
-
baseUrl: compilerOptions.baseUrl ?? './',
|
|
595
|
-
});
|
|
596
|
-
return typeof cleanupFn === 'function' ? cleanupFn : () => { };
|
|
597
|
-
}
|
|
598
|
-
function getTsNodeTranspiler(compilerOptions, tsNodeOptions, preferTsNode) {
|
|
599
|
-
const { register } = require('ts-node');
|
|
600
|
-
// ts-node doesn't provide a cleanup method
|
|
601
|
-
const service = register({
|
|
602
|
-
...tsNodeOptions,
|
|
603
|
-
transpileOnly: true,
|
|
604
|
-
compilerOptions: getTsNodeCompilerOptions({
|
|
605
|
-
...tsNodeOptions?.compilerOptions,
|
|
606
|
-
...compilerOptions,
|
|
607
|
-
}),
|
|
608
|
-
// we already read and provide the compiler options, so prevent ts-node from reading them again
|
|
609
|
-
skipProject: true,
|
|
610
|
-
});
|
|
611
|
-
const { transpiler, swc } = service.options;
|
|
612
|
-
// Don't warn if a faster transpiler is enabled
|
|
613
|
-
if (!transpiler && !swc && !preferTsNode) {
|
|
614
|
-
warnTsNodeUsage();
|
|
615
|
-
}
|
|
616
|
-
return () => {
|
|
617
|
-
// Do not cleanup ts-node service since other consumers may need it
|
|
618
|
-
};
|
|
619
|
-
}
|
|
620
|
-
/**
|
|
621
|
-
* Given the raw "ts-node" sub-object from a tsconfig, return an object with only the properties
|
|
622
|
-
* recognized by "ts-node"
|
|
623
|
-
*
|
|
624
|
-
* Adapted from the function of the same name in ts-node
|
|
625
|
-
*/
|
|
626
|
-
function filterRecognizedTsConfigTsNodeOptions(jsonObject) {
|
|
627
|
-
if (typeof jsonObject !== 'object' || jsonObject === null) {
|
|
628
|
-
return { recognized: {}, unrecognized: {} };
|
|
629
|
-
}
|
|
630
|
-
const { compiler, compilerHost, compilerOptions, emit, files, ignore, ignoreDiagnostics, logError, preferTsExts, pretty, require, skipIgnore, transpileOnly, typeCheck, transpiler, scope, scopeDir, moduleTypes, experimentalReplAwait, swc, experimentalResolver, esm, experimentalSpecifierResolution, experimentalTsImportSpecifiers, ...unrecognized } = jsonObject;
|
|
631
|
-
const filteredTsConfigOptions = {
|
|
632
|
-
compiler,
|
|
633
|
-
compilerHost,
|
|
634
|
-
compilerOptions,
|
|
635
|
-
emit,
|
|
636
|
-
experimentalReplAwait,
|
|
637
|
-
files,
|
|
638
|
-
ignore,
|
|
639
|
-
ignoreDiagnostics,
|
|
640
|
-
logError,
|
|
641
|
-
preferTsExts,
|
|
642
|
-
pretty,
|
|
643
|
-
require,
|
|
644
|
-
skipIgnore,
|
|
645
|
-
transpileOnly,
|
|
646
|
-
typeCheck,
|
|
647
|
-
transpiler,
|
|
648
|
-
scope,
|
|
649
|
-
scopeDir,
|
|
650
|
-
moduleTypes,
|
|
651
|
-
swc,
|
|
652
|
-
experimentalResolver,
|
|
653
|
-
esm,
|
|
654
|
-
experimentalSpecifierResolution,
|
|
655
|
-
experimentalTsImportSpecifiers,
|
|
656
|
-
};
|
|
657
|
-
// Use the typechecker to make sure this implementation has the correct set of properties
|
|
658
|
-
const catchExtraneousProps = null;
|
|
659
|
-
const catchMissingProps = null;
|
|
660
|
-
return { recognized: filteredTsConfigOptions, unrecognized };
|
|
661
|
-
}
|
|
662
|
-
const registered = new Map();
|
|
663
|
-
function getTranspiler(compilerOptions, tsConfigRaw) {
|
|
664
|
-
const preferTsNode = process.env.NX_PREFER_TS_NODE === 'true';
|
|
665
|
-
if (!ts) {
|
|
666
|
-
ts = require('typescript');
|
|
667
|
-
}
|
|
668
|
-
compilerOptions.lib = ['es2021'];
|
|
669
|
-
compilerOptions.module = ts.ModuleKind.CommonJS;
|
|
670
|
-
// use NodeJs module resolution until support for TS 4.x is dropped and then
|
|
671
|
-
// we can switch to Node10
|
|
672
|
-
compilerOptions.moduleResolution = ts.ModuleResolutionKind.NodeJs;
|
|
673
|
-
compilerOptions.customConditions = null;
|
|
674
|
-
compilerOptions.target = ts.ScriptTarget.ES2021;
|
|
675
|
-
compilerOptions.inlineSourceMap = true;
|
|
676
|
-
compilerOptions.skipLibCheck = true;
|
|
677
|
-
// TS 6 hard-errors on deprecated options set above (node10 moduleResolution);
|
|
678
|
-
// ignoreDeprecations exists since TS 5.0 but the value '6.0' is rejected by TS5 (TS5103).
|
|
679
|
-
if (parseInt(ts.versionMajorMinor, 10) >= 6) {
|
|
680
|
-
compilerOptions.ignoreDeprecations = '6.0';
|
|
681
|
-
}
|
|
682
|
-
// These options are different per project, and since they are not needed for transpilation, we can remove them so we have more cache hits.
|
|
683
|
-
compilerOptions.outDir = undefined;
|
|
684
|
-
compilerOptions.outFile = undefined;
|
|
685
|
-
compilerOptions.declaration = undefined;
|
|
686
|
-
compilerOptions.declarationMap = undefined;
|
|
687
|
-
compilerOptions.composite = undefined;
|
|
688
|
-
compilerOptions.tsBuildInfoFile = undefined;
|
|
689
|
-
delete compilerOptions.strict;
|
|
690
|
-
let _getTranspiler;
|
|
691
|
-
let registrationKey = JSON.stringify(compilerOptions);
|
|
692
|
-
let tsNodeOptions;
|
|
693
|
-
if (swcNodeInstalled && !preferTsNode) {
|
|
694
|
-
_getTranspiler = getSwcTranspiler;
|
|
695
|
-
}
|
|
696
|
-
else if (tsNodeInstalled) {
|
|
697
|
-
// We can fall back on ts-node if it's available
|
|
698
|
-
_getTranspiler = getTsNodeTranspiler;
|
|
699
|
-
tsNodeOptions = filterRecognizedTsConfigTsNodeOptions(tsConfigRaw?.['ts-node']).recognized;
|
|
700
|
-
// include ts-node options in the registration key
|
|
701
|
-
registrationKey += JSON.stringify(tsNodeOptions);
|
|
702
|
-
}
|
|
703
|
-
else {
|
|
704
|
-
_getTranspiler = undefined;
|
|
705
|
-
}
|
|
706
|
-
// Just return if transpiler was already registered before.
|
|
707
|
-
const registrationEntry = registered.get(registrationKey);
|
|
708
|
-
if (registered.has(registrationKey)) {
|
|
709
|
-
registrationEntry.refCount++;
|
|
710
|
-
return registrationEntry.cleanup;
|
|
711
|
-
}
|
|
712
|
-
if (_getTranspiler) {
|
|
713
|
-
const transpilerCleanup = _getTranspiler(compilerOptions, tsNodeOptions, preferTsNode);
|
|
714
|
-
const currRegistrationEntry = {
|
|
715
|
-
refCount: 1,
|
|
716
|
-
cleanup: () => {
|
|
717
|
-
return () => {
|
|
718
|
-
currRegistrationEntry.refCount--;
|
|
719
|
-
if (currRegistrationEntry.refCount === 0) {
|
|
720
|
-
registered.delete(registrationKey);
|
|
721
|
-
transpilerCleanup();
|
|
722
|
-
}
|
|
723
|
-
};
|
|
724
|
-
},
|
|
725
|
-
};
|
|
726
|
-
registered.set(registrationKey, currRegistrationEntry);
|
|
727
|
-
return currRegistrationEntry.cleanup;
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
/**
|
|
731
|
-
* Node.js throws this code when native type stripping hits an unsupported
|
|
732
|
-
* construct (enum, runtime namespace, legacy decorators, import = require,
|
|
733
|
-
* parameter properties on older Node, etc.).
|
|
734
|
-
*
|
|
735
|
-
* Exported for tests.
|
|
736
|
-
*/
|
|
737
|
-
function isNativeTypeStripError(err) {
|
|
738
|
-
if (!err || typeof err !== 'object')
|
|
739
|
-
return false;
|
|
740
|
-
return (err.code === 'ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX');
|
|
741
|
-
}
|
|
742
|
-
/**
|
|
743
|
-
* Module resolution failures - typically a tsconfig path alias that hasn't
|
|
744
|
-
* been registered yet, or a workspace lib not surfaced via package manager
|
|
745
|
-
* symlinks. CJS uses `MODULE_NOT_FOUND`, ESM uses `ERR_MODULE_NOT_FOUND`.
|
|
746
|
-
*/
|
|
747
|
-
function isModuleNotFoundError(err) {
|
|
748
|
-
if (!err || typeof err !== 'object')
|
|
749
|
-
return false;
|
|
750
|
-
const code = err.code;
|
|
751
|
-
return code === 'MODULE_NOT_FOUND' || code === 'ERR_MODULE_NOT_FOUND';
|
|
752
|
-
}
|
|
753
|
-
/**
|
|
754
|
-
* A SyntaxError thrown while parsing a forced-CJS file (`.cts`/`.cjs`) as
|
|
755
|
-
* CommonJS - typically ESM syntax in a CJS file (e.g. `export default` in
|
|
756
|
-
* `.cts`). Pre-v23 this worked because swc-node's CJS hook compiled away the
|
|
757
|
-
* ESM syntax; under native strip swc-node isn't registered, so the file
|
|
758
|
-
* reaches Node's strict CJS parser. swc-node tolerates ESM syntax in `.cts`
|
|
759
|
-
* (`register()` forces `module: commonjs` regardless of extension), so
|
|
760
|
-
* escalating to the swc/ts-node fallback recovers the legacy behavior.
|
|
761
|
-
*/
|
|
762
|
-
function isCjsSyntaxError(err, filePath) {
|
|
763
|
-
if (!(err instanceof SyntaxError))
|
|
764
|
-
return false;
|
|
765
|
-
return filePath.endsWith('.cts') || filePath.endsWith('.cjs');
|
|
766
|
-
}
|
|
767
|
-
/**
|
|
768
|
-
* A ReferenceError from Node treating a `.ts`/`.mts` file as ESM and the file
|
|
769
|
-
* relying on a CJS-only global: `require`, `__dirname`, or `__filename`.
|
|
770
|
-
* Pre-v23 swc-node compiled `.ts` to CJS where these globals exist; under
|
|
771
|
-
* native strip Node detects ESM via `import`/`export` syntax and these globals
|
|
772
|
-
* are undefined. Registering swc/ts-node compiles ESM->CJS and restores the
|
|
773
|
-
* legacy globals.
|
|
774
|
-
*/
|
|
775
|
-
function isRequireInEsmScopeError(err, filePath) {
|
|
776
|
-
if (!(err instanceof ReferenceError))
|
|
777
|
-
return false;
|
|
778
|
-
if (!(filePath.endsWith('.ts') || filePath.endsWith('.mts')))
|
|
779
|
-
return false;
|
|
780
|
-
// Node's exact phrasing varies across versions / strip modes. Match the
|
|
781
|
-
// bare-name form too (e.g. `__dirname is not defined`) so the fallback
|
|
782
|
-
// still triggers when the trailing "in ES module scope" is absent.
|
|
783
|
-
const msg = err.message;
|
|
784
|
-
return /(require|__dirname|__filename) is not defined/.test(msg);
|
|
785
|
-
}
|
|
786
|
-
function isTsEsmSyntaxError(err, filePath) {
|
|
787
|
-
if (!(err instanceof SyntaxError))
|
|
788
|
-
return false;
|
|
789
|
-
if (!filePath.endsWith('.ts'))
|
|
790
|
-
return false;
|
|
791
|
-
// Node has multiple phrasings for ESM-in-CJS-scope syntax errors depending
|
|
792
|
-
// on whether the offending token is `import` or `export` and which parser
|
|
793
|
-
// path triggered: "Cannot use import statement outside a module" or
|
|
794
|
-
// "Unexpected token 'export'" / "Unexpected token 'import'". swc-node's
|
|
795
|
-
// CJS hook compiles ESM->CJS regardless of the surface error, so all of
|
|
796
|
-
// these should escalate to the same fallback.
|
|
797
|
-
const msg = err.message;
|
|
798
|
-
return (msg.includes('Cannot use import statement outside a module') ||
|
|
799
|
-
/Unexpected token ['"](export|import)['"]/.test(msg));
|
|
800
|
-
}
|
|
801
|
-
function isTsEsmNamedExportLinkageError(err, filePath) {
|
|
802
|
-
if (!(err instanceof SyntaxError))
|
|
803
|
-
return false;
|
|
804
|
-
return ((filePath.endsWith('.ts') || filePath.endsWith('.mts')) &&
|
|
805
|
-
err.message.includes('does not provide an export named'));
|
|
806
|
-
}
|
|
807
|
-
/**
|
|
808
|
-
* Hint appended to errors that the lazy fallback couldn't recover from.
|
|
809
|
-
* Points users at the env opt-out for cases native strip can't reach (e.g.
|
|
810
|
-
* ESM with top-level await + unsupported TS syntax, where swc-node's CJS
|
|
811
|
-
* Module._extensions hook can't intercept dynamic `import()`).
|
|
812
|
-
*/
|
|
813
|
-
const NX_PREFER_NODE_STRIP_TYPES_DOCS_URL = 'https://nx.dev/docs/reference/environment-variables#nx-prefer-node-strip-types';
|
|
814
|
-
const STRIP_TYPES_OPT_OUT_HINT = `Set NX_PREFER_NODE_STRIP_TYPES=false to opt out of Node's native TypeScript stripping and use swc/ts-node instead. See ${NX_PREFER_NODE_STRIP_TYPES_DOCS_URL}`;
|
|
815
|
-
/**
|
|
816
|
-
* Load a TypeScript file via `require()`.
|
|
817
|
-
*
|
|
818
|
-
* When the runtime exposes native TypeScript stripping
|
|
819
|
-
* (`process.features.typescript`) and the user hasn't opted out via
|
|
820
|
-
* `NX_PREFER_NODE_STRIP_TYPES=false`, the file loads directly with no
|
|
821
|
-
* swc/ts-node and no tsconfig-paths registration. If Node throws on an
|
|
822
|
-
* unsupported construct (enum, runtime namespace, legacy decorators, etc.),
|
|
823
|
-
* this registers swc/ts-node + tsconfig-paths and retries - matching the
|
|
824
|
-
* pre-v23 registration. Set `NX_DISABLE_TSCONFIG_PATHS=true` to skip
|
|
825
|
-
* tsconfig-paths even on fallback (useful when relying on package manager
|
|
826
|
-
* workspaces). Set `NX_VERBOSE_LOGGING=true` to log when fallback triggers.
|
|
827
|
-
*
|
|
828
|
-
* When native strip is opted out (`NX_PREFER_NODE_STRIP_TYPES=false` or
|
|
829
|
-
* unsupported Node), uses the legacy `registerTsProject` path.
|
|
830
|
-
*
|
|
831
|
-
* `tsConfigPath` is only consulted on the swc/ts-node fallback path (for
|
|
832
|
-
* compilerOptions) and for tsconfig-paths registration. Native strip ignores
|
|
833
|
-
* it. When omitted, defaults to the workspace root tsconfig.
|
|
834
|
-
*
|
|
835
|
-
* Note on ESM: Node 22.12+ supports `require()` of synchronous ESM by default,
|
|
836
|
-
* so most ESM `.ts` configs load via this function without issue. Modules
|
|
837
|
-
* that use top-level await throw `ERR_REQUIRE_ASYNC_MODULE` and must be
|
|
838
|
-
* loaded with dynamic `import()` instead. `ERR_REQUIRE_ESM` (legacy code)
|
|
839
|
-
* bubbles unchanged for the rare case it still fires, so async-aware callers
|
|
840
|
-
* can dispatch to `import()`.
|
|
841
|
-
*
|
|
842
|
-
* @returns the loaded module
|
|
843
|
-
*/
|
|
844
|
-
function loadTsFile(filePath, tsConfigPath) {
|
|
845
|
-
const resolvedTsConfigPath = tsConfigPath ?? (0, typescript_1.getRootTsConfigPath)();
|
|
846
|
-
if (isInvokedByTsx) {
|
|
847
|
-
return require(filePath);
|
|
848
|
-
}
|
|
849
|
-
if (!preferNodeStripTypes) {
|
|
850
|
-
if (!resolvedTsConfigPath) {
|
|
851
|
-
throw new Error(`${logger_1.NX_PREFIX} loadTsFile could not find a workspace tsconfig while loading ${filePath} on the swc/ts-node path. Pass an explicit tsConfigPath or add a tsconfig.base.json/tsconfig.json at the workspace root.`);
|
|
852
|
-
}
|
|
853
|
-
const cleanup = registerTsProject(resolvedTsConfigPath);
|
|
854
|
-
try {
|
|
855
|
-
return require(filePath);
|
|
856
|
-
}
|
|
857
|
-
finally {
|
|
858
|
-
cleanup();
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
// Native strip path: no registration up front. pnpm/npm/yarn workspaces
|
|
862
|
-
// resolve aliases without tsconfig-paths. On failure, lazy-register what
|
|
863
|
-
// the specific error code indicates is needed and retry:
|
|
864
|
-
// - MODULE_NOT_FOUND -> first try tsconfig-paths (alias resolution).
|
|
865
|
-
// If that still fails (e.g. extensionless `import './foo'` when
|
|
866
|
-
// `foo.ts` is adjacent - Node's resolver doesn't add `.ts`), escalate
|
|
867
|
-
// to swc/ts-node which handles `.ts` extension resolution.
|
|
868
|
-
// - ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX -> register swc/ts-node + tsconfig-paths
|
|
869
|
-
// Each registration kind runs at most once, so a file recovers in at
|
|
870
|
-
// most three attempts.
|
|
871
|
-
let pathsRegistered = false;
|
|
872
|
-
let transpilerRegistered = false;
|
|
873
|
-
const cleanups = [];
|
|
874
|
-
const registerTranspilerFallback = (err) => {
|
|
875
|
-
if (!swcNodeInstalled && !tsNodeInstalled) {
|
|
876
|
-
const original = err instanceof Error ? err.message : String(err);
|
|
877
|
-
throw new Error(`${logger_1.NX_PREFIX} ${filePath} could not be loaded under Node's native TypeScript stripping (${original}). Install @swc-node/register and @swc/core (or ts-node) to enable the swc/ts-node fallback, or ${STRIP_TYPES_OPT_OUT_HINT}`);
|
|
878
|
-
}
|
|
879
|
-
if (!resolvedTsConfigPath) {
|
|
880
|
-
throw new Error(`${logger_1.NX_PREFIX} ${filePath} requires the swc/ts-node fallback but no workspace tsconfig was found. Pass an explicit tsConfigPath or add a tsconfig.base.json/tsconfig.json at the workspace root. ${STRIP_TYPES_OPT_OUT_HINT}`);
|
|
881
|
-
}
|
|
882
|
-
if (!pathsRegistered && !disableTsConfigPaths) {
|
|
883
|
-
cleanups.push(registerTsConfigPaths(resolvedTsConfigPath));
|
|
884
|
-
pathsRegistered = true;
|
|
885
|
-
}
|
|
886
|
-
const { compilerOptions, tsConfigRaw } = readCompilerOptions(resolvedTsConfigPath);
|
|
887
|
-
cleanups.push(registerTranspiler(compilerOptions, tsConfigRaw));
|
|
888
|
-
transpilerRegistered = true;
|
|
889
|
-
};
|
|
890
|
-
try {
|
|
891
|
-
for (let attempt = 1;; attempt++) {
|
|
892
|
-
try {
|
|
893
|
-
if (attempt > 1) {
|
|
894
|
-
try {
|
|
895
|
-
delete require.cache[require.resolve(filePath)];
|
|
896
|
-
}
|
|
897
|
-
catch {
|
|
898
|
-
// require.resolve may throw if the failed load never reached cache
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
return require(filePath);
|
|
902
|
-
}
|
|
903
|
-
catch (err) {
|
|
904
|
-
// Cheap fallback first: register tsconfig-paths and retry.
|
|
905
|
-
if (isModuleNotFoundError(err) &&
|
|
906
|
-
!pathsRegistered &&
|
|
907
|
-
!disableTsConfigPaths &&
|
|
908
|
-
resolvedTsConfigPath) {
|
|
909
|
-
logFallback(filePath, err, 'Module not found; registering tsconfig-paths and retrying.');
|
|
910
|
-
cleanups.push(registerTsConfigPaths(resolvedTsConfigPath));
|
|
911
|
-
pathsRegistered = true;
|
|
912
|
-
continue;
|
|
913
|
-
}
|
|
914
|
-
// Heavy fallback: register swc/ts-node (+ paths) and retry. Triggered
|
|
915
|
-
// by:
|
|
916
|
-
// - strip-types failure (`ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX`)
|
|
917
|
-
// - module resolution failure that tsconfig-paths alone can't fix
|
|
918
|
-
// (extensionless `./foo` -> `./foo.ts`)
|
|
919
|
-
// - SyntaxError in a `.cts`/`.cjs` file (ESM syntax in a forced-CJS
|
|
920
|
-
// file). swc-node compiles ESM->CJS regardless of extension.
|
|
921
|
-
// - SyntaxError from Node parsing a `.ts` config with ESM syntax as
|
|
922
|
-
// CJS. swc/ts-node preserves the pre-v23 behavior for these files.
|
|
923
|
-
// - ReferenceError from Node treating a `.ts`/`.mts` config as ESM
|
|
924
|
-
// when it contains legacy CJS `require`.
|
|
925
|
-
// - SyntaxError from native ESM linkage when generated TS config
|
|
926
|
-
// imports a type-only symbol as a runtime named export.
|
|
927
|
-
if ((isNativeTypeStripError(err) ||
|
|
928
|
-
isModuleNotFoundError(err) ||
|
|
929
|
-
isCjsSyntaxError(err, filePath) ||
|
|
930
|
-
isTsEsmSyntaxError(err, filePath) ||
|
|
931
|
-
isRequireInEsmScopeError(err, filePath) ||
|
|
932
|
-
isTsEsmNamedExportLinkageError(err, filePath)) &&
|
|
933
|
-
!transpilerRegistered) {
|
|
934
|
-
logFallback(filePath, err, isNativeTypeStripError(err)
|
|
935
|
-
? 'Native Node.js TypeScript stripping failed; falling back to swc/ts-node + tsconfig-paths.'
|
|
936
|
-
: isCjsSyntaxError(err, filePath)
|
|
937
|
-
? 'ESM syntax in forced-CJS file; falling back to swc/ts-node + tsconfig-paths.'
|
|
938
|
-
: isTsEsmSyntaxError(err, filePath)
|
|
939
|
-
? 'ESM syntax in TypeScript file parsed as CommonJS; falling back to swc/ts-node + tsconfig-paths.'
|
|
940
|
-
: isRequireInEsmScopeError(err, filePath)
|
|
941
|
-
? 'CommonJS require in native ESM TypeScript file; falling back to swc/ts-node + tsconfig-paths.'
|
|
942
|
-
: isTsEsmNamedExportLinkageError(err, filePath)
|
|
943
|
-
? 'Native ESM named export linkage failed; falling back to swc/ts-node + tsconfig-paths.'
|
|
944
|
-
: 'Module not found after tsconfig-paths; falling back to swc/ts-node + tsconfig-paths.');
|
|
945
|
-
registerTranspilerFallback(err);
|
|
946
|
-
continue;
|
|
947
|
-
}
|
|
948
|
-
throw augmentLoadFailure(filePath, err);
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
finally {
|
|
953
|
-
for (const fn of cleanups)
|
|
954
|
-
fn();
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
/**
|
|
958
|
-
* Plain `require()` with a lazy `tsconfig-paths` fallback. Use for files that
|
|
959
|
-
* are NOT TypeScript (no transpilation needed) but may still import workspace
|
|
960
|
-
* packages through TS path aliases (e.g. a `.js` changelog renderer that
|
|
961
|
-
* `require`s `@my-org/lib`).
|
|
962
|
-
*
|
|
963
|
-
* `tsconfig-paths` is only registered after the first `require()` fails with
|
|
964
|
-
* a module-resolution error, so workspaces that resolve aliases through
|
|
965
|
-
* package-manager symlinks pay nothing. Set `NX_DISABLE_TSCONFIG_PATHS=true`
|
|
966
|
-
* to skip the fallback entirely.
|
|
967
|
-
*
|
|
968
|
-
* @returns the loaded module
|
|
969
|
-
*/
|
|
970
|
-
function requireWithTsconfigFallback(filePath, tsConfigPath) {
|
|
971
|
-
try {
|
|
972
|
-
return require(filePath);
|
|
973
|
-
}
|
|
974
|
-
catch (err) {
|
|
975
|
-
if (!isModuleNotFoundError(err) || disableTsConfigPaths) {
|
|
976
|
-
throw err;
|
|
977
|
-
}
|
|
978
|
-
const resolvedTsConfigPath = tsConfigPath ?? (0, typescript_1.getRootTsConfigPath)();
|
|
979
|
-
if (!resolvedTsConfigPath) {
|
|
980
|
-
throw err;
|
|
981
|
-
}
|
|
982
|
-
const cleanup = registerTsConfigPaths(resolvedTsConfigPath);
|
|
983
|
-
try {
|
|
984
|
-
delete require.cache[require.resolve(filePath)];
|
|
985
|
-
}
|
|
986
|
-
catch {
|
|
987
|
-
// require.resolve may throw if the failed load never reached cache
|
|
988
|
-
}
|
|
989
|
-
try {
|
|
990
|
-
return require(filePath);
|
|
991
|
-
}
|
|
992
|
-
finally {
|
|
993
|
-
cleanup();
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
}
|
|
997
|
-
/**
|
|
998
|
-
* Append the `NX_PREFER_NODE_STRIP_TYPES=false` opt-out hint so users know
|
|
999
|
-
* there's an escape hatch for cases native strip can't reach (e.g. ESM with
|
|
1000
|
-
* top-level await + unsupported TS syntax). Skipped for:
|
|
1001
|
-
* - ESM-redispatch signals callers expect to handle
|
|
1002
|
-
* (`ERR_REQUIRE_ESM`, `ERR_REQUIRE_ASYNC_MODULE`)
|
|
1003
|
-
* - plain module-resolution failures (`MODULE_NOT_FOUND`,
|
|
1004
|
-
* `ERR_MODULE_NOT_FOUND`) - disabling strip-types doesn't fix a missing
|
|
1005
|
-
* module, the hint just misleads.
|
|
1006
|
-
*/
|
|
1007
|
-
function augmentLoadFailure(filePath, err) {
|
|
1008
|
-
if (!(err instanceof Error))
|
|
1009
|
-
return err;
|
|
1010
|
-
const code = err.code;
|
|
1011
|
-
if (code === 'ERR_REQUIRE_ESM' ||
|
|
1012
|
-
code === 'ERR_REQUIRE_ASYNC_MODULE' ||
|
|
1013
|
-
code === 'MODULE_NOT_FOUND' ||
|
|
1014
|
-
code === 'ERR_MODULE_NOT_FOUND') {
|
|
1015
|
-
return err;
|
|
1016
|
-
}
|
|
1017
|
-
if (err.message.includes(NX_PREFER_NODE_STRIP_TYPES_DOCS_URL)) {
|
|
1018
|
-
return err;
|
|
1019
|
-
}
|
|
1020
|
-
err.message = `${err.message}\n\n${logger_1.NX_PREFIX} Failed to load ${filePath} under Node's native TypeScript stripping. ${STRIP_TYPES_OPT_OUT_HINT}`;
|
|
1021
|
-
return err;
|
|
1022
|
-
}
|
|
1023
|
-
function logFallback(filePath, err, summary) {
|
|
1024
|
-
if (process.env.NX_VERBOSE_LOGGING !== 'true') {
|
|
1025
|
-
return;
|
|
1026
|
-
}
|
|
1027
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
1028
|
-
logger_1.logger.warn((0, logger_1.stripIndent)(`${logger_1.NX_PREFIX} ${summary} (${filePath})
|
|
1029
|
-
${message}`));
|
|
1030
|
-
}
|
|
1031
|
-
/**
|
|
1032
|
-
* Register ts-node or swc-node given a set of compiler options.
|
|
1033
|
-
*
|
|
1034
|
-
* Note: Several options require enums from typescript. To avoid importing typescript,
|
|
1035
|
-
* use import type + raw values
|
|
1036
|
-
*
|
|
1037
|
-
* @returns cleanup method
|
|
1038
|
-
*/
|
|
1039
|
-
function registerTranspiler(compilerOptions, tsConfigRaw) {
|
|
1040
|
-
// Function to register transpiler that returns cleanup function
|
|
1041
|
-
const transpiler = getTranspiler(compilerOptions, tsConfigRaw);
|
|
1042
|
-
if (!transpiler) {
|
|
1043
|
-
// If Node.js natively supports TypeScript (22.6+), no transpiler is needed.
|
|
1044
|
-
// Don't warn - Node will handle .ts files via type stripping.
|
|
1045
|
-
if (!nodeSupportsNativeTypescript) {
|
|
1046
|
-
warnNoTranspiler();
|
|
1047
|
-
}
|
|
1048
|
-
return () => { };
|
|
1049
|
-
}
|
|
1050
|
-
return transpiler();
|
|
1051
|
-
}
|
|
1052
|
-
/**
|
|
1053
|
-
* @param tsConfigPath Adds the paths from a tsconfig file into node resolutions
|
|
1054
|
-
* @returns cleanup function
|
|
1055
|
-
*/
|
|
1056
|
-
function registerTsConfigPaths(tsConfigPath) {
|
|
1057
|
-
try {
|
|
1058
|
-
/**
|
|
1059
|
-
* Load the ts config from the source project
|
|
1060
|
-
*/
|
|
1061
|
-
const tsconfigPaths = loadTsConfigPaths();
|
|
1062
|
-
const tsConfigResult = tsconfigPaths.loadConfig(tsConfigPath);
|
|
1063
|
-
/**
|
|
1064
|
-
* Register the custom workspace path mappings with node so that workspace libraries
|
|
1065
|
-
* can be imported and used within project
|
|
1066
|
-
*/
|
|
1067
|
-
if (tsConfigResult.resultType === 'success') {
|
|
1068
|
-
// Short-circuit when the tsconfig has no `paths` entries. Installing
|
|
1069
|
-
// tsconfig-paths' resolver hook adds a per-require cost on every
|
|
1070
|
-
// module load; in package-manager-workspace setups (which resolve via
|
|
1071
|
-
// symlinks instead of TS path mappings), the hook never has anything
|
|
1072
|
-
// to do. Avoid paying that overhead on workspaces that don't use
|
|
1073
|
-
// `paths`.
|
|
1074
|
-
if (!tsConfigResult.paths ||
|
|
1075
|
-
Object.keys(tsConfigResult.paths).length === 0) {
|
|
1076
|
-
return () => { };
|
|
1077
|
-
}
|
|
1078
|
-
return tsconfigPaths.register({
|
|
1079
|
-
baseUrl: resolvePathsBaseUrl(tsConfigPath),
|
|
1080
|
-
paths: tsConfigResult.paths,
|
|
1081
|
-
});
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
catch (err) {
|
|
1085
|
-
if (err instanceof Error) {
|
|
1086
|
-
throw new Error(`Unable to load ${tsConfigPath}: ` + err.message);
|
|
1087
|
-
}
|
|
1088
|
-
}
|
|
1089
|
-
throw new Error(`Unable to load ${tsConfigPath}`);
|
|
1090
|
-
}
|
|
1091
|
-
function readCompilerOptions(tsConfigPath) {
|
|
1092
|
-
const preferTsNode = process.env.NX_PREFER_TS_NODE === 'true';
|
|
1093
|
-
if (swcNodeInstalled && !preferTsNode) {
|
|
1094
|
-
return {
|
|
1095
|
-
compilerOptions: readCompilerOptionsWithSwc(tsConfigPath),
|
|
1096
|
-
};
|
|
1097
|
-
}
|
|
1098
|
-
else {
|
|
1099
|
-
return readCompilerOptionsWithTypescript(tsConfigPath);
|
|
1100
|
-
}
|
|
1101
|
-
}
|
|
1102
|
-
function readCompilerOptionsWithSwc(tsConfigPath) {
|
|
1103
|
-
const { readDefaultTsConfig, } = require('@swc-node/register/read-default-tsconfig');
|
|
1104
|
-
const compilerOptions = readDefaultTsConfig(tsConfigPath);
|
|
1105
|
-
// This is returned in compiler options for some reason, but not part of the typings.
|
|
1106
|
-
// @swc-node/register filters the files to transpile based on it, but it can be limiting when processing
|
|
1107
|
-
// files not part of the received tsconfig included files (e.g. shared helpers, or config files not in source, etc.).
|
|
1108
|
-
delete compilerOptions.files;
|
|
1109
|
-
// @swc-node/register's readDefaultTsConfig auto-sets baseUrl to the
|
|
1110
|
-
// dirname of the tsconfig when not explicitly configured. This is incorrect
|
|
1111
|
-
// when paths are inherited via "extends" from a parent tsconfig at a
|
|
1112
|
-
// different directory level (e.g., tsconfig.base.json at workspace root),
|
|
1113
|
-
// because SWC will resolve "./"-prefixed paths relative to the wrong
|
|
1114
|
-
// directory. Use the workspace root as baseUrl in that case.
|
|
1115
|
-
// baseUrl will not be configured when using newer versions of TypeScript like `tsgo`.
|
|
1116
|
-
if (compilerOptions.paths) {
|
|
1117
|
-
const { options: tsOptions } = (0, typescript_1.readTsConfigWithoutFiles)(tsConfigPath);
|
|
1118
|
-
if (!tsOptions.baseUrl) {
|
|
1119
|
-
compilerOptions.baseUrl = workspace_root_1.workspaceRoot;
|
|
1120
|
-
}
|
|
1121
|
-
}
|
|
1122
|
-
return compilerOptions;
|
|
1123
|
-
}
|
|
1124
|
-
function readCompilerOptionsWithTypescript(tsConfigPath) {
|
|
1125
|
-
const { options, raw } = (0, typescript_1.readTsConfigWithoutFiles)(tsConfigPath);
|
|
1126
|
-
// This property is returned in compiler options for some reason, but not part of the typings.
|
|
1127
|
-
// ts-node fails on unknown props, so we have to remove it.
|
|
1128
|
-
delete options.configFilePath;
|
|
1129
|
-
return {
|
|
1130
|
-
compilerOptions: options,
|
|
1131
|
-
tsConfigRaw: raw,
|
|
1132
|
-
};
|
|
1133
|
-
}
|
|
1134
|
-
function loadTsConfigPaths() {
|
|
1135
|
-
try {
|
|
1136
|
-
return require('tsconfig-paths');
|
|
1137
|
-
}
|
|
1138
|
-
catch {
|
|
1139
|
-
warnNoTsconfigPaths();
|
|
1140
|
-
}
|
|
1141
|
-
}
|
|
1142
|
-
function warnTsNodeUsage() {
|
|
1143
|
-
logger_1.logger.warn((0, logger_1.stripIndent)(`${logger_1.NX_PREFIX} Falling back to ts-node for local typescript execution. This may be a little slower.
|
|
1144
|
-
- To fix this, ensure @swc-node/register and @swc/core have been installed`));
|
|
1145
|
-
}
|
|
1146
|
-
function warnNoTsconfigPaths() {
|
|
1147
|
-
logger_1.logger.warn((0, logger_1.stripIndent)(`${logger_1.NX_PREFIX} Unable to load tsconfig-paths, workspace libraries may be inaccessible.
|
|
1148
|
-
- To fix this, install tsconfig-paths with npm/yarn/pnpm`));
|
|
1149
|
-
}
|
|
1150
|
-
function warnNoTranspiler() {
|
|
1151
|
-
logger_1.logger.warn((0, logger_1.stripIndent)(`${logger_1.NX_PREFIX} Unable to locate swc-node or ts-node. Nx will be unable to run local ts files without transpiling.
|
|
1152
|
-
- To fix this, ensure @swc-node/register and @swc/core have been installed`));
|
|
1153
|
-
}
|
|
1154
|
-
function packageIsInstalled(m) {
|
|
1155
|
-
try {
|
|
1156
|
-
const p = require.resolve(m);
|
|
1157
|
-
return true;
|
|
1158
|
-
}
|
|
1159
|
-
catch {
|
|
1160
|
-
return false;
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
/**
|
|
1164
|
-
* ts-node requires string values for enum based typescript options.
|
|
1165
|
-
* `register`'s signature just types the field as `object`, so we
|
|
1166
|
-
* unfortunately do not get any kind of type safety on this.
|
|
1167
|
-
*/
|
|
1168
|
-
function getTsNodeCompilerOptions(compilerOptions) {
|
|
1169
|
-
if (!ts) {
|
|
1170
|
-
ts = require('typescript');
|
|
1171
|
-
}
|
|
1172
|
-
const flagMap = {
|
|
1173
|
-
module: 'ModuleKind',
|
|
1174
|
-
target: 'ScriptTarget',
|
|
1175
|
-
moduleDetection: 'ModuleDetectionKind',
|
|
1176
|
-
newLine: 'NewLineKind',
|
|
1177
|
-
moduleResolution: 'ModuleResolutionKind',
|
|
1178
|
-
importsNotUsedAsValues: 'ImportsNotUsedAsValues',
|
|
1179
|
-
};
|
|
1180
|
-
const result = {
|
|
1181
|
-
...compilerOptions,
|
|
1182
|
-
};
|
|
1183
|
-
for (const flag in flagMap) {
|
|
1184
|
-
if (compilerOptions[flag]) {
|
|
1185
|
-
result[flag] = ts[flagMap[flag]][compilerOptions[flag]];
|
|
1186
|
-
}
|
|
1187
|
-
}
|
|
1188
|
-
delete result.pathsBasePath;
|
|
1189
|
-
delete result.configFilePath;
|
|
1190
|
-
// instead of mapping to enum value we just remove it as it shouldn't ever need to be set for ts-node
|
|
1191
|
-
delete result.jsx;
|
|
1192
|
-
// lib option is in the format `lib.es2022.d.ts`, so we need to remove the leading `lib.` and trailing `.d.ts` to make it valid
|
|
1193
|
-
result.lib = result.lib?.map((value) => {
|
|
1194
|
-
return value.replace(/^lib\./, '').replace(/\.d\.ts$/, '');
|
|
1195
|
-
});
|
|
1196
|
-
if (result.moduleResolution) {
|
|
1197
|
-
result.moduleResolution =
|
|
1198
|
-
result.moduleResolution === 'NodeJs'
|
|
1199
|
-
? 'node'
|
|
1200
|
-
: result.moduleResolution.toLowerCase();
|
|
1201
|
-
}
|
|
1202
|
-
return result;
|
|
1203
|
-
}
|
|
1204
|
-
function resolvePathsBaseUrl(tsconfigPath) {
|
|
1205
|
-
const chain = [];
|
|
1206
|
-
const queue = [tsconfigPath];
|
|
1207
|
-
while (queue.length > 0) {
|
|
1208
|
-
const absolute = (0, path_1.resolve)(queue.shift());
|
|
1209
|
-
const dir = (0, path_1.dirname)(absolute);
|
|
1210
|
-
try {
|
|
1211
|
-
const raw = JSON.parse((0, fs_1.readFileSync)(absolute, 'utf-8'));
|
|
1212
|
-
chain.push({ dir, raw });
|
|
1213
|
-
const exts = raw.extends
|
|
1214
|
-
? Array.isArray(raw.extends)
|
|
1215
|
-
? raw.extends
|
|
1216
|
-
: [raw.extends]
|
|
1217
|
-
: [];
|
|
1218
|
-
for (const ext of exts) {
|
|
1219
|
-
const resolved = resolveExtendsPath(ext, dir);
|
|
1220
|
-
if (resolved) {
|
|
1221
|
-
queue.push(resolved);
|
|
1222
|
-
}
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
catch {
|
|
1226
|
-
// skip unreadable files
|
|
1227
|
-
}
|
|
1228
|
-
}
|
|
1229
|
-
let pathsIndex = -1;
|
|
1230
|
-
for (let i = 0; i < chain.length; i++) {
|
|
1231
|
-
if (chain[i].raw.compilerOptions?.paths &&
|
|
1232
|
-
Object.keys(chain[i].raw.compilerOptions.paths).length > 0) {
|
|
1233
|
-
pathsIndex = i;
|
|
1234
|
-
break;
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
const searchStart = pathsIndex >= 0 ? pathsIndex : 0;
|
|
1238
|
-
for (let i = searchStart; i < chain.length; i++) {
|
|
1239
|
-
if (chain[i].raw.compilerOptions?.baseUrl) {
|
|
1240
|
-
return (0, path_1.resolve)(chain[i].dir, chain[i].raw.compilerOptions.baseUrl);
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
1243
|
-
return pathsIndex >= 0
|
|
1244
|
-
? chain[pathsIndex].dir
|
|
1245
|
-
: (0, path_1.dirname)((0, path_1.resolve)(tsconfigPath));
|
|
1246
|
-
}
|
|
1247
|
-
function resolveExtendsPath(ext, fromDir) {
|
|
1248
|
-
if (ext.startsWith('.') || (0, path_1.isAbsolute)(ext)) {
|
|
1249
|
-
let resolved = (0, path_1.resolve)(fromDir, ext);
|
|
1250
|
-
if ((0, fs_1.existsSync)(resolved))
|
|
1251
|
-
return resolved;
|
|
1252
|
-
if (!resolved.endsWith('.json')) {
|
|
1253
|
-
resolved += '.json';
|
|
1254
|
-
if ((0, fs_1.existsSync)(resolved))
|
|
1255
|
-
return resolved;
|
|
1256
|
-
}
|
|
1257
|
-
return null;
|
|
1258
|
-
}
|
|
1259
|
-
try {
|
|
1260
|
-
return require.resolve(ext, { paths: [fromDir] });
|
|
1261
|
-
}
|
|
1262
|
-
catch {
|
|
1263
|
-
try {
|
|
1264
|
-
return require.resolve(`${ext}/tsconfig.json`, { paths: [fromDir] });
|
|
1265
|
-
}
|
|
1266
|
-
catch {
|
|
1267
|
-
return null;
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
}
|