@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,316 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'bun:test';
|
|
2
|
-
import { spawnSync } from 'node:child_process';
|
|
3
|
-
import { chmod, mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises';
|
|
4
|
-
import { tmpdir } from 'node:os';
|
|
5
|
-
import { join } from 'node:path';
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
CARGO_CROSS_LINT_COMMAND,
|
|
9
|
-
CARGO_CROSS_LINT_REFUSAL,
|
|
10
|
-
CARGO_CROSS_LINT_TARGET,
|
|
11
|
-
CARGO_DENY_WARNINGS,
|
|
12
|
-
CARGO_LINT_CLIPPY_COMMAND,
|
|
13
|
-
CARGO_LINUX_TRIPLE,
|
|
14
|
-
CROSS_CHECK_SCRIPT_COMMAND,
|
|
15
|
-
CROSS_CHECK_SCRIPT_NAME,
|
|
16
|
-
cargoFrozen,
|
|
17
|
-
DEVENV_CROSS_PROFILE,
|
|
18
|
-
runsFrozenCargo,
|
|
19
|
-
} from './cross-check-policy.js';
|
|
20
|
-
import { BUILD_OUTPUT_DEPENDENCIES, PLATFORM_TARGET_GLOBS } from './workspace-config-policy.js';
|
|
21
|
-
|
|
22
|
-
const suffixOf = (glob: string): string => (glob.startsWith('*') ? glob.slice(1) : glob);
|
|
23
|
-
|
|
24
|
-
describe('Linux cross-check policy', () => {
|
|
25
|
-
it('keeps the cross target out of every platform artifact family', () => {
|
|
26
|
-
// `*-linux` is not decoration: publish-workflow fans out over
|
|
27
|
-
// LINUX_PLATFORM_TARGET_GLOBS to build RELEASE ARTIFACTS on a Linux runner,
|
|
28
|
-
// platformTargetFamily classifies by it, and a matching name flags the whole
|
|
29
|
-
// project as platform-bearing. Naming this validation target `*-linux` would
|
|
30
|
-
// enrol a clippy run in release artifact production — silently, and only
|
|
31
|
-
// visible at publish time.
|
|
32
|
-
for (const glob of PLATFORM_TARGET_GLOBS) {
|
|
33
|
-
expect(CARGO_CROSS_LINT_TARGET.endsWith(suffixOf(glob))).toBe(false);
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
it('keeps the cross target out of every build output family', () => {
|
|
38
|
-
// A match here would attach the gate to each project's aggregate `build`,
|
|
39
|
-
// making an ordinary macOS build demand the opt-in cross toolchain.
|
|
40
|
-
for (const dependency of BUILD_OUTPUT_DEPENDENCIES) {
|
|
41
|
-
expect(CARGO_CROSS_LINT_TARGET.endsWith(suffixOf(dependency))).toBe(false);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
it('names targets without colons', () => {
|
|
46
|
-
// Nx CLI syntax is already project:target:configuration.
|
|
47
|
-
expect(CARGO_CROSS_LINT_TARGET).not.toContain(':');
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
it('compiles test code for the target without running anything', () => {
|
|
51
|
-
// --all-targets is the entire test story for the cross arm: bins, tests,
|
|
52
|
-
// benches and examples are type-checked for Linux, and nothing is executed
|
|
53
|
-
// because an x86_64 Linux binary cannot run on Apple Silicon. Dropping it
|
|
54
|
-
// would silently stop checking every #[cfg(test)] and #[bench] block.
|
|
55
|
-
expect(CARGO_CROSS_LINT_COMMAND).toContain('--all-targets');
|
|
56
|
-
// No cargo subcommand here may execute what it built.
|
|
57
|
-
expect(CARGO_CROSS_LINT_COMMAND).not.toContain('cargo test');
|
|
58
|
-
expect(CARGO_CROSS_LINT_COMMAND).not.toContain('cargo run');
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
it('matches the severity and triple CI lints with', () => {
|
|
62
|
-
// A weaker local command passes where CI fails, which is the failure this
|
|
63
|
-
// gate exists to prevent rather than reproduce.
|
|
64
|
-
expect(CARGO_CROSS_LINT_COMMAND).toContain(CARGO_DENY_WARNINGS);
|
|
65
|
-
expect(CARGO_CROSS_LINT_COMMAND).toContain(`--target ${CARGO_LINUX_TRIPLE}`);
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
it('passes clippy-driver no arguments, so the gate and a plain clippy share one unit set', () => {
|
|
69
|
-
// Anything after `--` becomes CLIPPY_ARGS, part of every member's fingerprint.
|
|
70
|
-
for (const command of [CARGO_LINT_CLIPPY_COMMAND, CARGO_CROSS_LINT_COMMAND]) {
|
|
71
|
-
expect(command).not.toContain(' -- ');
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
it('fails on warnings it replays from units a plain clippy already checked', async () => {
|
|
76
|
-
const project = await mkdtemp(join(tmpdir(), 'cargo-lint-warnings-'));
|
|
77
|
-
const clippy = async (command: string): Promise<{ exitCode: number; output: string }> => {
|
|
78
|
-
const child = Bun.spawn(['sh', '-c', command], {
|
|
79
|
-
cwd: project,
|
|
80
|
-
env: { ...process.env, RUSTC_WRAPPER: '', RUSTC_WORKSPACE_WRAPPER: '' },
|
|
81
|
-
stdout: 'pipe',
|
|
82
|
-
stderr: 'pipe',
|
|
83
|
-
});
|
|
84
|
-
const [exitCode, stdout, stderr] = await Promise.all([
|
|
85
|
-
child.exited,
|
|
86
|
-
new Response(child.stdout).text(),
|
|
87
|
-
new Response(child.stderr).text(),
|
|
88
|
-
]);
|
|
89
|
-
return { exitCode, output: stdout + stderr };
|
|
90
|
-
};
|
|
91
|
-
try {
|
|
92
|
-
await mkdir(join(project, 'src'));
|
|
93
|
-
await writeFile(
|
|
94
|
-
join(project, 'Cargo.toml'),
|
|
95
|
-
'[package]\nname = "warning-fixture"\nversion = "0.1.0"\nedition = "2021"\n[workspace]\n',
|
|
96
|
-
);
|
|
97
|
-
await writeFile(
|
|
98
|
-
join(project, 'Cargo.lock'),
|
|
99
|
-
'version = 4\n\n[[package]]\nname = "warning-fixture"\nversion = "0.1.0"\n',
|
|
100
|
-
);
|
|
101
|
-
await writeFile(join(project, 'src/lib.rs'), 'pub fn planted() {\n let unused = 1;\n}\n');
|
|
102
|
-
const plain = cargoFrozen('clippy --workspace --all-targets');
|
|
103
|
-
|
|
104
|
-
const first = await clippy(plain);
|
|
105
|
-
expect(first).toMatchObject({ exitCode: 0 });
|
|
106
|
-
expect(first.output).toContain('Checking warning-fixture');
|
|
107
|
-
expect(first.output).toContain('unused variable');
|
|
108
|
-
|
|
109
|
-
// Fresh: the gate replays the plain run's units and their warning, and fails on it.
|
|
110
|
-
const gate = await clippy(CARGO_LINT_CLIPPY_COMMAND);
|
|
111
|
-
expect(gate.exitCode).not.toBe(0);
|
|
112
|
-
expect(gate.output).not.toContain('Checking warning-fixture');
|
|
113
|
-
expect(gate.output).toContain('unused variable');
|
|
114
|
-
expect(gate.output).toContain('warnings are denied by `build.warnings` configuration');
|
|
115
|
-
|
|
116
|
-
// And the gate left the plain run's units Fresh in turn.
|
|
117
|
-
const again = await clippy(plain);
|
|
118
|
-
expect(again).toMatchObject({ exitCode: 0 });
|
|
119
|
-
expect(again.output).not.toContain('Checking warning-fixture');
|
|
120
|
-
} finally {
|
|
121
|
-
await rm(project, { recursive: true, force: true });
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
it('refuses to start without cargo-zigbuild instead of compiling', async () => {
|
|
126
|
-
// Without this guard a cache miss outside the linux-cross toolchain would
|
|
127
|
-
// start a compile that cannot finish. Run for real against a PATH with no
|
|
128
|
-
// cargo-zigbuild: it must refuse, name the fix, and never reach cargo.
|
|
129
|
-
const child = Bun.spawn(['/bin/sh', '-c', CARGO_CROSS_LINT_COMMAND], {
|
|
130
|
-
cwd: tmpdir(),
|
|
131
|
-
env: { PATH: '/usr/bin:/bin' },
|
|
132
|
-
stdout: 'pipe',
|
|
133
|
-
stderr: 'pipe',
|
|
134
|
-
});
|
|
135
|
-
const [exitCode, stderr] = await Promise.all([child.exited, new Response(child.stderr).text()]);
|
|
136
|
-
expect(exitCode).toBe(2);
|
|
137
|
-
expect(stderr).toContain('needs cargo-zigbuild');
|
|
138
|
-
expect(stderr).toContain('bun run check:linux');
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
it('prints the refusal the managed pre-push hook reads as a cache miss', () => {
|
|
142
|
-
expect(CARGO_CROSS_LINT_COMMAND).toContain(`echo '${CARGO_CROSS_LINT_REFUSAL}' >&2; exit 2`);
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
it('carries the triple explicitly so a host lint cannot pass for a cross one', () => {
|
|
146
|
-
// The devenv profile deliberately exports no CARGO_BUILD_TARGET. Were the
|
|
147
|
-
// triple ambient instead, running this target outside the cross shell would
|
|
148
|
-
// lint the host and report green — a gate that cannot fail.
|
|
149
|
-
expect(CARGO_CROSS_LINT_COMMAND).toContain('--target ');
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
it('preserves Cargo home configuration and its relative paths while linting', async () => {
|
|
153
|
-
const root = await mkdtemp(join(tmpdir(), 'cargo-lint-config-'));
|
|
154
|
-
const home = join(root, 'home');
|
|
155
|
-
const project = join(root, 'project');
|
|
156
|
-
try {
|
|
157
|
-
await mkdir(home);
|
|
158
|
-
await mkdir(join(project, 'src'), { recursive: true });
|
|
159
|
-
await writeFile(join(home, 'config.toml'), '[env]\nCONFIG_DATA = { value = "data.txt", relative = true }\n');
|
|
160
|
-
await writeFile(join(root, 'data.txt'), 'configuration-relative data\n');
|
|
161
|
-
await writeFile(
|
|
162
|
-
join(project, 'Cargo.toml'),
|
|
163
|
-
'[package]\nname = "config-fixture"\nversion = "0.1.0"\nedition = "2021"\n[workspace]\n',
|
|
164
|
-
);
|
|
165
|
-
await writeFile(
|
|
166
|
-
join(project, 'Cargo.lock'),
|
|
167
|
-
'version = 4\n\n[[package]]\nname = "config-fixture"\nversion = "0.1.0"\n',
|
|
168
|
-
);
|
|
169
|
-
await writeFile(join(project, 'src/lib.rs'), 'pub const DATA: &str = include_str!(env!("CONFIG_DATA"));\n');
|
|
170
|
-
const child = Bun.spawn(['sh', '-c', CARGO_LINT_CLIPPY_COMMAND], {
|
|
171
|
-
cwd: project,
|
|
172
|
-
env: { ...process.env, CARGO_HOME: home, RUSTC_WRAPPER: '', RUSTC_WORKSPACE_WRAPPER: '' },
|
|
173
|
-
stdout: 'pipe',
|
|
174
|
-
stderr: 'pipe',
|
|
175
|
-
});
|
|
176
|
-
const [exitCode, stdout, stderr] = await Promise.all([
|
|
177
|
-
child.exited,
|
|
178
|
-
new Response(child.stdout).text(),
|
|
179
|
-
new Response(child.stderr).text(),
|
|
180
|
-
]);
|
|
181
|
-
expect({ exitCode, output: stdout + stderr }).toMatchObject({ exitCode: 0 });
|
|
182
|
-
} finally {
|
|
183
|
-
await rm(root, { recursive: true, force: true });
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
it('pins clippy to the committed lockfile and local cache', () => {
|
|
188
|
-
expect(cargoFrozen('clippy --workspace')).toBe('cargo --frozen clippy --workspace');
|
|
189
|
-
// cargo drops a global --frozen in front of an external subcommand, so the
|
|
190
|
-
// flag sits on cargo-zigbuild's own subcommand.
|
|
191
|
-
expect(CARGO_CROSS_LINT_COMMAND).toContain('cargo-zigbuild clippy --frozen ');
|
|
192
|
-
expect(CARGO_CROSS_LINT_COMMAND).not.toContain('cargo --frozen zigbuild');
|
|
193
|
-
expect(CARGO_LINT_CLIPPY_COMMAND).toContain('cargo --frozen clippy');
|
|
194
|
-
// Inference recognizes both spellings, so both get the fetch prerequisite
|
|
195
|
-
// and the toolchain identity.
|
|
196
|
-
expect(runsFrozenCargo(CARGO_CROSS_LINT_COMMAND)).toBe(true);
|
|
197
|
-
expect(runsFrozenCargo(CARGO_LINT_CLIPPY_COMMAND)).toBe(true);
|
|
198
|
-
expect(runsFrozenCargo('cargo clippy --workspace')).toBe(false);
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
it('drives the Nx target through the cross profile from the root script', () => {
|
|
202
|
-
expect(CROSS_CHECK_SCRIPT_NAME).toBe('check:linux');
|
|
203
|
-
// Activates the profile...
|
|
204
|
-
expect(CROSS_CHECK_SCRIPT_COMMAND).toContain(`-P ${DEVENV_CROSS_PROFILE}`);
|
|
205
|
-
// ...via the managed wrapper, so it resolves devenv config in any fleet repo...
|
|
206
|
-
expect(CROSS_CHECK_SCRIPT_COMMAND).toStartWith('tooling/devenv ');
|
|
207
|
-
// ...and runs Nx rather than cargo directly, so caching and project
|
|
208
|
-
// discovery stay Nx's job.
|
|
209
|
-
expect(CROSS_CHECK_SCRIPT_COMMAND).toContain(`nx run-many -t ${CARGO_CROSS_LINT_TARGET}`);
|
|
210
|
-
// The pre-push gate never enters the cross profile, so a human does — and
|
|
211
|
-
// devenv's own progress has to reach them, or a 0.9 GiB toolchain closure
|
|
212
|
-
// and an unbounded clippy are indistinguishable from a hang.
|
|
213
|
-
expect(CROSS_CHECK_SCRIPT_COMMAND).not.toContain('--quiet');
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
it('uses the verb:qualifier root script convention', () => {
|
|
217
|
-
expect(CROSS_CHECK_SCRIPT_NAME).toMatch(/^[a-z]+:[a-z-]+$/);
|
|
218
|
-
});
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* The managed pre-push hook, run for real in a fixture repository whose `tooling/direnv/repo-path` puts stand-ins
|
|
223
|
-
* first on PATH: `uname` says Darwin, `smoo` passes the denylist, `direnv` enters the checkout's environment, and `nx`
|
|
224
|
-
* prints what a cross run printed and exits with its status, refusing to run in any environment but the checkout's.
|
|
225
|
-
* The hook must ask in the checkout's environment and call a miss a miss and every other failure what it is.
|
|
226
|
-
*/
|
|
227
|
-
describe('managed pre-push cross probe', () => {
|
|
228
|
-
const hook = join(import.meta.dir, '../managed/raw/tooling/git-hooks/pre-push.sh');
|
|
229
|
-
/** The SDK the checkout's environment names; the caller's shell names another. */
|
|
230
|
-
const CHECKOUT_SDK = '/checkout/MacOSX.sdk';
|
|
231
|
-
|
|
232
|
-
interface Push {
|
|
233
|
-
readonly nxOutput: string;
|
|
234
|
-
readonly nxStatus: number;
|
|
235
|
-
/** Whether direnv is on the hook's PATH. */
|
|
236
|
-
readonly direnv?: boolean;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
async function push({ nxOutput, nxStatus, direnv = true }: Push): Promise<{ status: number | null; stderr: string }> {
|
|
240
|
-
const root = await mkdtemp(join(tmpdir(), 'pre-push-cross-'));
|
|
241
|
-
try {
|
|
242
|
-
const bin = join(root, 'bin');
|
|
243
|
-
await mkdir(bin);
|
|
244
|
-
await mkdir(join(root, 'repo', 'tooling', 'direnv'), { recursive: true });
|
|
245
|
-
const stub = async (name: string, body: string) => {
|
|
246
|
-
await writeFile(join(bin, name), `#!/bin/sh\n${body}\n`);
|
|
247
|
-
await chmod(join(bin, name), 0o755);
|
|
248
|
-
};
|
|
249
|
-
await stub('uname', 'echo Darwin');
|
|
250
|
-
await stub('smoo', 'exit 0');
|
|
251
|
-
// Nx keys on the environment it runs in: outside the checkout's, it is not the gate's run.
|
|
252
|
-
await stub(
|
|
253
|
-
'nx',
|
|
254
|
-
`[ "$SDKROOT" = '${CHECKOUT_SDK}' ] || { echo "nx stub: keyed on the caller's SDKROOT $SDKROOT" >&2; exit 1; }\nprintf '%s\\n' "$NX_STUB_OUTPUT"; exit ${nxStatus}`,
|
|
255
|
-
);
|
|
256
|
-
if (direnv) {
|
|
257
|
-
// The checkout's .envrc: `direnv exec <checkout>` enters the environment that checkout declares.
|
|
258
|
-
await stub(
|
|
259
|
-
'direnv',
|
|
260
|
-
`[ "$1" = exec ] && [ "$2" = "$PWD" ] || { echo "direnv stub: unexpected $*" >&2; exit 64; }\nexport SDKROOT='${CHECKOUT_SDK}'\nshift 2\nexec "$@"`,
|
|
261
|
-
);
|
|
262
|
-
}
|
|
263
|
-
// Without direnv, PATH holds the stand-ins alone: no host direnv is found, and no coreutils either, as on a
|
|
264
|
-
// Nix-built Linux host whose /usr/bin and /bin hold none. The refusal must still be said.
|
|
265
|
-
const path = direnv ? `${bin}:$PATH` : bin;
|
|
266
|
-
await writeFile(join(root, 'repo', 'tooling', 'direnv', 'repo-path'), `#!/bin/sh\necho "${path}"\n`);
|
|
267
|
-
await chmod(join(root, 'repo', 'tooling', 'direnv', 'repo-path'), 0o755);
|
|
268
|
-
await writeFile(join(root, 'repo', 'tooling', 'direnv', 'ttsc-env.sh'), '');
|
|
269
|
-
expect(spawnSync('git', ['init', '-q', join(root, 'repo')]).status).toBe(0);
|
|
270
|
-
const run = spawnSync('bash', [hook, 'origin'], {
|
|
271
|
-
cwd: join(root, 'repo'),
|
|
272
|
-
// The caller's shell carries another directory's SDK, as a shell inside a parent directory's devenv does.
|
|
273
|
-
env: { ...process.env, NX_STUB_OUTPUT: nxOutput, SDKROOT: '/nix/store/caller-apple-sdk/MacOSX.sdk' },
|
|
274
|
-
input: '',
|
|
275
|
-
encoding: 'utf8',
|
|
276
|
-
});
|
|
277
|
-
return { status: run.status, stderr: run.stderr };
|
|
278
|
-
} finally {
|
|
279
|
-
await rm(root, { recursive: true, force: true });
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
it("passes a hit, asked in the checkout's environment rather than the caller's", async () => {
|
|
284
|
-
const { status, stderr } = await push({ nxOutput: 'Successfully ran target cargo-lint-cross', nxStatus: 0 });
|
|
285
|
-
expect(stderr).not.toContain("keyed on the caller's SDKROOT");
|
|
286
|
-
expect(status).toBe(0);
|
|
287
|
-
});
|
|
288
|
-
|
|
289
|
-
it('names a miss when the cross target refused to compile', async () => {
|
|
290
|
-
const { status, stderr } = await push({ nxOutput: CARGO_CROSS_LINT_REFUSAL, nxStatus: 1 });
|
|
291
|
-
expect(status).toBe(1);
|
|
292
|
-
expect(stderr).toContain('NOT cached for this tree');
|
|
293
|
-
expect(stderr).toContain('bun run check:linux');
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
it('names any other failure as that, never as a cache miss', async () => {
|
|
297
|
-
const { status, stderr } = await push({
|
|
298
|
-
nxOutput: 'NX NX_WORKSPACE_ROOT_PATH names another workspace',
|
|
299
|
-
nxStatus: 1,
|
|
300
|
-
});
|
|
301
|
-
expect(status).toBe(1);
|
|
302
|
-
expect(stderr).toContain('failed (exit 1) before it reached');
|
|
303
|
-
expect(stderr).not.toContain('NOT cached');
|
|
304
|
-
});
|
|
305
|
-
|
|
306
|
-
it("refuses, naming direnv, when it cannot enter the checkout's environment", async () => {
|
|
307
|
-
const { status, stderr } = await push({
|
|
308
|
-
nxOutput: 'Successfully ran target cargo-lint-cross',
|
|
309
|
-
nxStatus: 0,
|
|
310
|
-
direnv: false,
|
|
311
|
-
});
|
|
312
|
-
expect(status).toBe(1);
|
|
313
|
-
expect(stderr).toContain('direnv is not on PATH');
|
|
314
|
-
expect(stderr).not.toContain('NOT cached');
|
|
315
|
-
});
|
|
316
|
-
});
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from 'bun:test';
|
|
2
|
-
import { directDiskCommands, PHYSICAL_BOOT_LAYER } from './disk-command-policy.js';
|
|
3
|
-
|
|
4
|
-
const imageTool = '/usr/bin/hdiutil';
|
|
5
|
-
const diskTool = '/usr/sbin/diskutil';
|
|
6
|
-
|
|
7
|
-
describe('disk-image execution boundary', () => {
|
|
8
|
-
it('rejects direct process calls in Rust, Node, Python and shell, including aliases', () => {
|
|
9
|
-
for (const source of [
|
|
10
|
-
`Command::new("${imageTool}").args(["attach", image]);`,
|
|
11
|
-
`const PROGRAM: &str = "${diskTool}"; Command::new(PROGRAM);`,
|
|
12
|
-
`const executable = '${imageTool}'; spawn(executable, ['attach', image]);`,
|
|
13
|
-
`execFileSync('${diskTool}', ['image', 'attach', image]);`,
|
|
14
|
-
`Bun.spawn(['${imageTool}', 'attach', image]);`,
|
|
15
|
-
`Bun.spawn({ cmd: ['${imageTool}', 'attach', image] });`,
|
|
16
|
-
`argv = ['${diskTool}', 'eject', device]\nsubprocess.run(argv)`,
|
|
17
|
-
`subprocess.run(['${diskTool}', 'image', 'attach', image]);`,
|
|
18
|
-
`sh(['${diskTool}', 'eject', device])`,
|
|
19
|
-
`$\`${imageTool} detach \${device}\``,
|
|
20
|
-
`#!/bin/sh\n${imageTool} attach "$image"`,
|
|
21
|
-
`info=$(${diskTool} info -plist "$device")`,
|
|
22
|
-
]) {
|
|
23
|
-
expect(directDiskCommands(source).length, source).toBeGreaterThan(0);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
it('allows the shared command layer, its Nx adapter, and declarative command requests', () => {
|
|
28
|
-
for (const source of [
|
|
29
|
-
`SystemCommandRunner.run(&CommandRequest::new("${imageTool}", ["detach", device]));`,
|
|
30
|
-
`host.run('${diskTool}', ['image', 'attach', image]);`,
|
|
31
|
-
`this.commands.run('${imageTool}', ['attach', image]);`,
|
|
32
|
-
`subprocess.run(['cowshed', 'disk-command', '${diskTool}', '--', 'info']);`,
|
|
33
|
-
'$`cowshed disk-command hdiutil -- detach "$device"`',
|
|
34
|
-
`// ${imageTool} attach is prohibited\n/* Command::new("${diskTool}") */`,
|
|
35
|
-
`"""Measure \`${diskTool} image attach\` and \`${imageTool} detach\`."""`,
|
|
36
|
-
`format!("retry with \`${imageTool} detach\`; this message executes nothing");`,
|
|
37
|
-
`{"op":"disk-lease","command":"${imageTool} detach /dev/disk9"}`,
|
|
38
|
-
]) {
|
|
39
|
-
expect(directDiskCommands(source), source).toEqual([]);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it('admits only the fixed physical-volume boot commands in their owning layer', () => {
|
|
44
|
-
const boot = [
|
|
45
|
-
`info=$(${diskTool} info -plist "$uuid")`,
|
|
46
|
-
`| ${diskTool} apfs unlockVolume "$uuid" -nomount -stdinpassphrase`,
|
|
47
|
-
`${diskTool} mount -nobrowse -mountPoint "$mountpoint" "$uuid"`,
|
|
48
|
-
].join('\n');
|
|
49
|
-
expect(directDiskCommands(boot, PHYSICAL_BOOT_LAYER)).toEqual([]);
|
|
50
|
-
expect(directDiskCommands(boot, 'elsewhere.sh').length).toBeGreaterThan(0);
|
|
51
|
-
for (const verb of ['image attach', 'image create', 'attach', 'detach', 'eject']) {
|
|
52
|
-
expect(directDiskCommands(`${diskTool} ${verb} "$image"`, PHYSICAL_BOOT_LAYER)).toEqual([1]);
|
|
53
|
-
expect(directDiskCommands(`${imageTool} ${verb} "$image"`, PHYSICAL_BOOT_LAYER)).toEqual([1]);
|
|
54
|
-
}
|
|
55
|
-
expect(directDiskCommands(`HostCommand::new("${diskTool}", ["image", "attach", path])`)).toEqual([1]);
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
it('reports the source line, retaining multiline comment offsets', () => {
|
|
59
|
-
expect(directDiskCommands(`/* example\nnot executed */\nspawn('${imageTool}', []);`)).toEqual([3]);
|
|
60
|
-
});
|
|
61
|
-
});
|
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
import { afterEach, beforeEach, describe, expect, it } from 'bun:test';
|
|
2
|
-
import { createHash } from 'node:crypto';
|
|
3
|
-
import { chmod, lstat, mkdir, mkdtemp, realpath, rm, symlink, writeFile } from 'node:fs/promises';
|
|
4
|
-
import { tmpdir } from 'node:os';
|
|
5
|
-
import { join } from 'node:path';
|
|
6
|
-
import type { Task } from 'nx/src/config/task-graph';
|
|
7
|
-
import { expandOutputs } from 'nx/src/native';
|
|
8
|
-
import { cargoRuntimeInput } from './cargo-toolchain-policy.js';
|
|
9
|
-
import type { EnsureBuiltProducerReceipt } from './ensure-built.js';
|
|
10
|
-
import {
|
|
11
|
-
boundedReceiptRuntimes,
|
|
12
|
-
captureProducerSource,
|
|
13
|
-
dirtyProviderPaths,
|
|
14
|
-
type ProducerSourceWitness,
|
|
15
|
-
type ProviderInputProof,
|
|
16
|
-
producerOutputPaths,
|
|
17
|
-
producerSourceUnchanged,
|
|
18
|
-
providerReceipt,
|
|
19
|
-
} from './ensure-built-receipt.js';
|
|
20
|
-
|
|
21
|
-
let root = '';
|
|
22
|
-
let source: ProducerSourceWitness;
|
|
23
|
-
let producer: Omit<EnsureBuiltProducerReceipt, 'outputSha256'>;
|
|
24
|
-
const task = {
|
|
25
|
-
id: 'app:build',
|
|
26
|
-
target: { project: 'app', target: 'build' },
|
|
27
|
-
overrides: {},
|
|
28
|
-
outputs: ['output'],
|
|
29
|
-
cache: true,
|
|
30
|
-
hash: 'current-key',
|
|
31
|
-
} satisfies Task;
|
|
32
|
-
const inputs = { files: ['source.txt'], runtime: [], environment: [], depOutputs: [], external: [] };
|
|
33
|
-
const proof: ProviderInputProof = {
|
|
34
|
-
kind: 'exact-file-inputs',
|
|
35
|
-
files: ['source.txt'],
|
|
36
|
-
inputs: { [task.id]: inputs },
|
|
37
|
-
runtimeSource: { kind: 'bounded' },
|
|
38
|
-
};
|
|
39
|
-
function git(...args: string[]): void {
|
|
40
|
-
const result = Bun.spawnSync(['git', '-C', root, ...args], { stderr: 'pipe' });
|
|
41
|
-
expect(result.exitCode, result.stderr.toString()).toBe(0);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
beforeEach(async () => {
|
|
45
|
-
root = await realpath(await mkdtemp(join(tmpdir(), 'ensure-built-receipt-')));
|
|
46
|
-
git('init', '--quiet');
|
|
47
|
-
await writeFile(join(root, '.gitignore'), 'output/\n');
|
|
48
|
-
await writeFile(join(root, 'source.txt'), 'source');
|
|
49
|
-
git('add', '.');
|
|
50
|
-
git('-c', 'user.name=Receipt fixture', '-c', 'user.email=receipt@example.invalid', 'commit', '-qm', 'fixture');
|
|
51
|
-
await mkdir(join(root, 'output/empty'), { recursive: true });
|
|
52
|
-
await writeFile(join(root, 'output/file'), 'public bytes');
|
|
53
|
-
await symlink('file', join(root, 'output/link'));
|
|
54
|
-
await chmod(join(root, 'output/file'), 0o644);
|
|
55
|
-
await chmod(join(root, 'output/empty'), 0o755);
|
|
56
|
-
const captured = captureProducerSource(root, producerOutputPaths(root, [task], expandOutputs));
|
|
57
|
-
if (!captured.ok) throw new Error(captured.detail);
|
|
58
|
-
source = captured.value;
|
|
59
|
-
producer = {
|
|
60
|
-
version: 1,
|
|
61
|
-
target: task.id,
|
|
62
|
-
argv: ['nx', 'run', task.id],
|
|
63
|
-
trackedTreeClean: true,
|
|
64
|
-
environmentIdentity: 'unit-fixture-nx-hash-identity',
|
|
65
|
-
tools: [],
|
|
66
|
-
wallTimeMs: 0,
|
|
67
|
-
inputs: [
|
|
68
|
-
{
|
|
69
|
-
taskId: task.id,
|
|
70
|
-
overrides: task.overrides,
|
|
71
|
-
declared: [],
|
|
72
|
-
expanded: inputs,
|
|
73
|
-
hashDetails: { command: 'unit-fixture', nodes: {} },
|
|
74
|
-
files: source.files.filter(({ path }) => inputs.files.includes(path)),
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
};
|
|
78
|
-
});
|
|
79
|
-
afterEach(async () => {
|
|
80
|
-
await rm(root, { recursive: true, force: true });
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
describe('provider receipt', () => {
|
|
84
|
-
it('does not borrow the caller Git directory/index/object namespace for provider provenance', () => {
|
|
85
|
-
const saved = process.env.GIT_DIR;
|
|
86
|
-
process.env.GIT_DIR = join(root, 'not-the-provider-git-directory');
|
|
87
|
-
try {
|
|
88
|
-
expect(providerReceipt(root, task.id, [task], proof, expandOutputs, source, producer).disposition).toBe('hit');
|
|
89
|
-
} finally {
|
|
90
|
-
if (saved === undefined) delete process.env.GIT_DIR;
|
|
91
|
-
else process.env.GIT_DIR = saved;
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
it("reads provider provenance without the operator's global git configuration", async () => {
|
|
95
|
-
// The cowshed sandbox denies the operator's global git configuration to a workspace's Nx daemon, which runs these
|
|
96
|
-
// hooks under a host client's HOME; git then dies "unable to access". A self-referencing link fails git the same
|
|
97
|
-
// way (ELOOP), where an unreadable file would only warn (EACCES).
|
|
98
|
-
const home = join(root, 'operator-home');
|
|
99
|
-
await mkdir(home);
|
|
100
|
-
await symlink('.gitconfig', join(home, '.gitconfig'));
|
|
101
|
-
const names = ['HOME', 'XDG_CONFIG_HOME', 'GIT_CONFIG_GLOBAL', 'GIT_CONFIG_NOSYSTEM'] as const;
|
|
102
|
-
const saved = names.map((name) => [name, process.env[name]] as const);
|
|
103
|
-
for (const name of names) delete process.env[name];
|
|
104
|
-
process.env.HOME = home;
|
|
105
|
-
try {
|
|
106
|
-
const captured = captureProducerSource(root, producerOutputPaths(root, [task], expandOutputs));
|
|
107
|
-
expect(captured.ok ? 'captured' : captured.detail).toBe('captured');
|
|
108
|
-
expect(producerSourceUnchanged(root, source)).toEqual({ ok: true, value: true });
|
|
109
|
-
} finally {
|
|
110
|
-
for (const [name, value] of saved) {
|
|
111
|
-
if (value === undefined) delete process.env[name];
|
|
112
|
-
else process.env[name] = value;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
it('names current hashes, HEAD/tree, independent file digests, link text and empty directory modes', async () => {
|
|
117
|
-
const result = providerReceipt(root, task.id, [task], proof, expandOutputs, source, producer);
|
|
118
|
-
expect(result.disposition).toBe('hit');
|
|
119
|
-
if (result.disposition !== 'hit') throw new Error(result.reason.detail);
|
|
120
|
-
expect(result.receipt.head).toMatch(/^[a-f0-9]{40,64}$/);
|
|
121
|
-
expect(result.receipt.headTree).toMatch(/^[a-f0-9]{40,64}$/);
|
|
122
|
-
expect(result.receipt.workspaceRoot).toBe(root);
|
|
123
|
-
expect(result.receipt.runtimeEnvironmentProvenance).toBe('nx-task-hash-only');
|
|
124
|
-
expect(result.receipt.tasks[0].id).toBe(task.id);
|
|
125
|
-
expect(result.receipt.tasks[0].hash).toBe(task.hash);
|
|
126
|
-
expect(result.receipt.tasks[0].outputs).toContainEqual({
|
|
127
|
-
path: 'output/file',
|
|
128
|
-
type: 'file',
|
|
129
|
-
mode: 0o644,
|
|
130
|
-
sha256: createHash('sha256').update('public bytes').digest('hex'),
|
|
131
|
-
});
|
|
132
|
-
expect(result.receipt.tasks[0].outputs).toContainEqual({
|
|
133
|
-
path: 'output/link',
|
|
134
|
-
type: 'symlink',
|
|
135
|
-
mode: (await lstat(join(root, 'output/link'))).mode & 0o7777,
|
|
136
|
-
linkText: 'file',
|
|
137
|
-
});
|
|
138
|
-
expect(result.receipt.tasks[0].outputs.find(({ path }) => path === 'output/empty')).toMatchObject({
|
|
139
|
-
type: 'directory',
|
|
140
|
-
mode: 0o755,
|
|
141
|
-
entries: [],
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
it('ignores unrelated untracked files while retaining tracked-tree production provenance', async () => {
|
|
146
|
-
await writeFile(join(root, 'unrelated.ts'), 'unrelated');
|
|
147
|
-
expect(providerReceipt(root, task.id, [task], proof, expandOutputs, source, producer).disposition).toBe('hit');
|
|
148
|
-
expect(
|
|
149
|
-
providerReceipt(
|
|
150
|
-
root,
|
|
151
|
-
task.id,
|
|
152
|
-
[task],
|
|
153
|
-
{ ...proof, kind: 'conservative-provider-source' },
|
|
154
|
-
expandOutputs,
|
|
155
|
-
source,
|
|
156
|
-
producer,
|
|
157
|
-
).disposition,
|
|
158
|
-
).toBe('hit');
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
it('refuses modified, deleted, newly matched and index-only dirty FILE inputs', async () => {
|
|
162
|
-
await writeFile(join(root, 'source.txt'), 'changed');
|
|
163
|
-
expect(providerReceipt(root, task.id, [task], proof, expandOutputs, source, producer).disposition).toBe('failed');
|
|
164
|
-
git('add', 'source.txt');
|
|
165
|
-
await writeFile(join(root, 'source.txt'), 'source');
|
|
166
|
-
expect(providerReceipt(root, task.id, [task], proof, expandOutputs, source, producer).disposition).toBe('failed');
|
|
167
|
-
git('restore', '--staged', 'source.txt');
|
|
168
|
-
await writeFile(join(root, 'new-source.txt'), 'new');
|
|
169
|
-
expect(
|
|
170
|
-
providerReceipt(
|
|
171
|
-
root,
|
|
172
|
-
task.id,
|
|
173
|
-
[task],
|
|
174
|
-
{ ...proof, files: [...proof.files, 'new-source.txt'] },
|
|
175
|
-
expandOutputs,
|
|
176
|
-
source,
|
|
177
|
-
producer,
|
|
178
|
-
).disposition,
|
|
179
|
-
).toBe('failed');
|
|
180
|
-
await rm(join(root, 'source.txt'));
|
|
181
|
-
expect(
|
|
182
|
-
providerReceipt(root, task.id, [task], { ...proof, files: [] }, expandOutputs, source, producer).disposition,
|
|
183
|
-
).toBe('failed');
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
it('recomputes output byte/directory identities after every public mutation', async () => {
|
|
187
|
-
const first = providerReceipt(root, task.id, [task], proof, expandOutputs, source, producer);
|
|
188
|
-
if (first.disposition !== 'hit') throw new Error(first.reason.detail);
|
|
189
|
-
await writeFile(join(root, 'output/file'), 'PUBLIC BYTES');
|
|
190
|
-
await chmod(join(root, 'output/empty'), 0o700);
|
|
191
|
-
const next = providerReceipt(root, task.id, [task], proof, expandOutputs, source, producer);
|
|
192
|
-
if (next.disposition !== 'hit') throw new Error(next.reason.detail);
|
|
193
|
-
expect(next.receipt.tasks[0].outputs).not.toEqual(first.receipt.tasks[0].outputs);
|
|
194
|
-
expect(next.receipt.tasks[0].outputs.find(({ path }) => path === 'output/empty')).toMatchObject({ mode: 0o700 });
|
|
195
|
-
});
|
|
196
|
-
|
|
197
|
-
it('accepts a new HEAD at the same committed tree without rewriting the producer basis', () => {
|
|
198
|
-
const original = providerReceipt(root, task.id, [task], proof, expandOutputs, source, producer);
|
|
199
|
-
if (original.disposition !== 'hit') throw new Error(original.reason.detail);
|
|
200
|
-
git(
|
|
201
|
-
'-c',
|
|
202
|
-
'user.name=Receipt fixture',
|
|
203
|
-
'-c',
|
|
204
|
-
'user.email=receipt@example.invalid',
|
|
205
|
-
'commit',
|
|
206
|
-
'--allow-empty',
|
|
207
|
-
'-qm',
|
|
208
|
-
'same tree',
|
|
209
|
-
);
|
|
210
|
-
expect(producerSourceUnchanged(root, source)).toEqual({ ok: true, value: true });
|
|
211
|
-
const next = providerReceipt(root, task.id, [task], proof, expandOutputs, source, producer);
|
|
212
|
-
if (next.disposition !== 'hit') throw new Error(next.reason.detail);
|
|
213
|
-
expect(next.receipt.head).toBe(original.receipt.head);
|
|
214
|
-
expect(next.receipt.headTree).toBe(original.receipt.headTree);
|
|
215
|
-
expect(next.receipt.producer.outputSha256).toBe(original.receipt.producer.outputSha256);
|
|
216
|
-
});
|
|
217
|
-
it('revokes a producer pre-source witness for a write/revert even when final bytes match HEAD', async () => {
|
|
218
|
-
await writeFile(join(root, 'source.txt'), 'edited');
|
|
219
|
-
await writeFile(join(root, 'source.txt'), 'source');
|
|
220
|
-
expect(producerSourceUnchanged(root, source).ok).toBe(false);
|
|
221
|
-
expect(providerReceipt(root, task.id, [task], proof, expandOutputs, source, producer).disposition).toBe('failed');
|
|
222
|
-
});
|
|
223
|
-
it('refuses unreadable public bytes, missing outputs and opaque runtime closure', async () => {
|
|
224
|
-
await chmod(join(root, 'output/file'), 0);
|
|
225
|
-
try {
|
|
226
|
-
expect(providerReceipt(root, task.id, [task], proof, expandOutputs, source, producer).disposition).toBe('failed');
|
|
227
|
-
} finally {
|
|
228
|
-
await chmod(join(root, 'output/file'), 0o600);
|
|
229
|
-
}
|
|
230
|
-
await rm(join(root, 'output'), { recursive: true });
|
|
231
|
-
expect(providerReceipt(root, task.id, [task], proof, expandOutputs, source, producer).disposition).toBe('failed');
|
|
232
|
-
expect(
|
|
233
|
-
providerReceipt(
|
|
234
|
-
root,
|
|
235
|
-
task.id,
|
|
236
|
-
[task],
|
|
237
|
-
{ ...proof, runtimeSource: { kind: 'opaque', detail: 'unnameable command input closure' } },
|
|
238
|
-
expandOutputs,
|
|
239
|
-
source,
|
|
240
|
-
producer,
|
|
241
|
-
),
|
|
242
|
-
).toMatchObject({
|
|
243
|
-
disposition: 'failed',
|
|
244
|
-
reason: { kind: 'provider-proof', detail: 'unnameable command input closure' },
|
|
245
|
-
});
|
|
246
|
-
});
|
|
247
|
-
});
|
|
248
|
-
|
|
249
|
-
describe('receipt runtime provenance', () => {
|
|
250
|
-
it('admits only the existing generated pinned toolchain-version recipe, never a command containing the same words', () => {
|
|
251
|
-
const recipe = cargoRuntimeInput('packages/app', 'rustc -vV && cargo -V').runtime;
|
|
252
|
-
const planned = { [task.id]: { ...inputs, runtime: [recipe] } };
|
|
253
|
-
expect(boundedReceiptRuntimes(planned, ['packages/app'], ['devenv.lock'], true)).toEqual({ kind: 'bounded' });
|
|
254
|
-
expect(boundedReceiptRuntimes(planned, ['packages/app'], [], true).kind).toBe('opaque');
|
|
255
|
-
expect(boundedReceiptRuntimes(planned, ['packages/app'], ['devenv.lock'], false).kind).toBe('opaque');
|
|
256
|
-
expect(
|
|
257
|
-
boundedReceiptRuntimes(
|
|
258
|
-
{ [task.id]: { ...inputs, runtime: [recipe + '; cat /unproved/external'] } },
|
|
259
|
-
['packages/app'],
|
|
260
|
-
['devenv.lock'],
|
|
261
|
-
true,
|
|
262
|
-
).kind,
|
|
263
|
-
).toBe('opaque');
|
|
264
|
-
expect(
|
|
265
|
-
boundedReceiptRuntimes(
|
|
266
|
-
{ [task.id]: { ...inputs, runtime: ['sh arbitrary-source-reader.sh'] } },
|
|
267
|
-
['packages/app'],
|
|
268
|
-
['devenv.lock'],
|
|
269
|
-
true,
|
|
270
|
-
).kind,
|
|
271
|
-
).toBe('opaque');
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
it('preserves whitespace, both sides of renames, deletion and index-only status paths', () => {
|
|
275
|
-
expect(
|
|
276
|
-
dirtyProviderPaths(' M source with spaces.ts\0R new.ts\0old.ts\0D deleted.ts\0?? new-source.ts\0'),
|
|
277
|
-
).toEqual(['source with spaces.ts', 'new.ts', 'old.ts', 'deleted.ts', 'new-source.ts']);
|
|
278
|
-
});
|
|
279
|
-
});
|