@smoothbricks/nx-plugin 0.7.2 → 0.7.4

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.
Files changed (74) hide show
  1. package/README.md +118 -118
  2. package/dist/.build-inputs.json +18 -18
  3. package/dist/cargo-toolchain-paths.d.ts +1 -1
  4. package/dist/cargo-toolchain-paths.js +1 -1
  5. package/dist/cargo-toolchain-policy.d.ts +2 -2
  6. package/dist/cargo-toolchain-policy.js +2 -2
  7. package/dist/cross-check-policy.d.ts +25 -30
  8. package/dist/cross-check-policy.d.ts.map +1 -1
  9. package/dist/cross-check-policy.js +27 -31
  10. package/dist/ensure-built-witness.js +727 -450
  11. package/dist/ensure-built.js +2 -2
  12. package/dist/executors/bounded-exec/bounds.d.ts +6 -3
  13. package/dist/executors/bounded-exec/bounds.d.ts.map +1 -1
  14. package/dist/executors/bounded-exec/bounds.js +9 -2
  15. package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
  16. package/dist/executors/bounded-exec/executor.js +24 -19
  17. package/dist/executors/bounded-exec/mbx-pool.d.ts +13 -16
  18. package/dist/executors/bounded-exec/mbx-pool.d.ts.map +1 -1
  19. package/dist/executors/bounded-exec/mbx-pool.js +24 -28
  20. package/dist/executors/bounded-exec/runner-lifecycle.d.ts +2 -0
  21. package/dist/executors/bounded-exec/runner-lifecycle.d.ts.map +1 -1
  22. package/dist/executors/bounded-exec/runner-lifecycle.js +9 -5
  23. package/dist/executors/bounded-exec/runner-sizing.d.ts +6 -1
  24. package/dist/executors/bounded-exec/runner-sizing.d.ts.map +1 -1
  25. package/dist/executors/bounded-exec/runner-sizing.js +7 -2
  26. package/dist/executors/bounded-exec/schema.d.ts +12 -3
  27. package/dist/executors/bounded-exec/schema.d.ts.map +1 -1
  28. package/dist/executors/cargo-zigbuild/executor.d.ts +10 -0
  29. package/dist/executors/cargo-zigbuild/executor.d.ts.map +1 -1
  30. package/dist/executors/cargo-zigbuild/executor.js +36 -2
  31. package/dist/index.js +9 -7
  32. package/dist/managed-files/files.d.ts +4 -4
  33. package/dist/managed-files/files.js +4 -4
  34. package/dist/owned-installation.d.ts.map +1 -1
  35. package/dist/owned-installation.js +4 -2
  36. package/dist/producer-receipts.js +476 -402
  37. package/dist/task-graph-policy.js +1 -1
  38. package/dist/testing.d.ts +8 -0
  39. package/dist/testing.d.ts.map +1 -1
  40. package/dist/testing.js +15 -0
  41. package/dist/workspace-config-policy.d.ts +1 -1
  42. package/dist/workspace-config-policy.js +1 -1
  43. package/dist/workspace-manifest.d.ts +5 -0
  44. package/dist/workspace-manifest.d.ts.map +1 -1
  45. package/managed/raw/patches/{nx@23.2.1.patch → nx@24.0.3.patch} +1397 -2174
  46. package/managed/raw/tooling/direnv/devenv.smoo.nix +30 -31
  47. package/managed/raw/tooling/direnv/github-actions-bootstrap.sh +4 -0
  48. package/managed/raw/tooling/git-hooks/pre-push.sh +21 -21
  49. package/managed/templates/github/actions/setup-devenv/action.yml +20 -5
  50. package/package.json +4 -3
  51. package/runtime/nx-publish/.build-inputs.json +2 -2
  52. package/runtime/nx-publish/cache_adapter.js +24 -11
  53. package/runtime/nx-publish/nx_publish.js +2 -1
  54. package/runtime-input.sh +1 -1
  55. package/src/cargo-toolchain-paths.ts +1 -1
  56. package/src/cargo-toolchain-policy.ts +2 -2
  57. package/src/cross-check-policy.ts +29 -32
  58. package/src/ensure-built.ts +2 -2
  59. package/src/executors/bounded-exec/bounds.ts +13 -4
  60. package/src/executors/bounded-exec/executor.ts +27 -29
  61. package/src/executors/bounded-exec/mbx-pool.ts +36 -30
  62. package/src/executors/bounded-exec/runner-lifecycle.ts +13 -6
  63. package/src/executors/bounded-exec/runner-sizing.ts +8 -2
  64. package/src/executors/bounded-exec/schema.json +5 -1
  65. package/src/executors/bounded-exec/schema.ts +12 -3
  66. package/src/executors/cargo-zigbuild/executor.ts +42 -2
  67. package/src/index.ts +9 -5
  68. package/src/managed-files/files.ts +4 -4
  69. package/src/owned-installation.ts +4 -2
  70. package/src/task-graph-policy.ts +1 -1
  71. package/src/testing.ts +13 -0
  72. package/src/workspace-config-policy.ts +1 -1
  73. package/src/workspace-manifest.ts +5 -0
  74. package/test-timings.json +2 -0
