@ohos-ports/nx 19.8.4-beta.2 → 20.8.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +146 -0
- package/LICENSE +1 -1
- package/bin/init-local.js +0 -39
- package/bin/nx.js +28 -15
- package/bin/post-install.js +7 -5
- package/migrations.json +11 -37
- package/ohos-build/build-Cargo.toml.patch +12 -0
- package/ohos-build/build-cargo-config.patch +20 -0
- package/ohos-build/index.js.patch +18 -0
- package/ohos-build/native-bindings.js.patch +25 -0
- package/ohos-build/nix-0.25.1-ohos.patch +539 -0
- package/ohos-build/nix-0.27.1-ohos.patch +436 -0
- package/package.json +25 -62
- package/plugins/package-json.d.ts +5 -1
- package/plugins/package-json.js +27 -2
- package/release/changelog-renderer/index.d.ts +102 -0
- package/release/changelog-renderer/index.js +339 -0
- package/release/index.d.ts +4 -0
- package/release/index.js +13 -0
- package/schemas/nx-schema.json +964 -0
- package/schemas/project-schema.json +331 -0
- package/schemas/workspace-schema.json +185 -0
- package/src/adapter/angular-json.js +2 -8
- package/src/adapter/compat.d.ts +1 -1
- package/src/adapter/compat.js +3 -1
- package/src/adapter/ngcli-adapter.js +7 -7
- package/src/command-line/add/add.js +21 -48
- package/src/command-line/affected/affected.js +3 -3
- package/src/command-line/connect/view-logs.js +1 -1
- package/src/command-line/examples.js +0 -4
- package/src/command-line/exec/exec.js +3 -3
- package/src/command-line/format/command-object.js +9 -0
- package/src/command-line/format/format.js +10 -6
- package/src/command-line/generate/command-object.js +1 -2
- package/src/command-line/generate/generate.d.ts +1 -1
- package/src/command-line/generate/generate.js +3 -1
- package/src/command-line/generate/generator-utils.js +10 -5
- package/src/command-line/graph/graph.js +6 -9
- package/src/command-line/import/import.js +110 -71
- package/src/command-line/init/command-object.js +25 -9
- package/src/command-line/init/configure-plugins.d.ts +34 -0
- package/src/command-line/init/configure-plugins.js +203 -0
- package/src/command-line/init/implementation/add-nx-to-turborepo.d.ts +4 -0
- package/src/command-line/init/implementation/add-nx-to-turborepo.js +49 -0
- package/src/command-line/init/implementation/angular/integrated-workspace.js +1 -1
- package/src/command-line/init/implementation/angular/legacy-angular-versions.js +4 -3
- package/src/command-line/init/implementation/angular/standalone-workspace.js +8 -5
- package/src/command-line/init/implementation/check-compatible-with-plugins.d.ts +15 -0
- package/src/command-line/init/implementation/check-compatible-with-plugins.js +134 -0
- package/src/command-line/init/implementation/deduce-default-base.d.ts +1 -0
- package/src/command-line/init/implementation/deduce-default-base.js +53 -0
- package/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +1 -1
- package/src/command-line/init/implementation/dot-nx/nxw.js +1 -1
- package/src/command-line/init/implementation/react/add-vite-commands-to-package-scripts.js +6 -4
- package/src/command-line/init/implementation/react/check-for-uncommitted-changes.js +1 -1
- package/src/command-line/init/implementation/react/index.d.ts +1 -1
- package/src/command-line/init/implementation/react/index.js +33 -186
- package/src/command-line/init/implementation/react/write-vite-config.js +19 -3
- package/src/command-line/init/implementation/utils.d.ts +6 -2
- package/src/command-line/init/implementation/utils.js +116 -37
- package/src/command-line/init/init-v1.js +2 -2
- package/src/command-line/init/init-v2.d.ts +2 -2
- package/src/command-line/init/init-v2.js +73 -55
- package/src/command-line/login/login.js +3 -0
- package/src/command-line/logout/logout.js +3 -0
- package/src/command-line/migrate/command-object.js +2 -96
- package/src/command-line/migrate/migrate.d.ts +1 -0
- package/src/command-line/migrate/migrate.js +111 -19
- package/src/command-line/nx-commands.js +20 -6
- package/src/command-line/register/command-object.d.ts +6 -0
- package/src/command-line/{activate-powerpack → register}/command-object.js +9 -9
- package/src/command-line/register/register.d.ts +2 -0
- package/src/command-line/register/register.js +9 -0
- package/src/command-line/release/changelog.d.ts +5 -4
- package/src/command-line/release/changelog.js +64 -79
- package/src/command-line/release/command-object.d.ts +7 -4
- package/src/command-line/release/command-object.js +24 -13
- package/src/command-line/release/config/config.d.ts +8 -7
- package/src/command-line/release/config/config.js +173 -43
- package/src/command-line/release/config/conventional-commits.js +7 -0
- package/src/command-line/release/config/filter-release-groups.d.ts +4 -0
- package/src/command-line/release/config/filter-release-groups.js +10 -3
- package/src/command-line/release/config/use-legacy-versioning.d.ts +2 -0
- package/src/command-line/release/config/use-legacy-versioning.js +9 -0
- package/src/command-line/release/config/version-plans.js +1 -1
- package/src/command-line/release/index.d.ts +9 -2
- package/src/command-line/release/index.js +6 -1
- package/src/command-line/release/plan-check.js +6 -3
- package/src/command-line/release/plan.js +8 -4
- package/src/command-line/release/publish.d.ts +6 -1
- package/src/command-line/release/publish.js +50 -27
- package/src/command-line/release/release.js +33 -20
- package/src/command-line/release/utils/batch-projects-by-generator-config.js +6 -3
- package/src/command-line/release/utils/exec-command.js +1 -1
- package/src/command-line/release/utils/git.d.ts +3 -2
- package/src/command-line/release/utils/git.js +104 -19
- package/src/command-line/release/utils/github.d.ts +1 -0
- package/src/command-line/release/utils/github.js +6 -2
- package/src/command-line/release/utils/launch-editor.js +2 -2
- package/src/command-line/release/utils/resolve-changelog-renderer.d.ts +2 -2
- package/src/command-line/release/utils/resolve-changelog-renderer.js +3 -3
- package/src/command-line/release/utils/resolve-semver-specifier.d.ts +2 -1
- package/src/command-line/release/utils/resolve-semver-specifier.js +2 -1
- package/src/command-line/release/utils/semver.d.ts +8 -0
- package/src/command-line/release/utils/semver.js +8 -0
- package/src/command-line/release/utils/shared-legacy.d.ts +25 -0
- package/src/command-line/release/utils/shared-legacy.js +2 -0
- package/src/command-line/release/utils/shared.d.ts +11 -17
- package/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts +7 -0
- package/src/command-line/release/version/derive-specifier-from-conventional-commits.js +47 -0
- package/src/command-line/release/version/deriver-specifier-from-version-plans.d.ts +8 -0
- package/src/command-line/release/version/deriver-specifier-from-version-plans.js +59 -0
- package/src/command-line/release/version/project-logger.d.ts +8 -0
- package/src/command-line/release/version/project-logger.js +45 -0
- package/src/command-line/release/version/release-group-processor.d.ts +251 -0
- package/src/command-line/release/version/release-group-processor.js +1048 -0
- package/src/command-line/release/version/resolve-current-version.d.ts +32 -0
- package/src/command-line/release/version/resolve-current-version.js +241 -0
- package/src/command-line/release/version/test-utils.d.ts +95 -0
- package/src/command-line/release/version/test-utils.js +416 -0
- package/src/command-line/release/version/topological-sort.d.ts +9 -0
- package/src/command-line/release/version/topological-sort.js +41 -0
- package/src/command-line/release/version/version-actions.d.ts +170 -0
- package/src/command-line/release/version/version-actions.js +183 -0
- package/src/command-line/release/version-legacy.d.ts +46 -0
- package/src/command-line/release/version-legacy.js +453 -0
- package/src/command-line/release/version.d.ts +0 -40
- package/src/command-line/release/version.js +93 -255
- package/src/command-line/report/report.d.ts +7 -3
- package/src/command-line/report/report.js +52 -16
- package/src/command-line/run/executor-utils.js +4 -4
- package/src/command-line/run/run-one.js +37 -15
- package/src/command-line/run/run.js +1 -2
- package/src/command-line/run-many/run-many.js +1 -4
- package/src/command-line/show/project.js +25 -3
- package/src/command-line/show/projects.js +4 -0
- package/src/command-line/sync/sync.js +3 -3
- package/src/command-line/watch/watch.js +1 -1
- package/src/command-line/yargs-utils/shared-options.d.ts +4 -0
- package/src/command-line/yargs-utils/shared-options.js +26 -0
- package/src/config/misc-interfaces.d.ts +3 -15
- package/src/config/nx-json.d.ts +145 -19
- package/src/config/project-graph.d.ts +4 -4
- package/src/config/project-graph.js +8 -0
- package/src/config/schema-utils.d.ts +4 -3
- package/src/config/schema-utils.js +71 -4
- package/src/config/workspace-json-project-json.d.ts +23 -2
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/runtime.js +1 -1
- package/src/core/graph/styles.css +2 -2
- package/src/core/graph/styles.js +1 -1
- package/src/daemon/client/client.d.ts +5 -0
- package/src/daemon/client/client.js +42 -4
- package/src/daemon/client/generate-help-output.js +1 -1
- package/src/daemon/message-types/glob.d.ts +7 -0
- package/src/daemon/message-types/glob.js +9 -1
- package/src/daemon/message-types/hash-glob.d.ts +6 -0
- package/src/daemon/message-types/hash-glob.js +9 -1
- package/src/daemon/message-types/run-tasks-execution-hooks.d.ts +13 -0
- package/src/daemon/message-types/run-tasks-execution-hooks.js +19 -0
- package/src/daemon/server/handle-glob.d.ts +1 -0
- package/src/daemon/server/handle-glob.js +8 -0
- package/src/daemon/server/handle-hash-glob.d.ts +1 -0
- package/src/daemon/server/handle-hash-glob.js +8 -0
- package/src/daemon/server/handle-hash-tasks.js +1 -1
- package/src/daemon/server/handle-tasks-execution-hooks.d.ts +19 -0
- package/src/daemon/server/handle-tasks-execution-hooks.js +35 -0
- package/src/daemon/server/logger.js +2 -1
- package/src/daemon/server/project-graph-incremental-recomputation.js +5 -5
- package/src/daemon/server/server.js +26 -2
- package/src/daemon/server/shutdown-utils.js +4 -2
- package/src/devkit-exports.d.ts +10 -7
- package/src/devkit-exports.js +4 -6
- package/src/devkit-internals.d.ts +4 -2
- package/src/devkit-internals.js +8 -3
- package/src/executors/run-commands/run-commands.impl.d.ts +1 -0
- package/src/executors/run-commands/run-commands.impl.js +11 -4
- package/src/executors/run-commands/schema.json +14 -0
- package/src/executors/run-script/run-script.impl.js +1 -1
- package/src/executors/utils/convert-nx-executor.js +2 -4
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +8 -0
- package/src/generators/testing-utils/create-tree.js +5 -1
- package/src/generators/utils/nx-json.d.ts +1 -1
- package/src/generators/utils/project-configuration.js +15 -4
- package/src/hasher/create-task-hasher.js +1 -1
- package/src/hasher/file-hasher.d.ts +1 -0
- package/src/hasher/file-hasher.js +5 -0
- package/src/hasher/hash-task.js +1 -1
- package/src/hasher/task-hasher.d.ts +2 -6
- package/src/hasher/task-hasher.js +6 -32
- package/src/migrations/update-20-0-0/move-use-daemon-process.d.ts +2 -0
- package/src/migrations/update-20-0-0/move-use-daemon-process.js +25 -0
- package/src/migrations/update-20-0-1/use-legacy-cache.d.ts +2 -0
- package/src/migrations/update-20-0-1/use-legacy-cache.js +20 -0
- package/src/native/index.d.ts +49 -20
- package/src/native/index.js +18 -3
- package/src/native/native-bindings.js +12 -2
- package/src/native/nx.openharmony-arm64.node +0 -0
- package/src/native/nx.wasi-browser.js +11 -8
- package/src/native/nx.wasi.cjs +11 -8
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/native/tests/__fixtures__/file-lock.fixture.js +20 -0
- package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +3 -2
- package/src/nx-cloud/update-manager.js +13 -1
- package/src/plugins/js/index.js +2 -2
- package/src/plugins/js/lock-file/lock-file.js +28 -13
- package/src/plugins/js/lock-file/utils/package-json.d.ts +1 -1
- package/src/plugins/js/lock-file/utils/package-json.js +3 -1
- package/src/plugins/js/lock-file/yarn-parser.js +102 -44
- package/src/plugins/js/project-graph/affected/lock-file-changes.js +1 -0
- package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.d.ts +2 -2
- package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +6 -20
- package/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +1 -1
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts +14 -2
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +81 -19
- package/src/plugins/js/utils/config.js +2 -9
- package/src/plugins/js/utils/packages.d.ts +8 -0
- package/src/plugins/js/utils/packages.js +91 -0
- package/src/plugins/js/utils/register.d.ts +5 -1
- package/src/plugins/js/utils/register.js +2 -1
- package/src/plugins/js/utils/typescript.d.ts +1 -0
- package/src/plugins/js/utils/typescript.js +4 -3
- package/src/plugins/js/versions.d.ts +1 -1
- package/src/plugins/js/versions.js +1 -1
- package/src/plugins/package-json/create-nodes.d.ts +7 -8
- package/src/plugins/package-json/create-nodes.js +34 -12
- package/src/project-graph/affected/affected-project-graph.js +3 -0
- package/src/project-graph/affected/locators/project-glob-changes.js +16 -4
- package/src/project-graph/build-project-graph.d.ts +2 -1
- package/src/project-graph/build-project-graph.js +66 -43
- package/src/project-graph/error-types.d.ts +15 -12
- package/src/project-graph/error-types.js +109 -23
- package/src/project-graph/file-utils.d.ts +3 -3
- package/src/project-graph/file-utils.js +8 -7
- package/src/project-graph/nx-deps-cache.d.ts +6 -3
- package/src/project-graph/nx-deps-cache.js +66 -11
- package/src/project-graph/plugins/get-plugins.d.ts +4 -0
- package/src/project-graph/plugins/get-plugins.js +144 -0
- package/src/project-graph/plugins/in-process-loader.d.ts +10 -0
- package/src/project-graph/plugins/in-process-loader.js +60 -0
- package/src/project-graph/plugins/index.d.ts +2 -1
- package/src/project-graph/plugins/index.js +5 -3
- package/src/project-graph/plugins/isolation/enabled.d.ts +1 -0
- package/src/project-graph/plugins/isolation/enabled.js +19 -0
- package/src/project-graph/plugins/isolation/index.d.ts +2 -2
- package/src/project-graph/plugins/isolation/index.js +1 -7
- package/src/project-graph/plugins/isolation/messaging.d.ts +39 -21
- package/src/project-graph/plugins/isolation/messaging.js +5 -1
- package/src/project-graph/plugins/isolation/plugin-pool.d.ts +1 -1
- package/src/project-graph/plugins/isolation/plugin-pool.js +58 -49
- package/src/project-graph/plugins/isolation/plugin-worker.js +79 -29
- package/src/project-graph/plugins/load-resolved-plugin.d.ts +3 -0
- package/src/project-graph/plugins/load-resolved-plugin.js +22 -0
- package/src/project-graph/plugins/loaded-nx-plugin.d.ts +20 -0
- package/src/project-graph/plugins/loaded-nx-plugin.js +80 -0
- package/src/project-graph/plugins/public-api.d.ts +32 -13
- package/src/project-graph/plugins/resolve-plugin.d.ts +15 -0
- package/src/project-graph/plugins/resolve-plugin.js +134 -0
- package/src/project-graph/plugins/tasks-execution-hooks.d.ts +3 -0
- package/src/project-graph/plugins/tasks-execution-hooks.js +65 -0
- package/src/project-graph/plugins/transpiler.d.ts +8 -0
- package/src/project-graph/plugins/transpiler.js +47 -0
- package/src/project-graph/plugins/utils.d.ts +2 -8
- package/src/project-graph/plugins/utils.js +2 -39
- package/src/project-graph/project-graph.d.ts +3 -1
- package/src/project-graph/project-graph.js +86 -20
- package/src/project-graph/utils/project-configuration-utils.d.ts +2 -2
- package/src/project-graph/utils/project-configuration-utils.js +55 -25
- package/src/project-graph/utils/retrieve-workspace-files.d.ts +3 -7
- package/src/project-graph/utils/retrieve-workspace-files.js +17 -23
- package/src/tasks-runner/batch/batch-messages.d.ts +2 -0
- package/src/tasks-runner/batch/run-batch.js +2 -4
- package/src/tasks-runner/cache.d.ts +22 -4
- package/src/tasks-runner/cache.js +160 -18
- package/src/tasks-runner/create-task-graph.d.ts +13 -1
- package/src/tasks-runner/create-task-graph.js +50 -22
- package/src/tasks-runner/default-tasks-runner.d.ts +1 -0
- package/src/tasks-runner/default-tasks-runner.js +20 -2
- package/src/tasks-runner/forked-process-task-runner.d.ts +4 -1
- package/src/tasks-runner/forked-process-task-runner.js +62 -40
- package/src/tasks-runner/init-tasks-runner.js +0 -2
- package/src/tasks-runner/life-cycle.d.ts +7 -0
- package/src/tasks-runner/run-command.d.ts +2 -4
- package/src/tasks-runner/run-command.js +51 -18
- package/src/tasks-runner/task-graph-utils.d.ts +11 -0
- package/src/tasks-runner/task-graph-utils.js +23 -0
- package/src/tasks-runner/task-orchestrator.js +14 -4
- package/src/tasks-runner/utils.js +2 -0
- package/src/utils/ab-testing.js +1 -1
- package/src/utils/assert-workspace-validity.js +4 -0
- package/src/utils/child-process.d.ts +4 -0
- package/src/utils/child-process.js +23 -30
- package/src/utils/command-line-utils.d.ts +5 -3
- package/src/utils/command-line-utils.js +37 -57
- package/src/utils/db-connection.d.ts +2 -1
- package/src/utils/db-connection.js +7 -0
- package/src/utils/default-base.js +1 -1
- package/src/utils/delayed-spinner.d.ts +42 -0
- package/src/utils/delayed-spinner.js +80 -0
- package/src/utils/find-matching-projects.js +13 -1
- package/src/utils/git-utils.index-filter.js +2 -2
- package/src/utils/git-utils.js +4 -4
- package/src/utils/git-utils.tree-filter.js +1 -1
- package/src/utils/handle-errors.js +24 -13
- package/src/utils/is-ci.js +4 -1
- package/src/utils/is-using-prettier.d.ts +3 -0
- package/src/utils/is-using-prettier.js +62 -0
- package/src/utils/nx-cloud-utils.js +3 -0
- package/src/utils/nx-key.d.ts +7 -0
- package/src/utils/nx-key.js +52 -0
- package/src/utils/package-json.d.ts +5 -1
- package/src/utils/package-json.js +9 -3
- package/src/utils/package-manager.d.ts +14 -0
- package/src/utils/package-manager.js +89 -3
- package/src/utils/path.js +1 -1
- package/src/utils/plugins/core-plugins.js +4 -0
- package/src/utils/plugins/plugin-capabilities.js +4 -5
- package/src/utils/print-help.js +3 -9
- package/src/utils/require-nx-key.d.ts +1 -0
- package/src/utils/require-nx-key.js +22 -0
- package/src/utils/sync-generators.js +9 -14
- package/src/utils/task-history.d.ts +1 -1
- package/src/utils/task-history.js +2 -2
- package/src/utils/workspace-context.d.ts +2 -0
- package/src/utils/workspace-context.js +16 -0
- package/tasks-runners/default.d.ts +1 -0
- package/tasks-runners/default.js +5 -0
- package/src/command-line/activate-powerpack/activate-powerpack.d.ts +0 -2
- package/src/command-line/activate-powerpack/activate-powerpack.js +0 -34
- package/src/command-line/activate-powerpack/command-object.d.ts +0 -6
- package/src/command-line/import/utils/needs-install.d.ts +0 -3
- package/src/command-line/import/utils/needs-install.js +0 -31
- package/src/command-line/init/implementation/react/write-craco-config.d.ts +0 -1
- package/src/command-line/init/implementation/react/write-craco-config.js +0 -61
- package/src/daemon/server/plugins.d.ts +0 -3
- package/src/daemon/server/plugins.js +0 -32
- package/src/hasher/node-task-hasher-impl.d.ts +0 -48
- package/src/hasher/node-task-hasher-impl.js +0 -449
- package/src/migrations/update-15-0-0/migrate-to-inputs.d.ts +0 -2
- package/src/migrations/update-15-0-0/migrate-to-inputs.js +0 -102
- package/src/migrations/update-15-0-0/prefix-outputs.d.ts +0 -2
- package/src/migrations/update-15-0-0/prefix-outputs.js +0 -49
- package/src/migrations/update-16-0-0/remove-nrwl-cli.d.ts +0 -2
- package/src/migrations/update-16-0-0/remove-nrwl-cli.js +0 -16
- package/src/migrations/update-16-0-0/update-depends-on-to-tokens.d.ts +0 -2
- package/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +0 -97
- package/src/migrations/update-16-0-0/update-nx-cloud-runner.d.ts +0 -2
- package/src/migrations/update-16-0-0/update-nx-cloud-runner.js +0 -29
- package/src/migrations/update-16-2-0/remove-run-commands-output-path.d.ts +0 -2
- package/src/migrations/update-16-2-0/remove-run-commands-output-path.js +0 -45
- package/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.d.ts +0 -12
- package/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.js +0 -67
- package/src/migrations/update-16-9-0/remove-project-name-and-root-format.d.ts +0 -2
- package/src/migrations/update-16-9-0/remove-project-name-and-root-format.js +0 -21
- package/src/native/nx.ohos-arm64.node +0 -0
- package/src/project-graph/plugins/internal-api.d.ts +0 -29
- package/src/project-graph/plugins/internal-api.js +0 -134
- package/src/project-graph/plugins/loader.d.ts +0 -24
- package/src/project-graph/plugins/loader.js +0 -220
- package/src/utils/app-root.d.ts +0 -8
- package/src/utils/app-root.js +0 -12
- package/src/utils/nx-plugin.deprecated.d.ts +0 -31
- package/src/utils/nx-plugin.deprecated.js +0 -20
- package/src/utils/powerpack.d.ts +0 -5
- package/src/utils/powerpack.js +0 -33
- package/src/utils/workspace-configuration-check.d.ts +0 -1
- package/src/utils/workspace-configuration-check.js +0 -36
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../.eslintrc",
|
|
3
|
+
"rules": {},
|
|
4
|
+
"ignorePatterns": ["!**/*", "**/__fixtures__/**/*"],
|
|
5
|
+
"overrides": [
|
|
6
|
+
{
|
|
7
|
+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
|
8
|
+
"rules": {
|
|
9
|
+
"no-restricted-imports": [
|
|
10
|
+
"error",
|
|
11
|
+
{
|
|
12
|
+
"paths": [
|
|
13
|
+
{
|
|
14
|
+
"name": "fs-extra",
|
|
15
|
+
"message": "Please use equivalent utilities from `node:fs` instead."
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"patterns": [
|
|
19
|
+
{
|
|
20
|
+
"group": ["**/devkit-exports"],
|
|
21
|
+
"message": "Do not import from devkit-exports from the nx package"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"files": ["*.ts"],
|
|
30
|
+
"excludedFiles": ["*.spec.ts"],
|
|
31
|
+
"rules": {
|
|
32
|
+
"@typescript-eslint/no-restricted-imports": [
|
|
33
|
+
"error",
|
|
34
|
+
{
|
|
35
|
+
"paths": [
|
|
36
|
+
{
|
|
37
|
+
"name": "typescript",
|
|
38
|
+
"message": "TypeScript is an optional dependency for Nx. If you need to use it, make sure its installed first with ensureTypescript.",
|
|
39
|
+
"allowTypeImports": true
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"patterns": [
|
|
43
|
+
{
|
|
44
|
+
"group": ["nx/*"],
|
|
45
|
+
"message": "Circular import in 'nx' found. Use relative path."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"group": ["**/native-bindings", "**/native-bindings.js"],
|
|
49
|
+
"message": "Direct imports from native-bindings.js are not allowed. Import from index.js instead."
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"files": ["*.js", "*.jsx"],
|
|
58
|
+
"rules": {}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"files": ["./package.json", "./executors.json", "./migrations.json"],
|
|
62
|
+
"parser": "jsonc-eslint-parser",
|
|
63
|
+
"rules": {
|
|
64
|
+
"@nx/nx-plugin-checks": [
|
|
65
|
+
"error",
|
|
66
|
+
{
|
|
67
|
+
"allowedVersionStrings": ["latest"]
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"files": ["nxw.ts"],
|
|
74
|
+
"rules": {
|
|
75
|
+
"@typescript-eslint/no-restricted-imports": [
|
|
76
|
+
"error",
|
|
77
|
+
{
|
|
78
|
+
"patterns": [
|
|
79
|
+
{
|
|
80
|
+
"group": ["*", "!fs"],
|
|
81
|
+
"message": "The Nx wrapper is ran before packages are installed. It should only import node builtins.",
|
|
82
|
+
"allowTypeImports": true
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"no-restricted-modules": [
|
|
88
|
+
"error",
|
|
89
|
+
{
|
|
90
|
+
"patterns": ["*", "!fs", "!path", "!child_process", "!node:*"]
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"no-restricted-imports": "off"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"files": ["./package.json"],
|
|
98
|
+
"parser": "jsonc-eslint-parser",
|
|
99
|
+
"rules": {
|
|
100
|
+
"@nx/dependency-checks": [
|
|
101
|
+
"error",
|
|
102
|
+
{
|
|
103
|
+
"buildTargets": ["build-base"],
|
|
104
|
+
"ignoredDependencies": [
|
|
105
|
+
"typescript",
|
|
106
|
+
"@nrwl/angular",
|
|
107
|
+
"@angular-devkit/build-angular",
|
|
108
|
+
"@angular-devkit/core",
|
|
109
|
+
"@angular-devkit/architect",
|
|
110
|
+
"@swc/core", //Optional, used in JS analysis if available
|
|
111
|
+
"@swc/node-register", //Optional, used in JS analysis if available
|
|
112
|
+
"rxjs",
|
|
113
|
+
"@angular-devkit/schematics",
|
|
114
|
+
"@pnpm/lockfile-types",
|
|
115
|
+
"@nestjs/cli", // nx init nest makes use of nestjs cli (which should be available in NestJS CLI app) to parse the nest-cli.json file
|
|
116
|
+
"ts-node", // We *may* fall back on ts-node, but we want to encourage the use of @swc-node instead so we don't explicitly list ts-node as an optional dep
|
|
117
|
+
"memfs", // used in mock for handling .node files in tests
|
|
118
|
+
"events", // This is coming from @storybook/builder-manager since it uses the browser polyfill
|
|
119
|
+
"process", // This is coming from @storybook/builder-manager since it uses the browser polyfill
|
|
120
|
+
"prettier", // This is coming from @storybook/builder-manager since it uses the browser polyfill
|
|
121
|
+
"util", // This is coming from @storybook/builder-manager since it uses the browser polyfill
|
|
122
|
+
// The native modules are optional and only one of them will ever be installed on a given machine
|
|
123
|
+
"@nx/nx-darwin-x64",
|
|
124
|
+
"@nx/nx-darwin-arm64",
|
|
125
|
+
"@nx/nx-linux-x64-gnu",
|
|
126
|
+
"@nx/nx-linux-x64-musl",
|
|
127
|
+
"@nx/nx-win32-x64-msvc",
|
|
128
|
+
"@nx/nx-linux-arm64-gnu",
|
|
129
|
+
"@nx/nx-linux-arm64-musl",
|
|
130
|
+
"@nx/nx-linux-arm-gnueabihf",
|
|
131
|
+
"@nx/nx-win32-arm64-msvc",
|
|
132
|
+
"@nx/nx-freebsd-x64",
|
|
133
|
+
"@nx/powerpack-license",
|
|
134
|
+
"@nx/key",
|
|
135
|
+
// Powerpack plugin conditionally available dynamically at runtime
|
|
136
|
+
"@nx/powerpack-conformance",
|
|
137
|
+
"@nx/conformance",
|
|
138
|
+
// Only used in test-utils at the time of writing
|
|
139
|
+
"@ltd/j-toml"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|
package/LICENSE
CHANGED
package/bin/init-local.js
CHANGED
|
@@ -5,7 +5,6 @@ exports.rewriteTargetsAndProjects = rewriteTargetsAndProjects;
|
|
|
5
5
|
const perf_hooks_1 = require("perf_hooks");
|
|
6
6
|
const nx_commands_1 = require("../src/command-line/nx-commands");
|
|
7
7
|
const strip_indents_1 = require("../src/utils/strip-indents");
|
|
8
|
-
const Mod = require("module");
|
|
9
8
|
/**
|
|
10
9
|
* Nx is being run inside a workspace.
|
|
11
10
|
*
|
|
@@ -15,7 +14,6 @@ function initLocal(workspace) {
|
|
|
15
14
|
process.env.NX_CLI_SET = 'true';
|
|
16
15
|
try {
|
|
17
16
|
perf_hooks_1.performance.mark('init-local');
|
|
18
|
-
monkeyPatchRequire();
|
|
19
17
|
if (workspace.type !== 'nx' && shouldDelegateToAngularCLI()) {
|
|
20
18
|
console.warn((0, strip_indents_1.stripIndents) `Using Nx to run Angular CLI commands is deprecated and will be removed in a future version.
|
|
21
19
|
To run Angular CLI commands, use \`ng\`.`);
|
|
@@ -144,40 +142,3 @@ To update the cache configuration, you can directly update the relevant options
|
|
|
144
142
|
}
|
|
145
143
|
}
|
|
146
144
|
}
|
|
147
|
-
// TODO(v17): Remove this once the @nrwl/* packages are not
|
|
148
|
-
function monkeyPatchRequire() {
|
|
149
|
-
const originalRequire = Mod.prototype.require;
|
|
150
|
-
Mod.prototype.require = function (...args) {
|
|
151
|
-
const modulePath = args[0];
|
|
152
|
-
if (!modulePath.startsWith('@nrwl/')) {
|
|
153
|
-
return originalRequire.apply(this, args);
|
|
154
|
-
}
|
|
155
|
-
else {
|
|
156
|
-
try {
|
|
157
|
-
// Try the original require
|
|
158
|
-
return originalRequire.apply(this, args);
|
|
159
|
-
}
|
|
160
|
-
catch (e) {
|
|
161
|
-
if (e.code !== 'MODULE_NOT_FOUND') {
|
|
162
|
-
throw e;
|
|
163
|
-
}
|
|
164
|
-
try {
|
|
165
|
-
// Retry the require with the @nx package
|
|
166
|
-
return originalRequire.apply(this, args.map((value, i) => {
|
|
167
|
-
if (i !== 0) {
|
|
168
|
-
return value;
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
return value.replace('@nrwl/', '@nx/');
|
|
172
|
-
}
|
|
173
|
-
}));
|
|
174
|
-
}
|
|
175
|
-
catch {
|
|
176
|
-
// Throw the original error
|
|
177
|
-
throw e;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
// do some side-effect of your own
|
|
182
|
-
};
|
|
183
|
-
}
|
package/bin/nx.js
CHANGED
|
@@ -16,6 +16,8 @@ const assert_supported_platform_1 = require("../src/native/assert-supported-plat
|
|
|
16
16
|
const perf_hooks_1 = require("perf_hooks");
|
|
17
17
|
const workspace_context_1 = require("../src/utils/workspace-context");
|
|
18
18
|
const client_1 = require("../src/daemon/client/client");
|
|
19
|
+
const db_connection_1 = require("../src/utils/db-connection");
|
|
20
|
+
const exit_codes_1 = require("../src/utils/exit-codes");
|
|
19
21
|
function main() {
|
|
20
22
|
if (process.argv[2] !== 'report' &&
|
|
21
23
|
process.argv[2] !== '--version' &&
|
|
@@ -127,19 +129,9 @@ function resolveNx(workspace) {
|
|
|
127
129
|
}
|
|
128
130
|
catch { }
|
|
129
131
|
// check for root install
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
catch {
|
|
136
|
-
// TODO(v17): Remove this
|
|
137
|
-
// fallback for old CLI install setup
|
|
138
|
-
// nx-ignore-next-line
|
|
139
|
-
return require.resolve('@nrwl/cli/bin/nx.js', {
|
|
140
|
-
paths: [workspace ? workspace.dir : globalsRoot],
|
|
141
|
-
});
|
|
142
|
-
}
|
|
132
|
+
return require.resolve('nx/bin/nx.js', {
|
|
133
|
+
paths: [workspace ? workspace.dir : globalsRoot],
|
|
134
|
+
});
|
|
143
135
|
}
|
|
144
136
|
function handleMissingLocalInstallation() {
|
|
145
137
|
output_1.output.error({
|
|
@@ -201,7 +193,7 @@ function getLocalNxVersion(workspace) {
|
|
|
201
193
|
function _getLatestVersionOfNx() {
|
|
202
194
|
try {
|
|
203
195
|
return (0, child_process_1.execSync)('npm view nx@latest version', {
|
|
204
|
-
windowsHide:
|
|
196
|
+
windowsHide: false,
|
|
205
197
|
})
|
|
206
198
|
.toString()
|
|
207
199
|
.trim();
|
|
@@ -209,7 +201,7 @@ function _getLatestVersionOfNx() {
|
|
|
209
201
|
catch {
|
|
210
202
|
try {
|
|
211
203
|
return (0, child_process_1.execSync)('pnpm view nx@latest version', {
|
|
212
|
-
windowsHide:
|
|
204
|
+
windowsHide: false,
|
|
213
205
|
})
|
|
214
206
|
.toString()
|
|
215
207
|
.trim();
|
|
@@ -223,4 +215,25 @@ const getLatestVersionOfNx = ((fn) => {
|
|
|
223
215
|
let cache = null;
|
|
224
216
|
return () => cache || (cache = fn());
|
|
225
217
|
})(_getLatestVersionOfNx);
|
|
218
|
+
function nxCleanup(signal) {
|
|
219
|
+
(0, db_connection_1.removeDbConnections)();
|
|
220
|
+
if (signal) {
|
|
221
|
+
process.exit((0, exit_codes_1.signalToCode)(signal));
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
process.exit();
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
process.on('exit', () => {
|
|
228
|
+
nxCleanup();
|
|
229
|
+
});
|
|
230
|
+
process.on('SIGINT', () => {
|
|
231
|
+
nxCleanup('SIGINT');
|
|
232
|
+
});
|
|
233
|
+
process.on('SIGTERM', () => {
|
|
234
|
+
nxCleanup('SIGTERM');
|
|
235
|
+
});
|
|
236
|
+
process.on('SIGHUP', () => {
|
|
237
|
+
nxCleanup('SIGHUP');
|
|
238
|
+
});
|
|
226
239
|
main();
|
package/bin/post-install.js
CHANGED
|
@@ -10,18 +10,20 @@ const update_manager_1 = require("../src/nx-cloud/update-manager");
|
|
|
10
10
|
const get_cloud_options_1 = require("../src/nx-cloud/utilities/get-cloud-options");
|
|
11
11
|
const nx_cloud_utils_1 = require("../src/utils/nx-cloud-utils");
|
|
12
12
|
const nx_json_1 = require("../src/config/nx-json");
|
|
13
|
-
const workspace_context_1 = require("../src/utils/workspace-context");
|
|
14
13
|
const logger_1 = require("../src/utils/logger");
|
|
14
|
+
const workspace_context_1 = require("../src/utils/workspace-context");
|
|
15
15
|
(async () => {
|
|
16
16
|
const start = new Date();
|
|
17
17
|
try {
|
|
18
|
-
(0, workspace_context_1.setupWorkspaceContext)(workspace_root_1.workspaceRoot);
|
|
19
18
|
if (isMainNxPackage() && (0, fileutils_1.fileExists)((0, path_1.join)(workspace_root_1.workspaceRoot, 'nx.json'))) {
|
|
20
19
|
(0, assert_supported_platform_1.assertSupportedPlatform)();
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
(0, workspace_context_1.setupWorkspaceContext)(workspace_root_1.workspaceRoot);
|
|
21
|
+
if (client_1.daemonClient.enabled()) {
|
|
22
|
+
try {
|
|
23
|
+
await client_1.daemonClient.stop();
|
|
24
|
+
}
|
|
25
|
+
catch (e) { }
|
|
23
26
|
}
|
|
24
|
-
catch (e) { }
|
|
25
27
|
const tasks = [
|
|
26
28
|
(0, project_graph_1.buildProjectGraphAndSourceMapsWithoutDaemon)(),
|
|
27
29
|
];
|
package/migrations.json
CHANGED
|
@@ -1,42 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generators": {
|
|
3
|
-
"16.0.0-remove-nrwl-cli": {
|
|
4
|
-
"cli": "nx",
|
|
5
|
-
"version": "16.0.0-beta.0",
|
|
6
|
-
"description": "Remove @nrwl/cli.",
|
|
7
|
-
"implementation": "./src/migrations/update-16-0-0/remove-nrwl-cli"
|
|
8
|
-
},
|
|
9
|
-
"16.0.0-tokens-for-depends-on": {
|
|
10
|
-
"cli": "nx",
|
|
11
|
-
"version": "16.0.0-beta.9",
|
|
12
|
-
"description": "Replace `dependsOn.projects` and `inputs` definitions with new configuration format.",
|
|
13
|
-
"implementation": "./src/migrations/update-16-0-0/update-depends-on-to-tokens"
|
|
14
|
-
},
|
|
15
|
-
"16.0.0-update-nx-cloud-runner": {
|
|
16
|
-
"cli": "nx",
|
|
17
|
-
"version": "16.0.0-beta.0",
|
|
18
|
-
"description": "Replace @nrwl/nx-cloud with nx-cloud",
|
|
19
|
-
"implementation": "./src/migrations/update-16-0-0/update-nx-cloud-runner"
|
|
20
|
-
},
|
|
21
|
-
"16.2.0-remove-output-path-from-run-commands": {
|
|
22
|
-
"cli": "nx",
|
|
23
|
-
"version": "16.2.0-beta.0",
|
|
24
|
-
"description": "Remove outputPath from run commands",
|
|
25
|
-
"implementation": "./src/migrations/update-16-2-0/remove-run-commands-output-path"
|
|
26
|
-
},
|
|
27
|
-
"16.6.0-prefix-outputs": {
|
|
28
|
-
"cli": "nx",
|
|
29
|
-
"version": "16.6.0-beta.6",
|
|
30
|
-
"description": "Prefix outputs with {workspaceRoot}/{projectRoot} if needed",
|
|
31
|
-
"implementation": "./src/migrations/update-15-0-0/prefix-outputs"
|
|
32
|
-
},
|
|
33
|
-
"16.8.0-escape-dollar-sign-env": {
|
|
34
|
-
"cli": "nx",
|
|
35
|
-
"version": "16.8.0-beta.3",
|
|
36
|
-
"description": "Escape $ in env variables",
|
|
37
|
-
"implementation": "./src/migrations/update-16-8-0/escape-dollar-sign-env-variables",
|
|
38
|
-
"x-repair-skip": true
|
|
39
|
-
},
|
|
40
3
|
"17.0.0-move-cache-directory": {
|
|
41
4
|
"cli": "nx",
|
|
42
5
|
"version": "17.0.0-beta.1",
|
|
@@ -89,6 +52,17 @@
|
|
|
89
52
|
"description": "Set project name in nx.json explicitly",
|
|
90
53
|
"implementation": "./src/migrations/update-19-2-4/set-project-name",
|
|
91
54
|
"x-repair-skip": true
|
|
55
|
+
},
|
|
56
|
+
"move-use-daemon-process": {
|
|
57
|
+
"version": "20.0.0-beta.7",
|
|
58
|
+
"description": "Migration for v20.0.0-beta.7",
|
|
59
|
+
"implementation": "./src/migrations/update-20-0-0/move-use-daemon-process"
|
|
60
|
+
},
|
|
61
|
+
"use-legacy-cache": {
|
|
62
|
+
"version": "20.0.1",
|
|
63
|
+
"description": "Set `useLegacyCache` to true for migrating workspaces",
|
|
64
|
+
"implementation": "./src/migrations/update-20-0-1/use-legacy-cache",
|
|
65
|
+
"x-repair-skip": true
|
|
92
66
|
}
|
|
93
67
|
}
|
|
94
68
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
diff --git a/Cargo.toml b/Cargo.toml
|
|
2
|
+
index 217f75a..3da0b78 100644
|
|
3
|
+
--- a/Cargo.toml
|
|
4
|
+
+++ b/Cargo.toml
|
|
5
|
+
@@ -7,3 +7,7 @@ members = [
|
|
6
|
+
|
|
7
|
+
[profile.release]
|
|
8
|
+
lto = true
|
|
9
|
+
+
|
|
10
|
+
+[patch.crates-io]
|
|
11
|
+
+nix_0_27_1 = { package = "nix", path = "../patched-crates/nix-0.27.1" }
|
|
12
|
+
+nix_0_25_1 = { package = "nix", path = "../patched-crates/nix-0.25.1" }
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
diff --git a/.cargo/config.toml b/.cargo/config.toml
|
|
2
|
+
index cd80114..f47551e 100644
|
|
3
|
+
--- a/.cargo/config.toml
|
|
4
|
+
+++ b/.cargo/config.toml
|
|
5
|
+
@@ -9,4 +9,13 @@ rustflags = [
|
|
6
|
+
|
|
7
|
+
[target.aarch64-unknown-linux-musl]
|
|
8
|
+
linker = "aarch64-linux-musl-gcc"
|
|
9
|
+
-rustflags = ["-C", "target-feature=-crt-static"]
|
|
10
|
+
|
|
11
|
+
+rustflags = ["-C", "target-feature=-crt-static"]
|
|
12
|
+
+# HarmonyOS (OpenHarmony) arm64 cross-compilation target.
|
|
13
|
+
+# Linker/AR point at the OHOS NDK (harmonybrew ohos-sdk) clang wrappers
|
|
14
|
+
+# which already carry --sysroot and -D__MUSL__.
|
|
15
|
+
+[target.aarch64-unknown-linux-ohos]
|
|
16
|
+
+linker = "/storage/Users/currentUser/.harmonybrew/Cellar/ohos-sdk/26.0.0.18_2/native/llvm/bin/aarch64-unknown-linux-ohos-clang"
|
|
17
|
+
+ar = "/storage/Users/currentUser/.harmonybrew/Cellar/ohos-sdk/26.0.0.18_2/native/llvm/bin/llvm-ar"
|
|
18
|
+
+
|
|
19
|
+
+[net]
|
|
20
|
+
+git-fetch-with-cli = true
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
--- a/packages/nx/src/native/index.js
|
|
2
|
+
+++ b/packages/nx/src/native/index.js
|
|
3
|
+
@@ -35,6 +35,7 @@
|
|
4
|
+
'@nx/nx-linux-arm64-musl',
|
|
5
|
+
'@nx/nx-linux-arm64-gnu',
|
|
6
|
+
'@nx/nx-linux-arm-gnueabihf',
|
|
7
|
+
+ '@nx/nx-openharmony-arm64',
|
|
8
|
+
]);
|
|
9
|
+
|
|
10
|
+
const localNodeFiles = [
|
|
11
|
+
@@ -52,6 +53,7 @@
|
|
12
|
+
'nx.linux-arm64-musl.node',
|
|
13
|
+
'nx.linux-arm64-gnu.node',
|
|
14
|
+
'nx.linux-arm-gnueabihf.node',
|
|
15
|
+
+ 'nx.openharmony-arm64.node',
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
const originalLoad = Module._load;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
--- a/packages/nx/src/native/native-bindings.js
|
|
2
|
+
+++ b/packages/nx/src/native/native-bindings.js
|
|
3
|
+
@@ -324,6 +324,22 @@
|
|
4
|
+
} else {
|
|
5
|
+
loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
|
|
6
|
+
}
|
|
7
|
+
+ } else if (process.platform === 'openharmony') {
|
|
8
|
+
+ if (process.arch === 'arm64') {
|
|
9
|
+
+ try {
|
|
10
|
+
+ return require('./nx.openharmony-arm64.node')
|
|
11
|
+
+ } catch (e) {
|
|
12
|
+
+ loadErrors.push(e)
|
|
13
|
+
+ }
|
|
14
|
+
+ try {
|
|
15
|
+
+ return require('@nx/nx-openharmony-arm64')
|
|
16
|
+
+ } catch (e) {
|
|
17
|
+
+ loadErrors.push(e)
|
|
18
|
+
+ }
|
|
19
|
+
+
|
|
20
|
+
+ } else {
|
|
21
|
+
+ loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`))
|
|
22
|
+
+ }
|
|
23
|
+
} else {
|
|
24
|
+
loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))
|
|
25
|
+
}
|