@smoothbricks/nx-plugin 0.5.7 → 0.6.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/README.md +1097 -360
- package/dist/.build-inputs.json +141 -0
- package/dist/bin/smoo-nx-cargo-toolchain.d.ts +3 -0
- package/dist/bin/smoo-nx-cargo-toolchain.d.ts.map +1 -0
- package/dist/bin/smoo-nx-cargo-toolchain.js +8 -0
- package/dist/bin/smoo-nx-forbidden-spellings.d.ts +3 -0
- package/dist/bin/smoo-nx-forbidden-spellings.d.ts.map +1 -0
- package/dist/bin/smoo-nx-forbidden-spellings.js +32 -0
- package/dist/bin/smoo-nx-nextest-timings.d.ts +3 -0
- package/dist/bin/smoo-nx-nextest-timings.d.ts.map +1 -0
- package/dist/bin/smoo-nx-nextest-timings.js +28 -0
- package/dist/bounded-test-policy.d.ts +1 -1
- package/dist/bounded-test-policy.d.ts.map +1 -1
- package/dist/bounded-test-policy.js +14 -15
- package/dist/build-state-output-policy.d.ts +95 -1
- package/dist/build-state-output-policy.d.ts.map +1 -1
- package/dist/build-state-output-policy.js +368 -30
- package/dist/bun-lock-scope.d.ts +44 -0
- package/dist/bun-lock-scope.d.ts.map +1 -0
- package/dist/bun-lock-scope.js +97 -0
- package/dist/cargo-build-script-env.d.ts +49 -0
- package/dist/cargo-build-script-env.d.ts.map +1 -0
- package/dist/cargo-build-script-env.js +324 -0
- package/dist/cargo-closure-input.d.ts +31 -4
- package/dist/cargo-closure-input.d.ts.map +1 -1
- package/dist/cargo-closure-input.js +66 -6
- package/dist/cargo-retention-hook.d.ts +17 -0
- package/dist/cargo-retention-hook.d.ts.map +1 -0
- package/dist/cargo-retention-hook.js +85 -0
- package/dist/cargo-source-hash.d.ts +25 -7
- package/dist/cargo-source-hash.d.ts.map +1 -1
- package/dist/cargo-source-hash.js +108 -43
- package/dist/cargo-toolchain-paths.d.ts +40 -0
- package/dist/cargo-toolchain-paths.d.ts.map +1 -0
- package/dist/cargo-toolchain-paths.js +84 -0
- package/dist/cargo-toolchain-policy.d.ts +25 -8
- package/dist/cargo-toolchain-policy.d.ts.map +1 -1
- package/dist/cargo-toolchain-policy.js +39 -5
- package/dist/cargo-workspace.d.ts +10 -4
- package/dist/cargo-workspace.d.ts.map +1 -1
- package/dist/cargo-workspace.js +65 -95
- package/dist/cross-check-policy.d.ts +9 -9
- package/dist/cross-check-policy.d.ts.map +1 -1
- package/dist/cross-check-policy.js +11 -11
- package/dist/disk-command-policy.d.ts.map +1 -1
- package/dist/disk-command-policy.js +1 -0
- package/dist/ensure-built-receipt.d.ts +22 -5
- package/dist/ensure-built-receipt.d.ts.map +1 -1
- package/dist/ensure-built-receipt.js +168 -48
- package/dist/ensure-built-witness.d.ts +27 -8
- package/dist/ensure-built-witness.d.ts.map +1 -1
- package/dist/ensure-built-witness.js +45 -15
- package/dist/ensure-built.d.ts.map +1 -1
- package/dist/ensure-built.js +9 -1
- package/dist/eslint-config-closure.d.ts +7 -0
- package/dist/eslint-config-closure.d.ts.map +1 -0
- package/dist/eslint-config-closure.js +346 -0
- package/dist/executors/bounded-exec/bounds.d.ts +56 -0
- package/dist/executors/bounded-exec/bounds.d.ts.map +1 -0
- package/dist/executors/bounded-exec/bounds.js +43 -0
- package/dist/executors/bounded-exec/cpu-pool-thread.d.ts +28 -0
- package/dist/executors/bounded-exec/cpu-pool-thread.d.ts.map +1 -0
- package/dist/executors/bounded-exec/cpu-pool-thread.js +20 -0
- package/dist/executors/bounded-exec/cpu-pool.d.ts +35 -38
- package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/cpu-pool.js +56 -120
- package/dist/executors/bounded-exec/executor.d.ts +19 -12
- package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
- package/dist/executors/bounded-exec/executor.js +389 -239
- package/dist/executors/bounded-exec/gateway-lease.d.ts +23 -19
- package/dist/executors/bounded-exec/gateway-lease.d.ts.map +1 -1
- package/dist/executors/bounded-exec/gateway-lease.js +102 -29
- package/dist/executors/bounded-exec/hang-diagnostics.d.ts +18 -1
- package/dist/executors/bounded-exec/hang-diagnostics.d.ts.map +1 -1
- package/dist/executors/bounded-exec/hang-diagnostics.js +148 -30
- package/dist/executors/bounded-exec/lease-wait.d.ts +64 -0
- package/dist/executors/bounded-exec/lease-wait.d.ts.map +1 -0
- package/dist/executors/bounded-exec/lease-wait.js +72 -0
- package/dist/executors/bounded-exec/lock-wait.d.ts +51 -0
- package/dist/executors/bounded-exec/lock-wait.d.ts.map +1 -0
- package/dist/executors/bounded-exec/lock-wait.js +108 -0
- package/dist/executors/bounded-exec/mbx-pool.d.ts +31 -0
- package/dist/executors/bounded-exec/mbx-pool.d.ts.map +1 -0
- package/dist/executors/bounded-exec/mbx-pool.js +24 -0
- package/dist/executors/bounded-exec/owned-subtree.d.ts +84 -0
- package/dist/executors/bounded-exec/owned-subtree.d.ts.map +1 -0
- package/dist/executors/bounded-exec/owned-subtree.js +178 -0
- package/dist/executors/bounded-exec/progress.d.ts +4 -1
- package/dist/executors/bounded-exec/progress.d.ts.map +1 -1
- package/dist/executors/bounded-exec/progress.js +5 -2
- package/dist/executors/bounded-exec/ram-attach.d.ts +19 -0
- package/dist/executors/bounded-exec/ram-attach.d.ts.map +1 -0
- package/dist/executors/bounded-exec/ram-attach.js +207 -0
- package/dist/executors/bounded-exec/ram-detach.d.ts +25 -0
- package/dist/executors/bounded-exec/ram-detach.d.ts.map +1 -0
- package/dist/executors/bounded-exec/ram-detach.js +207 -0
- package/dist/executors/bounded-exec/ram-temp-fixtures.d.ts +76 -0
- package/dist/executors/bounded-exec/ram-temp-fixtures.d.ts.map +1 -1
- package/dist/executors/bounded-exec/ram-temp-fixtures.js +296 -0
- package/dist/executors/bounded-exec/ram-temp.d.ts +388 -88
- package/dist/executors/bounded-exec/ram-temp.d.ts.map +1 -1
- package/dist/executors/bounded-exec/ram-temp.js +1213 -399
- package/dist/executors/bounded-exec/run-cpu-pool.d.ts +10 -4
- package/dist/executors/bounded-exec/run-cpu-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/run-cpu-pool.js +122 -35
- package/dist/executors/bounded-exec/runner-hook.js +14 -5
- package/dist/executors/bounded-exec/runner-lifecycle.d.ts +14 -1
- package/dist/executors/bounded-exec/runner-lifecycle.d.ts.map +1 -1
- package/dist/executors/bounded-exec/runner-lifecycle.js +27 -6
- package/dist/executors/bounded-exec/{cpu-tokens.d.ts → runner-sizing.d.ts} +14 -42
- package/dist/executors/bounded-exec/runner-sizing.d.ts.map +1 -0
- package/dist/executors/bounded-exec/{cpu-tokens.js → runner-sizing.js} +5 -35
- package/dist/executors/bounded-exec/runtime-pin.d.ts +73 -0
- package/dist/executors/bounded-exec/runtime-pin.d.ts.map +1 -0
- package/dist/executors/bounded-exec/runtime-pin.js +167 -0
- package/dist/executors/bounded-exec/schema.d.ts +18 -1
- package/dist/executors/bounded-exec/schema.d.ts.map +1 -1
- package/dist/executors/bounded-exec/verdict.d.ts +48 -11
- package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
- package/dist/executors/bounded-exec/verdict.js +89 -20
- package/dist/executors/cargo-zigbuild/executor.d.ts +21 -0
- package/dist/executors/cargo-zigbuild/executor.d.ts.map +1 -1
- package/dist/executors/cargo-zigbuild/executor.js +67 -12
- package/dist/executors/clean-outputs/executor.js +1 -0
- package/dist/executors/scriptc-native/executor.d.ts +79 -0
- package/dist/executors/scriptc-native/executor.d.ts.map +1 -0
- package/dist/executors/scriptc-native/executor.js +367 -0
- package/dist/executors/scriptc-native/ffi-paths.d.ts +9 -0
- package/dist/executors/scriptc-native/ffi-paths.d.ts.map +1 -0
- package/dist/executors/scriptc-native/ffi-paths.js +25 -0
- package/dist/executors/scriptc-native/schema.d.ts +34 -0
- package/dist/executors/scriptc-native/schema.d.ts.map +1 -0
- package/dist/executors/scriptc-native/schema.js +1 -0
- package/dist/executors/typescript-emit/emit-overrides.d.ts +14 -0
- package/dist/executors/typescript-emit/emit-overrides.d.ts.map +1 -0
- package/dist/executors/typescript-emit/emit-overrides.js +24 -0
- package/dist/executors/typescript-emit/executor.d.ts +3 -1
- package/dist/executors/typescript-emit/executor.d.ts.map +1 -1
- package/dist/executors/typescript-emit/executor.js +146 -33
- package/dist/forbidden-spelling-policy.d.ts +56 -0
- package/dist/forbidden-spelling-policy.d.ts.map +1 -0
- package/dist/forbidden-spelling-policy.js +176 -0
- package/dist/generators/create-package/generator.d.ts.map +1 -1
- package/dist/generators/create-package/generator.js +3 -4
- package/dist/graph-input-contract.d.ts +14 -0
- package/dist/graph-input-contract.d.ts.map +1 -1
- package/dist/graph-input-contract.js +67 -2
- package/dist/index.d.ts +23 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +672 -214
- package/dist/managed-assets.d.ts +2 -0
- package/dist/managed-assets.d.ts.map +1 -1
- package/dist/managed-files/files.d.ts +3 -3
- package/dist/managed-files/files.d.ts.map +1 -1
- package/dist/managed-files/files.js +28 -3
- package/dist/managed-files/managed-format.d.ts.map +1 -1
- package/dist/managed-files/managed-format.js +1 -0
- package/dist/managed-files/publish-workflow.js +14 -11
- package/dist/nextest-code-bound.js +1 -0
- package/dist/nextest-timings.d.ts +35 -0
- package/dist/nextest-timings.d.ts.map +1 -0
- package/dist/nextest-timings.js +168 -0
- package/dist/owned-installation.d.ts +6 -5
- package/dist/owned-installation.d.ts.map +1 -1
- package/dist/owned-installation.js +150 -26
- package/dist/package-target-policy.d.ts.map +1 -1
- package/dist/package-target-policy.js +2 -3
- package/dist/process-children.d.ts +7 -0
- package/dist/process-children.d.ts.map +1 -0
- package/dist/process-children.darwin.d.ts +7 -0
- package/dist/process-children.darwin.d.ts.map +1 -0
- package/dist/process-children.darwin.js +13 -0
- package/dist/process-children.js +14 -0
- package/dist/process-children.linux.d.ts +8 -0
- package/dist/process-children.linux.d.ts.map +1 -0
- package/dist/process-children.linux.js +25 -0
- package/dist/process-group.d.ts +108 -0
- package/dist/process-group.d.ts.map +1 -0
- package/dist/process-group.js +171 -0
- package/dist/process-listing.d.ts +7 -0
- package/dist/process-listing.d.ts.map +1 -0
- package/dist/process-listing.js +51 -0
- package/dist/producer-receipts.d.ts +8 -2
- package/dist/producer-receipts.d.ts.map +1 -1
- package/dist/producer-receipts.js +514 -47
- package/dist/task-graph-policy.d.ts +21 -0
- package/dist/task-graph-policy.d.ts.map +1 -0
- package/dist/task-graph-policy.js +91 -0
- package/dist/test-timings.js +4 -4
- package/dist/test-walk-policy.d.ts +14 -5
- package/dist/test-walk-policy.d.ts.map +1 -1
- package/dist/test-walk-policy.js +8 -2
- package/dist/testing.d.ts +73 -28
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +217 -223
- package/dist/tool-bins.d.ts +33 -0
- package/dist/tool-bins.d.ts.map +1 -0
- package/dist/tool-bins.js +72 -0
- package/dist/typecheck-test-policy.d.ts.map +1 -1
- package/dist/typecheck-test-policy.js +3 -4
- package/dist/wait-why-policy.d.ts +28 -0
- package/dist/wait-why-policy.d.ts.map +1 -0
- package/dist/wait-why-policy.js +223 -0
- package/dist/workspace-config-policy.d.ts +14 -8
- package/dist/workspace-config-policy.d.ts.map +1 -1
- package/dist/workspace-config-policy.js +60 -16
- package/dist/workspace-manifest.d.ts +41 -6
- package/dist/workspace-manifest.d.ts.map +1 -1
- package/dist/workspace-manifest.js +57 -0
- package/executors.json +16 -1
- package/loader.js +2 -0
- package/managed/raw/envrc +11 -0
- package/managed/raw/patches/nx@23.2.1.patch +2840 -199
- package/managed/raw/patches/ttsc@0.34.1.patch +119 -0
- package/managed/raw/tooling/direnv/cargo-fetch-bound.ts +245 -0
- package/managed/raw/tooling/direnv/cargo-fetch-run.ts +299 -0
- package/managed/raw/tooling/direnv/compiler-variables.sh +42 -0
- package/managed/raw/tooling/direnv/developer-links.ts +464 -25
- package/managed/raw/tooling/direnv/devenv.smoo.nix +78 -38
- package/managed/raw/tooling/direnv/github-actions-bootstrap.sh +14 -12
- package/managed/raw/tooling/direnv/installed-bun-links.ts +308 -0
- package/managed/raw/tooling/direnv/linked-snapshots.ts +62 -3
- package/managed/raw/tooling/direnv/nx-socket-dir.sh +56 -17
- package/managed/raw/tooling/direnv/repo-path +68 -6
- package/managed/raw/tooling/direnv/secret-references.ts +13 -4
- package/managed/raw/tooling/direnv/setup-environment.ts +128 -537
- package/managed/raw/tooling/direnv/toolchain-stamp.ts +4 -2
- package/managed/raw/tooling/direnv/ttsc-env.sh +9 -0
- package/managed/raw/tooling/direnv/uv-relocation.ts +227 -0
- package/managed/raw/tooling/git-hooks/commit-msg.sh +2 -1
- package/managed/raw/tooling/git-hooks/pre-commit.sh +2 -1
- package/managed/raw/tooling/git-hooks/pre-push.sh +2 -1
- package/managed/templates/github/actions/cache-ttsc-plugins/action.yml +85 -7
- package/managed/templates/github/actions/save-nix-devenv/action.yml +12 -2
- package/managed/templates/github/actions/setup-devenv/action.yml +2 -0
- package/package.json +95 -14
- package/src/bin/smoo-nx-cargo-toolchain.ts +11 -0
- package/src/bin/smoo-nx-forbidden-spellings.ts +33 -0
- package/src/bin/smoo-nx-nextest-timings.ts +31 -0
- package/src/bounded-test-policy.ts +12 -14
- package/src/build-state-output-policy.ts +458 -34
- package/src/bun-lock-scope.ts +108 -0
- package/src/cargo-build-script-env.ts +265 -0
- package/src/cargo-closure-input.ts +74 -7
- package/src/cargo-retention-hook.ts +94 -0
- package/src/cargo-source-hash.ts +138 -41
- package/src/cargo-toolchain-paths.ts +95 -0
- package/src/cargo-toolchain-policy.ts +49 -5
- package/src/cargo-workspace.ts +72 -123
- package/src/cross-check-policy.ts +12 -10
- package/src/disk-command-policy.ts +1 -0
- package/src/ensure-built-receipt.ts +173 -39
- package/src/ensure-built-witness.ts +62 -10
- package/src/ensure-built.ts +11 -1
- package/src/eslint-config-closure.ts +357 -0
- package/src/executors/bounded-exec/bounds.ts +76 -0
- package/src/executors/bounded-exec/cpu-pool-thread.ts +43 -0
- package/src/executors/bounded-exec/cpu-pool.ts +55 -120
- package/src/executors/bounded-exec/executor.ts +442 -260
- package/src/executors/bounded-exec/gateway-lease.ts +94 -35
- package/src/executors/bounded-exec/hang-diagnostics.ts +173 -31
- package/src/executors/bounded-exec/lease-wait.ts +116 -0
- package/src/executors/bounded-exec/lock-wait.ts +141 -0
- package/src/executors/bounded-exec/mbx-pool.ts +48 -0
- package/src/executors/bounded-exec/owned-subtree.ts +235 -0
- package/src/executors/bounded-exec/progress.ts +9 -3
- package/src/executors/bounded-exec/ram-attach.ts +238 -0
- package/src/executors/bounded-exec/ram-detach.ts +226 -0
- package/src/executors/bounded-exec/ram-temp-fixtures.ts +358 -0
- package/src/executors/bounded-exec/ram-temp-registry.txt +440 -0
- package/src/executors/bounded-exec/ram-temp.ts +1497 -460
- package/src/executors/bounded-exec/run-cpu-pool.ts +129 -35
- package/src/executors/bounded-exec/runner-hook.ts +14 -6
- package/src/executors/bounded-exec/runner-lifecycle.ts +31 -8
- package/src/executors/bounded-exec/{cpu-tokens.ts → runner-sizing.ts} +13 -59
- package/src/executors/bounded-exec/runtime-pin.ts +232 -0
- package/src/executors/bounded-exec/schema.json +11 -2
- package/src/executors/bounded-exec/schema.ts +19 -1
- package/src/executors/bounded-exec/verdict.ts +145 -35
- package/src/executors/cargo-zigbuild/executor.ts +82 -8
- package/src/executors/clean-outputs/executor.ts +1 -0
- package/src/executors/scriptc-native/executor.ts +394 -0
- package/src/executors/scriptc-native/ffi-paths.ts +29 -0
- package/src/executors/scriptc-native/schema.json +60 -0
- package/src/executors/scriptc-native/schema.ts +34 -0
- package/src/executors/typescript-emit/emit-overrides.ts +24 -0
- package/src/executors/typescript-emit/executor.ts +186 -38
- package/src/forbidden-spelling-policy.ts +226 -0
- package/src/generators/create-package/generator.ts +7 -7
- package/src/graph-input-contract.ts +61 -2
- package/src/index.ts +788 -224
- package/src/managed-assets.ts +3 -0
- package/src/managed-files/files.ts +28 -3
- package/src/managed-files/managed-format.ts +1 -0
- package/src/managed-files/publish-workflow.ts +20 -15
- package/src/nextest-code-bound.ts +1 -0
- package/src/nextest-timings.ts +106 -0
- package/src/owned-installation.ts +150 -23
- package/src/package-target-policy.ts +2 -3
- package/src/process-children.darwin.ts +14 -0
- package/src/process-children.linux.ts +33 -0
- package/src/process-children.ts +22 -0
- package/src/process-group.ts +209 -0
- package/src/process-listing.ts +54 -0
- package/src/producer-receipts.ts +92 -41
- package/src/task-graph-policy.ts +98 -0
- package/src/test-walk-policy.ts +23 -8
- package/src/testing.ts +240 -232
- package/src/tool-bins.ts +108 -0
- package/src/typecheck-test-policy.ts +2 -3
- package/src/wait-why-policy.ts +226 -0
- package/src/workspace-config-policy.ts +63 -15
- package/src/workspace-manifest.ts +89 -6
- package/test-timings.json +124 -99
- package/dist/bin/smoo-nx-failures.d.ts +0 -3
- package/dist/bin/smoo-nx-failures.d.ts.map +0 -1
- package/dist/bin/smoo-nx-failures.js +0 -3
- package/dist/bin/smoo-nx-nextest-extract.d.ts +0 -3
- package/dist/bin/smoo-nx-nextest-extract.d.ts.map +0 -1
- package/dist/bin/smoo-nx-nextest-extract.js +0 -42
- package/dist/executors/bounded-exec/cpu-tokens.d.ts.map +0 -1
- package/dist/failure-summary.d.ts +0 -5
- package/dist/failure-summary.d.ts.map +0 -1
- package/dist/failure-summary.js +0 -118
- package/dist/nextest-extraction.d.ts +0 -117
- package/dist/nextest-extraction.d.ts.map +0 -1
- package/dist/nextest-extraction.js +0 -303
- package/managed/raw/patches/ttsc@0.30.4.patch +0 -2255
- package/src/__tests__/cargo-closure-filesets.ts +0 -94
- package/src/__tests__/cargo-closure-fixture.ts +0 -113
- package/src/__tests__/counted-cargo-process.ts +0 -286
- package/src/__tests__/counted-cargo.ts +0 -713
- package/src/__tests__/directory-change.ts +0 -27
- package/src/__tests__/fixture-cargo-home.ts +0 -36
- package/src/__tests__/fixture-nx-env.ts +0 -193
- package/src/__tests__/owned-installation.ts +0 -13
- package/src/__tests__/past-tick.ts +0 -12
- package/src/__tests__/progress-clock.ts +0 -43
- package/src/__tests__/runtime-input.ts +0 -23
- package/src/bin/smoo-nx-bound-failures.test.ts +0 -127
- package/src/bin/smoo-nx-failures.ts +0 -4
- package/src/bin/smoo-nx-nextest-extract.ts +0 -44
- package/src/bounded-test-policy.test.ts +0 -1029
- package/src/build-state-output-policy.test.ts +0 -115
- package/src/bun-bootstrap.test.ts +0 -102
- package/src/bun-file-packages.test.ts +0 -47
- package/src/cargo-closure-filesets.test.ts +0 -63
- package/src/cargo-closure-input.property.test.ts +0 -50
- package/src/cargo-closure-input.test.ts +0 -506
- package/src/cargo-closure-key.test.ts +0 -240
- package/src/cargo-resolve-cache.test.ts +0 -1181
- package/src/cargo-source-hash.test.ts +0 -707
- package/src/cargo-workspace.test.ts +0 -615
- package/src/cross-check-policy.test.ts +0 -316
- package/src/disk-command-policy.test.ts +0 -61
- package/src/ensure-built-receipt.test.ts +0 -279
- package/src/ensure-built-witness.test.ts +0 -688
- package/src/ensure-built.test.ts +0 -1462
- package/src/executors/all-verdicts/executor.test.ts +0 -135
- package/src/executors/bounded-exec/cargo-progress-host.test.ts +0 -332
- package/src/executors/bounded-exec/cpu-pool.test.ts +0 -684
- package/src/executors/bounded-exec/cpu-tokens.test.ts +0 -519
- package/src/executors/bounded-exec/disk-lease.test.ts +0 -219
- package/src/executors/bounded-exec/executor-host.test.ts +0 -800
- package/src/executors/bounded-exec/executor.test.ts +0 -1819
- package/src/executors/bounded-exec/go-progress-host.test.ts +0 -171
- package/src/executors/bounded-exec/hang-diagnostics.test.ts +0 -291
- package/src/executors/bounded-exec/progress.test.ts +0 -139
- package/src/executors/bounded-exec/ram-temp-held.test.ts +0 -264
- package/src/executors/bounded-exec/ram-temp-host.test.ts +0 -635
- package/src/executors/bounded-exec/ram-temp.test.ts +0 -750
- package/src/executors/bounded-exec/run-cpu-pool.test.ts +0 -79
- package/src/executors/bounded-exec/runner-hook.test.ts +0 -193
- package/src/executors/bounded-exec/runner-lifecycle.test.ts +0 -82
- package/src/executors/bounded-exec/verdict.test.ts +0 -545
- package/src/executors/cargo-zigbuild/executor.test.ts +0 -129
- package/src/executors/clean-outputs/executor.test.ts +0 -20
- package/src/executors/typescript-emit/executor.test.ts +0 -83
- package/src/failure-summary.ts +0 -119
- package/src/generators/bounded-test-targets/generator.test.ts +0 -138
- package/src/generators/bun-test-tracing/generator.test.ts +0 -250
- package/src/generators/create-package/generator.test.ts +0 -190
- package/src/generators/make-public/generator.test.ts +0 -137
- package/src/graph-input-contract.test.ts +0 -379
- package/src/host-controller-wiring.test.ts +0 -31
- package/src/index.test.ts +0 -3321
- package/src/linked-snapshots.nx.test.ts +0 -254
- package/src/managed-files/forgejo-artifact.test.ts +0 -395
- package/src/managed-files/generator.test.ts +0 -243
- package/src/managed-files/github-host-cache-isolation.test.ts +0 -86
- package/src/managed-files/json-edit.test.ts +0 -216
- package/src/managed-files/managed-content.test.ts +0 -166
- package/src/managed-files/managed-format-json.test.ts +0 -308
- package/src/managed-files/repo-path.test.ts +0 -172
- package/src/managed-files/setup-devenv-free-disk.test.ts +0 -95
- package/src/managed-files/trace-db-artifact.test.ts +0 -7
- package/src/managed-files/tree-permissions.test.ts +0 -109
- package/src/managed-files/tree.test.ts +0 -123
- package/src/manifest-hash.test.ts +0 -219
- package/src/nextest-code-bound.test.ts +0 -161
- package/src/nextest-extraction.test.ts +0 -216
- package/src/nextest-extraction.ts +0 -371
- package/src/nextest-partitions.test.ts +0 -501
- package/src/nx-cache-bound.test.ts +0 -109
- package/src/nx-cache-restore-mtime.test.ts +0 -170
- package/src/nx-daemon-claim.test.ts +0 -279
- package/src/nx-daemon-idle-cpu.test.ts +0 -80
- package/src/nx-daemon-idle-policy.test.ts +0 -111
- package/src/nx-daemon-ignore-files.test.ts +0 -210
- package/src/nx-daemon-root-normalization.test.ts +0 -105
- package/src/nx-daemon-start-never.test.ts +0 -292
- package/src/nx-daemon-validity.test.ts +0 -1055
- package/src/nx-dot-input-policy.test.ts +0 -353
- package/src/nx-failure-life-cycles.test.ts +0 -207
- package/src/nx-files-archive-racy.test.ts +0 -97
- package/src/nx-foreign-workspace-env.test.ts +0 -329
- package/src/nx-incomplete-run-summary.test.ts +0 -70
- package/src/nx-plugin-load-errors.test.ts +0 -120
- package/src/nx-project-graph-errors.test.ts +0 -70
- package/src/nx-project-resolution-cache.test.ts +0 -176
- package/src/nx-raw-inputs.test.ts +0 -166
- package/src/nx-resident-graph-workers.test.ts +0 -112
- package/src/nx-run-information.test.ts +0 -118
- package/src/nx-skipped-task-exit.test.ts +0 -180
- package/src/nx-state-location.test.ts +0 -63
- package/src/nx-store-resolution.test.ts +0 -81
- package/src/nx-task-graph-cycles.test.ts +0 -148
- package/src/nx-task-output-lease.test.ts +0 -550
- package/src/nx-use-local.test.ts +0 -105
- package/src/owned-installation.test.ts +0 -105
- package/src/package-target-policy.test.ts +0 -1014
- package/src/producer-receipts.test.ts +0 -285
- package/src/release-config-policy.test.ts +0 -311
- package/src/runtime-input.test.ts +0 -393
- package/src/serial-group-wiring.test.ts +0 -326
- package/src/task-history-namespace.test.ts +0 -181
- package/src/task-results.test.ts +0 -228
- package/src/test-clock-policy.test.ts +0 -338
- package/src/test-program.test.ts +0 -303
- package/src/test-timings.test.ts +0 -240
- package/src/test-walk-policy.test.ts +0 -620
- package/src/testing.test.ts +0 -509
- package/src/typecheck-test-policy.test.ts +0 -1468
- package/src/typescript-resolution.test.ts +0 -76
- package/src/version-actions.test.ts +0 -80
- package/src/workspace-config-policy.test.ts +0 -737
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { afterEach, describe, expect, it } from 'bun:test';
|
|
2
|
-
import { mkdtempSync, rmSync, writeFileSync } from 'node:fs';
|
|
3
|
-
import { tmpdir } from 'node:os';
|
|
4
|
-
import { join } from 'node:path';
|
|
5
|
-
import { CPU_POOL_ENV, readInheritedCpuPool, takeParentCpuTokens } from './cpu-pool.js';
|
|
6
|
-
import { CPU_TOKENS_ENV } from './cpu-tokens.js';
|
|
7
|
-
import { holdLease } from './gateway-lease.js';
|
|
8
|
-
import { closeRunCpuPool, serveRunCpuPool } from './run-cpu-pool.js';
|
|
9
|
-
|
|
10
|
-
const directories: string[] = [];
|
|
11
|
-
|
|
12
|
-
afterEach(() => {
|
|
13
|
-
for (const directory of directories.splice(0)) {
|
|
14
|
-
rmSync(directory, { recursive: true, force: true });
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
/** A gateway socket path in a fresh directory: absent unless the test makes it. */
|
|
19
|
-
function gatewayPath(): string {
|
|
20
|
-
const directory = mkdtempSync(join(tmpdir(), 'run-cpu-pool-'));
|
|
21
|
-
directories.push(directory);
|
|
22
|
-
return join(directory, 'gateway.sock');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
describe('a run without a gateway', () => {
|
|
26
|
-
it('serves its tasks one pool of one token per core, so a second runner waits for the first', async () => {
|
|
27
|
-
const env: NodeJS.ProcessEnv = {};
|
|
28
|
-
await serveRunCpuPool({ id: 'run-477' }, env, gatewayPath(), 4);
|
|
29
|
-
const pool = readInheritedCpuPool(env);
|
|
30
|
-
if (pool === null) {
|
|
31
|
-
throw new Error(`the run published no pool: ${JSON.stringify(env)}`);
|
|
32
|
-
}
|
|
33
|
-
expect(pool.tokens).toBe(4);
|
|
34
|
-
// A Cargo that Nx's own `nx:run-commands` starts reads the same count through the run's jobserver fifo.
|
|
35
|
-
expect(env.CARGO_MAKEFLAGS).toMatch(/^-j --jobserver-auth=fifo:\/\S+$/);
|
|
36
|
-
expect(env.MAKEFLAGS).toBe(env.CARGO_MAKEFLAGS);
|
|
37
|
-
// Nightly 477's shape: two mutation sweeps, each asking for the whole host. The first holds the run's cores;
|
|
38
|
-
// the second queues for them instead of starting a second host's worth of workers beside it.
|
|
39
|
-
const first = await takeParentCpuTokens(pool, 31);
|
|
40
|
-
expect(first.granted && first.tokens).toBe(4);
|
|
41
|
-
const { promise: queued, resolve: queue } = Promise.withResolvers<void>();
|
|
42
|
-
const second = holdLease(
|
|
43
|
-
pool.socket,
|
|
44
|
-
{ op: 'cpu-pool', want: 31 },
|
|
45
|
-
'the run CPU pool',
|
|
46
|
-
{ ackMs: 2_000, afterCloseMs: 5_000, grantMs: null },
|
|
47
|
-
queue,
|
|
48
|
-
);
|
|
49
|
-
let secondSettled = false;
|
|
50
|
-
void second.then(() => {
|
|
51
|
-
secondSettled = true;
|
|
52
|
-
});
|
|
53
|
-
await queued;
|
|
54
|
-
expect(secondSettled).toBe(false);
|
|
55
|
-
if (first.granted) first.release();
|
|
56
|
-
const granted = await second;
|
|
57
|
-
expect(granted.granted && granted.answer.tokens).toBe(4);
|
|
58
|
-
if (granted.granted) granted.release();
|
|
59
|
-
|
|
60
|
-
await closeRunCpuPool({ id: 'run-477' });
|
|
61
|
-
// The run's end closes its pool: nothing is left to grant from it.
|
|
62
|
-
const late = await takeParentCpuTokens(pool, 1);
|
|
63
|
-
expect(late.granted === false && late.cause).toBe('absent');
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
it('leaves a run that inherits a pool to that pool', async () => {
|
|
67
|
-
const env: NodeJS.ProcessEnv = { [CPU_POOL_ENV]: '/parent/pool.sock', [CPU_TOKENS_ENV]: '2' };
|
|
68
|
-
await serveRunCpuPool({ id: 'nested' }, env, gatewayPath(), 4);
|
|
69
|
-
expect(env).toEqual({ [CPU_POOL_ENV]: '/parent/pool.sock', [CPU_TOKENS_ENV]: '2' });
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
it('leaves a run on a host whose gateway socket exists to the gateway, answering or not', async () => {
|
|
73
|
-
const gateway = gatewayPath();
|
|
74
|
-
writeFileSync(gateway, '');
|
|
75
|
-
const env: NodeJS.ProcessEnv = {};
|
|
76
|
-
await serveRunCpuPool({ id: 'gateway-host' }, env, gateway, 4);
|
|
77
|
-
expect(env).toEqual({});
|
|
78
|
-
});
|
|
79
|
-
});
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import { afterEach, describe, expect, it } from 'bun:test';
|
|
2
|
-
import { type ChildProcess, spawn } from 'node:child_process';
|
|
3
|
-
import { createInterface } from 'node:readline';
|
|
4
|
-
import { Duplex, type Readable } from 'node:stream';
|
|
5
|
-
import { fileURLToPath } from 'node:url';
|
|
6
|
-
|
|
7
|
-
const hook = fileURLToPath(new URL('./runner-hook.ts', import.meta.url));
|
|
8
|
-
const children = new Set<ChildProcess>();
|
|
9
|
-
|
|
10
|
-
afterEach(() => {
|
|
11
|
-
for (const child of children) child.kill('SIGKILL');
|
|
12
|
-
children.clear();
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
async function collect(stream: Readable): Promise<Buffer> {
|
|
16
|
-
const chunks: Buffer[] = [];
|
|
17
|
-
for await (const chunk of stream) {
|
|
18
|
-
const bytes: unknown = chunk;
|
|
19
|
-
if (!Buffer.isBuffer(bytes)) throw new Error('expected subprocess bytes');
|
|
20
|
-
chunks.push(bytes);
|
|
21
|
-
}
|
|
22
|
-
return Buffer.concat(chunks);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
async function runHook(
|
|
26
|
-
runner: 'cargo' | 'go',
|
|
27
|
-
executable: string,
|
|
28
|
-
args: string[],
|
|
29
|
-
acknowledge: (line: string) => string = (line) => `${line}\n`,
|
|
30
|
-
) {
|
|
31
|
-
// Node's standalone TypeScript loader needs no project preloader or validation transform.
|
|
32
|
-
const child = spawn('node', [hook, '7', runner, executable, ...args], {
|
|
33
|
-
stdio: ['ignore', 'pipe', 'pipe', 'pipe'],
|
|
34
|
-
});
|
|
35
|
-
children.add(child);
|
|
36
|
-
const closed = Promise.withResolvers<{ code: number | null; signal: NodeJS.Signals | null }>();
|
|
37
|
-
child.once('error', closed.reject);
|
|
38
|
-
child.once('close', (code, signal) => {
|
|
39
|
-
children.delete(child);
|
|
40
|
-
closed.resolve({ code, signal });
|
|
41
|
-
});
|
|
42
|
-
const control = child.stdio[3];
|
|
43
|
-
if (!(control instanceof Duplex) || child.stdout === null || child.stderr === null) {
|
|
44
|
-
throw new Error('runner-hook fixture needs stdout, stderr, and duplex descriptor 3');
|
|
45
|
-
}
|
|
46
|
-
const phases: unknown[] = [];
|
|
47
|
-
const protocol = async (): Promise<void> => {
|
|
48
|
-
try {
|
|
49
|
-
for await (const line of createInterface({ input: control })) {
|
|
50
|
-
const message: unknown = JSON.parse(line);
|
|
51
|
-
phases.push(message);
|
|
52
|
-
control.write(acknowledge(line));
|
|
53
|
-
}
|
|
54
|
-
} finally {
|
|
55
|
-
control.destroy();
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const [status, stdout, stderr] = await Promise.all([
|
|
59
|
-
closed.promise,
|
|
60
|
-
collect(child.stdout),
|
|
61
|
-
collect(child.stderr),
|
|
62
|
-
protocol(),
|
|
63
|
-
]);
|
|
64
|
-
return { ...status, stdout, stderr, phases };
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/** A real process emitting exact protocol fragments, not a parser imported into the test process. */
|
|
68
|
-
function emit(stdout: readonly string[], stderr = '', ending = 'process.exitCode = 0;'): string {
|
|
69
|
-
return [
|
|
70
|
-
"const { writeSync } = require('node:fs');",
|
|
71
|
-
`writeSync(2, ${JSON.stringify(stderr)});`,
|
|
72
|
-
`for (const fragment of ${JSON.stringify(stdout)}) writeSync(1, fragment);`,
|
|
73
|
-
ending,
|
|
74
|
-
].join('\n');
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
describe('standalone native runner hook', () => {
|
|
78
|
-
it('accepts Cargo build-finished(false) once, ignores compiler/text/nested terminals, and preserves bytes and status', async () => {
|
|
79
|
-
const stdout = [
|
|
80
|
-
'{"reason":"compiler-artifact","fresh":true}\n',
|
|
81
|
-
'{"reason":"build-finished","success":"true"}\n',
|
|
82
|
-
'{not JSON}\n',
|
|
83
|
-
'{"reason":"build-fin',
|
|
84
|
-
'ished","success":false}\n',
|
|
85
|
-
'test result: ok. 1 passed; 0 failed\n',
|
|
86
|
-
'{"Action":"pass","Package":"nested"}\n',
|
|
87
|
-
'{"reason":"build-finished","success":true}\n',
|
|
88
|
-
'custom harness teardown without newline',
|
|
89
|
-
];
|
|
90
|
-
const stderr = '{"reason":"build-finished","success":true}\ncompiler diagnostic\n';
|
|
91
|
-
const program =
|
|
92
|
-
"require('node:fs').writeSync(1, Buffer.from([0, 255, 128, 10]));\n" +
|
|
93
|
-
emit(stdout, stderr, 'process.exitCode = 37;');
|
|
94
|
-
const result = await runHook('cargo', process.execPath, ['-e', program]);
|
|
95
|
-
expect(result.code).toBe(37);
|
|
96
|
-
expect(result.signal).toBeNull();
|
|
97
|
-
expect(result.stdout).toEqual(Buffer.concat([Buffer.from([0, 255, 128, 10]), Buffer.from(stdout.join(''))]));
|
|
98
|
-
expect(result.stderr).toEqual(Buffer.from(stderr));
|
|
99
|
-
expect(result.phases).toEqual([
|
|
100
|
-
{ id: 7, phase: 'build' },
|
|
101
|
-
{ id: 7, phase: 'active' },
|
|
102
|
-
{ id: 7, phase: 'terminal' },
|
|
103
|
-
]);
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
it('tracks overlapping Go packages, not test terminals, stderr, build output, or nested output', async () => {
|
|
107
|
-
const stdout = [
|
|
108
|
-
'{"Action":"build-output","ImportPath":"one","Output":"linking\\n"}\n',
|
|
109
|
-
'{"Action":"sta',
|
|
110
|
-
'rt","Package":"one"}\n',
|
|
111
|
-
'{"Action":"start","Package":"two"}\n',
|
|
112
|
-
'{"Action":"pass","Package":"one","Test":"TestDone"}\n',
|
|
113
|
-
'{"Action":"output","Package":"one","Output":"{\\"Action\\":\\"pass\\",\\"Package\\":\\"two\\"}\\n"}\n',
|
|
114
|
-
'{"Action":"fail","Package":"one"}\n',
|
|
115
|
-
'{"Action":"skip","Package":"two"}\n',
|
|
116
|
-
'{"Action":"start","Package":"three"}\n',
|
|
117
|
-
'{"Action":"pass","Package":"three"}',
|
|
118
|
-
];
|
|
119
|
-
const stderr = '{"Action":"start","Package":"stderr-is-not-native"}\n';
|
|
120
|
-
const result = await runHook('go', process.execPath, ['-e', emit(stdout, stderr)]);
|
|
121
|
-
expect(result.code).toBe(0);
|
|
122
|
-
expect(result.stdout).toEqual(Buffer.from(stdout.join('')));
|
|
123
|
-
expect(result.stderr).toEqual(Buffer.from(stderr));
|
|
124
|
-
expect(result.phases).toEqual([
|
|
125
|
-
{ id: 7, phase: 'build' },
|
|
126
|
-
{ id: 7, phase: 'active' },
|
|
127
|
-
{ id: 7, phase: 'build' },
|
|
128
|
-
{ id: 7, phase: 'active' },
|
|
129
|
-
{ id: 7, phase: 'build' },
|
|
130
|
-
{ id: 7, phase: 'terminal' },
|
|
131
|
-
]);
|
|
132
|
-
});
|
|
133
|
-
|
|
134
|
-
it('preserves a child termination signal after draining output and acknowledging terminal', async () => {
|
|
135
|
-
const stdout = ['{"reason":"build-finished","success":true}\n', 'last stdout\n'];
|
|
136
|
-
const result = await runHook('cargo', process.execPath, [
|
|
137
|
-
'-e',
|
|
138
|
-
emit(stdout, 'last stderr\n', "process.kill(process.pid, 'SIGTERM');"),
|
|
139
|
-
]);
|
|
140
|
-
expect(result.code).toBeNull();
|
|
141
|
-
expect(result.signal).toBe('SIGTERM');
|
|
142
|
-
expect(result.stdout).toEqual(Buffer.from(stdout.join('')));
|
|
143
|
-
expect(result.stderr.toString()).toBe('last stderr\n');
|
|
144
|
-
expect(result.phases).toEqual([
|
|
145
|
-
{ id: 7, phase: 'build' },
|
|
146
|
-
{ id: 7, phase: 'active' },
|
|
147
|
-
{ id: 7, phase: 'terminal' },
|
|
148
|
-
]);
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
it('reports spawn failure, acknowledges terminal, and exits nonzero', async () => {
|
|
152
|
-
const result = await runHook('cargo', `/runner-hook-missing-executable-${process.pid}`, []);
|
|
153
|
-
expect(result.code).toBe(1);
|
|
154
|
-
expect(result.signal).toBeNull();
|
|
155
|
-
expect(result.stdout.length).toBe(0);
|
|
156
|
-
expect(result.stderr.toString()).toContain('runner-hook:');
|
|
157
|
-
expect(result.stderr.toString()).toContain('runner-hook-missing-executable-');
|
|
158
|
-
expect(result.phases).toEqual([
|
|
159
|
-
{ id: 7, phase: 'build' },
|
|
160
|
-
{ id: 7, phase: 'terminal' },
|
|
161
|
-
]);
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
it('does not start the child until its initial build phase is acknowledged correctly', async () => {
|
|
165
|
-
const result = await runHook(
|
|
166
|
-
'cargo',
|
|
167
|
-
process.execPath,
|
|
168
|
-
['-e', emit(['child must not run\n'])],
|
|
169
|
-
() => '{"id":8,"phase":"build"}\n',
|
|
170
|
-
);
|
|
171
|
-
expect(result.code).toBe(1);
|
|
172
|
-
expect(result.stdout.length).toBe(0);
|
|
173
|
-
expect(result.stderr.toString()).toContain('unexpected lifecycle acknowledgement');
|
|
174
|
-
expect(result.phases).toEqual([{ id: 7, phase: 'build' }]);
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
it('withholds the active record and subsequent stdout when its acknowledgement is invalid', async () => {
|
|
178
|
-
const compiler = '{"reason":"compiler-artifact","fresh":true}\n';
|
|
179
|
-
const result = await runHook(
|
|
180
|
-
'cargo',
|
|
181
|
-
process.execPath,
|
|
182
|
-
['-e', emit([compiler, '{"reason":"build-finished","success":true}\n', 'fixture ready\n'])],
|
|
183
|
-
(line) => (line.includes('"phase":"active"') ? '{"id":8,"phase":"active"}\n' : `${line}\n`),
|
|
184
|
-
);
|
|
185
|
-
expect(result.code).toBe(1);
|
|
186
|
-
expect(result.stdout.toString()).toBe(compiler);
|
|
187
|
-
expect(result.stderr.toString()).toContain('unexpected lifecycle acknowledgement');
|
|
188
|
-
expect(result.phases).toEqual([
|
|
189
|
-
{ id: 7, phase: 'build' },
|
|
190
|
-
{ id: 7, phase: 'active' },
|
|
191
|
-
]);
|
|
192
|
-
});
|
|
193
|
-
});
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'bun:test';
|
|
2
|
-
import { createRunnerLifecycle, withRunnerLifecycle } from './runner-lifecycle.js';
|
|
3
|
-
|
|
4
|
-
const event = (id: number, phase: string): string => JSON.stringify({ id, phase });
|
|
5
|
-
|
|
6
|
-
describe('private runner lifecycle', () => {
|
|
7
|
-
it('bounds startup and active execution, never build intervals, through the final owned close', () => {
|
|
8
|
-
const lifecycle = createRunnerLifecycle(2);
|
|
9
|
-
expect(lifecycle.isTesting()).toBe(true);
|
|
10
|
-
lifecycle.accept(event(0, 'build'));
|
|
11
|
-
expect(lifecycle.isTesting()).toBe(false);
|
|
12
|
-
lifecycle.accept(event(0, 'active'));
|
|
13
|
-
expect(lifecycle.isTesting()).toBe(true);
|
|
14
|
-
lifecycle.accept(event(0, 'build'));
|
|
15
|
-
expect(lifecycle.isTesting()).toBe(false);
|
|
16
|
-
lifecycle.accept(event(0, 'active'));
|
|
17
|
-
lifecycle.accept(event(0, 'terminal'));
|
|
18
|
-
expect(lifecycle.isTesting()).toBe(true);
|
|
19
|
-
lifecycle.accept(event(1, 'build'));
|
|
20
|
-
expect(lifecycle.isTesting()).toBe(false);
|
|
21
|
-
lifecycle.accept(event(1, 'active'));
|
|
22
|
-
expect(lifecycle.isTesting()).toBe(true);
|
|
23
|
-
lifecycle.accept(event(1, 'terminal'));
|
|
24
|
-
expect(lifecycle.isTesting()).toBe(false);
|
|
25
|
-
expect(lifecycle.error()).toBeNull();
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it('allows shell short-circuiting but refuses overlapping or resurrected invocations', () => {
|
|
29
|
-
const lifecycle = createRunnerLifecycle(3);
|
|
30
|
-
lifecycle.accept(event(0, 'build'));
|
|
31
|
-
lifecycle.accept(event(0, 'terminal'));
|
|
32
|
-
expect(lifecycle.accept(event(2, 'build'))).toEqual({ id: 2, phase: 'build' });
|
|
33
|
-
expect(lifecycle.accept(event(1, 'build'))).toBeNull();
|
|
34
|
-
expect(lifecycle.isTesting()).toBe(true);
|
|
35
|
-
expect(lifecycle.error()).not.toBeNull();
|
|
36
|
-
for (const lines of [
|
|
37
|
-
[event(0, 'terminal'), event(0, 'build')],
|
|
38
|
-
[event(0, 'build'), event(1, 'build')],
|
|
39
|
-
['test result: ok'],
|
|
40
|
-
[event(0, 'heartbeat')],
|
|
41
|
-
]) {
|
|
42
|
-
const invalid = createRunnerLifecycle(2);
|
|
43
|
-
for (const line of lines) invalid.accept(line);
|
|
44
|
-
expect(invalid.error()).not.toBeNull();
|
|
45
|
-
expect(invalid.isTesting()).toBe(true);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
describe('native runner hooks', () => {
|
|
51
|
-
it('preserves runner selection, toolchains, separators, and harness arguments', () => {
|
|
52
|
-
const hooked = withRunnerLifecycle(
|
|
53
|
-
'cargo +stable --frozen test --message-format=human --lib selected -- --nocapture && go test -json ./second',
|
|
54
|
-
);
|
|
55
|
-
expect(hooked?.runners).toBe(2);
|
|
56
|
-
expect(hooked?.command).toContain(
|
|
57
|
-
'0 cargo cargo +stable --frozen test --message-format=json-render-diagnostics --lib selected -- --nocapture && ',
|
|
58
|
-
);
|
|
59
|
-
expect(hooked?.command).toContain('1 go go test -json ./second');
|
|
60
|
-
expect(withRunnerLifecycle('cargo test a || cargo test b; go test -json ./...')?.runners).toBe(3);
|
|
61
|
-
expect(withRunnerLifecycle('cargo test -- --message-format=human')?.command).toContain(
|
|
62
|
-
'cargo test --message-format=json-render-diagnostics -- --message-format=human',
|
|
63
|
-
);
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
it('retains spawn accounting for Bun, nextest, mixed wrappers and unknown shell syntax', () => {
|
|
67
|
-
for (const command of [
|
|
68
|
-
'bun test src',
|
|
69
|
-
'cargo nextest run',
|
|
70
|
-
'cargo build && cargo test',
|
|
71
|
-
'go test ./... && bun test src',
|
|
72
|
-
'env FOO=bar cargo test',
|
|
73
|
-
'cargo test | cat',
|
|
74
|
-
'cargo test > output',
|
|
75
|
-
'cargo test 3>&1',
|
|
76
|
-
'cargo test &&',
|
|
77
|
-
'cargo test\ngo test',
|
|
78
|
-
'sh -c "cargo test"',
|
|
79
|
-
])
|
|
80
|
-
expect(withRunnerLifecycle(command)).toBeNull();
|
|
81
|
-
});
|
|
82
|
-
});
|