package/dist/index.js CHANGED
@@ -2748,17 +2748,17 @@ function nextestRunnerFixture(workspace, nativeTools) {
2748
2748
  return `${helper} ensure ${NEXTEST_BINARIES_METADATA} ${NEXTEST_BUILD_KEY} -- ${nextestBinariesBuild(nextestToolConfigArg(workspace.projectRoot))}`;
2749
2749
  }
2750
2750
  /**
2751
- * One `nextest run` over a filterset against the workspace's test build. Every runner of the
2752
- * workspace builds its command here, so the reuse-build, the remap, the tool config and the cwd
2753
- * cannot drift between the per-crate pieces and the serial groups.
2751
+ * One `nextest run`, or `nextest list`, over a filterset against the workspace's test build. Every runner of the
2752
+ * workspace builds its command here, so the reuse-build, the remap, the tool config and the cwd cannot drift between
2753
+ * the per-crate pieces, their test lists and the serial groups.
2754
2754
  */
2755
- function nextestRunnerCommand(workspace, nativeTools, selector, flags) {
2755
+ function nextestRunnerCommand(verb, workspace, nativeTools, selector, flags) {
2756
2756
  const toolConfig = nextestToolConfigArg(workspace.projectRoot);
2757
2757
  // Relative to the runner's cwd, so the hashed command is the same in every checkout.
2758
2758
  const helper = nativeToolCommand(nativeTools, workspace.projectRoot, 'nextest-extract', 'smoo-nx-nextest-binaries');
2759
2759
  const reuseBuild = `--binaries-metadata ${NEXTEST_BINARIES_METADATA} --cargo-metadata ${NEXTEST_CARGO_METADATA} ` +
2760
2760
  `--target-dir-remap "$(${helper} target-dir)"`;
2761
- return cargoFrozen(`nextest run ${reuseBuild} --workspace-remap . -E ${shellWord(selector)}${flags} --user-config-file none ${toolConfig}`);
2761
+ return cargoFrozen(`nextest ${verb} ${reuseBuild} --workspace-remap . -E ${shellWord(selector)}${flags} --user-config-file none ${toolConfig}`);
2762
2762
  }
2763
2763
  /** One per-crate piece: a bounded run of its partition of the test build's tests. */
2764
2764
  function cargoTestRunnerTarget(workspace, nativeTools, build, inputs, piece) {
@@ -2768,10 +2768,12 @@ function cargoTestRunnerTarget(workspace, nativeTools, build, inputs, piece) {
2768
2768
  inputs,
2769
2769
  dependsOn: [build, ...nativeToolDependsOn(nativeTools, 'nextest-extract')],
2770
2770
  options: {
2771
- command: nextestRunnerCommand(workspace, nativeTools, piece.selector, `${piece.extra} --no-fail-fast --no-tests=pass`),
2771
+ command: nextestRunnerCommand('run', workspace, nativeTools, piece.selector, `${piece.extra} --no-fail-fast --no-tests=pass`),
2772
2772
  cwd: workspace.projectRoot,
2773
2773
  fixtureCommand: nextestRunnerFixture(workspace, nativeTools),
2774
2774
  fixtureTimeoutMs: NEXTEST_BINARIES_FIXTURE_TIMEOUT_MS,
2775
+ // One line per test the piece runs, so under mbx it reserves no more cores than it has tests.
2776
+ unitsCommand: nextestRunnerCommand('list', workspace, nativeTools, piece.selector, `${piece.extra} -T oneline`),
2775
2777
  idleTimeoutMs: BOUNDED_TEST_IDLE_TIMEOUT_MS,
2776
2778
  killAfterMs: BOUNDED_TEST_KILL_AFTER_MS,
2777
2779
  },
@@ -2792,7 +2794,7 @@ function cargoTestGroupTarget(workspace, nativeTools, inputs, group) {
2792
2794
  inputs: [...inputs, fileHashInput(PLUGIN_NEXTEST_CODE_BOUND)],
2793
2795
  dependsOn: [CARGO_TEST_BUILD_TARGET, ...nativeToolDependsOn(nativeTools, 'nextest-extract')],
2794
2796
  options: {
2795
- command: nextestRunnerCommand(workspace, nativeTools, group.filter, ' --no-fail-fast --no-tests=fail'),
2797
+ command: nextestRunnerCommand('run', workspace, nativeTools, group.filter, ' --no-fail-fast --no-tests=fail'),
2796
2798
  cwd: workspace.projectRoot,
2797
2799
  fixtureCommand: nextestRunnerFixture(workspace, nativeTools),
2798
2800
  fixtureTimeoutMs: NEXTEST_BINARIES_FIXTURE_TIMEOUT_MS,
@@ -46,11 +46,11 @@ export declare const managedTtscPatch: {
46
46
  readonly key: 'ttsc@0.34.1';
47
47
  readonly path: 'patches/ttsc@0.34.1.patch';
48
48
  };
49
- /** Maintained Nx 23.2.1 repairs, applied as an ordinary Bun patchedDependency over the registry release. */
49
+ /** Maintained Nx 24.0.3 repairs, applied as an ordinary Bun patchedDependency over the registry release. */
50
50
  export declare const managedNxPatch: {
51
- readonly version: '23.2.1';
52
- readonly key: 'nx@23.2.1';
53
- readonly path: 'patches/nx@23.2.1.patch';
51
+ readonly version: '24.0.3';
52
+ readonly key: 'nx@24.0.3';
53
+ readonly path: 'patches/nx@24.0.3.patch';
54
54
  };
55
55
  export declare const managedFileTargetsForTest: {
56
56
  target: string;
@@ -11,11 +11,11 @@ export const managedTtscPatch = {
11
11
  key: 'ttsc@0.34.1',
12
12
  path: 'patches/ttsc@0.34.1.patch',
13
13
  };
14
- /** Maintained Nx 23.2.1 repairs, applied as an ordinary Bun patchedDependency over the registry release. */
14
+ /** Maintained Nx 24.0.3 repairs, applied as an ordinary Bun patchedDependency over the registry release. */
15
15
  export const managedNxPatch = {
16
- version: '23.2.1',
17
- key: 'nx@23.2.1',
18
- path: 'patches/nx@23.2.1.patch',
16
+ version: '24.0.3',
17
+ key: 'nx@24.0.3',
18
+ path: 'patches/nx@24.0.3.patch',
19
19
  };
20
20
  const managedFiles = [
21
21
  {
@@ -1 +1 @@
1
- {"version":3,"file":"owned-installation.d.ts","sourceRoot":"","sources":["../src/owned-installation.ts"],"names":[],"mappings":"AA2fA,wHAAwH;AACxH,MAAM,WAAW,oBAAoB;IACnC,oDAAoD;IACpD,QAAQ,CAAC,WAAW,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,+FAA+F;IAC/F,QAAQ,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,oBAAoB,CAoBxF"}
1
+ {"version":3,"file":"owned-installation.d.ts","sourceRoot":"","sources":["../src/owned-installation.ts"],"names":[],"mappings":"AA6fA,wHAAwH;AACxH,MAAM,WAAW,oBAAoB;IACnC,oDAAoD;IACpD,QAAQ,CAAC,WAAW,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAC5C,+FAA+F;IAC/F,QAAQ,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,oBAAoB,CAoBxF"}
@@ -12,7 +12,7 @@ const __typia_transform__accessExpressionAsString = _accessExpressionAsString_1.
12
12
  * test reads it. A fixture must not take an input it does not own.
13
13
  *
14
14
  * So the closure is copied, exactly as the witness's own census resolves it from the workspace that names it: each
15
- * package once, with the census's own exclusions (`node_modules`, `.git`, `.nx`), each dependency edge relinked beside
15
+ * package once, without its `node_modules` and `.git`, each dependency edge relinked beside
16
16
  * its copy as Bun's isolated layout does, the top-level packages' bins in `.bin`. Every copy is a new inode, cloned
17
17
  * where the volume allows and written otherwise, so no link count is shared with anything outside its owner.
18
18
  *
@@ -365,7 +365,9 @@ function copyPackage(source, root, { place }) {
365
365
  recursive: true,
366
366
  verbatimSymlinks: true,
367
367
  mode: constants.COPYFILE_FICLONE,
368
- filter: (path) => path === source || !['node_modules', '.git', '.nx'].includes(basename(path)),
368
+ // A package's own .nx is content, not Nx state: @nx/workspace 24.0.3 ships templates under one, and the census
369
+ // selects their directories through the package's `files` (expandOutputs), so a copy without them holds less.
370
+ filter: (path) => path === source || !['node_modules', '.git'].includes(basename(path)),
369
371
  });
370
372
  }
371
373
  /** Link every resolution edge of `host` beside its copy under `root`, and the top-level packages' bins in `.bin`. */