@smoothbricks/nx-plugin 0.6.3-0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +159 -121
- package/dist/.build-inputs.json +25 -20
- package/dist/bin/smoo-nx-go-test-build.d.ts +3 -0
- package/dist/bin/smoo-nx-go-test-build.d.ts.map +1 -0
- package/dist/bin/smoo-nx-go-test-build.js +79 -0
- package/dist/bin/smoo-nx-go-test-run.d.ts +3 -0
- package/dist/bin/smoo-nx-go-test-run.d.ts.map +1 -0
- package/dist/bin/smoo-nx-go-test-run.js +129 -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 +9 -8
- package/dist/cargo-workspace.d.ts +10 -20
- package/dist/cargo-workspace.d.ts.map +1 -1
- package/dist/cargo-workspace.js +12 -22
- package/dist/cross-check-policy.d.ts +2 -2
- package/dist/cross-check-policy.js +2 -2
- package/dist/deploy-policy.d.ts +6 -0
- package/dist/deploy-policy.d.ts.map +1 -1
- package/dist/deploy-policy.js +11 -0
- package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
- package/dist/executors/bounded-exec/executor.js +49 -37
- package/dist/executors/bounded-exec/mbx-pool.d.ts +39 -10
- package/dist/executors/bounded-exec/mbx-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/mbx-pool.js +78 -24
- package/dist/executors/bounded-exec/progress.js +5 -5
- package/dist/executors/bounded-exec/runner-sizing.d.ts +40 -2
- package/dist/executors/bounded-exec/runner-sizing.d.ts.map +1 -1
- package/dist/executors/bounded-exec/runner-sizing.js +55 -4
- package/dist/executors/bounded-exec/runtime-pin.js +1 -1
- package/dist/executors/bounded-exec/verdict.d.ts +6 -0
- package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
- package/dist/executors/bounded-exec/verdict.js +6 -0
- package/dist/executors/wrangler-deploy/deploy-hash.d.ts +10 -0
- package/dist/executors/wrangler-deploy/deploy-hash.d.ts.map +1 -0
- package/dist/executors/wrangler-deploy/deploy-hash.js +14 -0
- package/dist/executors/wrangler-deploy/executor.d.ts +24 -0
- package/dist/executors/wrangler-deploy/executor.d.ts.map +1 -0
- package/dist/executors/wrangler-deploy/executor.js +43 -0
- package/dist/executors/wrangler-deploy/hasher.d.ts +27 -0
- package/dist/executors/wrangler-deploy/hasher.d.ts.map +1 -0
- package/dist/executors/wrangler-deploy/hasher.js +90 -0
- package/dist/executors/wrangler-deploy/schema.d.ts +5 -0
- package/dist/executors/wrangler-deploy/schema.d.ts.map +1 -0
- package/dist/go-tests.d.ts +30 -0
- package/dist/go-tests.d.ts.map +1 -0
- package/dist/go-tests.js +43 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +271 -230
- package/dist/managed-files/files.d.ts.map +1 -1
- package/dist/managed-files/files.js +5 -0
- package/dist/process-group.js +2 -2
- package/dist/runtime-input-policy.d.ts +3 -3
- package/dist/runtime-input-policy.js +3 -3
- package/dist/test-timings.d.ts +23 -4
- package/dist/test-timings.d.ts.map +1 -1
- package/dist/test-timings.js +72 -12
- package/dist/version-actions.cjs +10 -11
- package/dist/version-actions.d.cts.map +1 -1
- package/dist/workspace-config-policy.d.ts.map +1 -1
- package/dist/workspace-config-policy.js +17 -22
- package/dist/workspace-manifest.js +3 -3
- package/executors.json +6 -5
- package/managed/raw/patches/nx@23.2.1.patch +118 -24
- package/managed/raw/patches/ttsc@0.34.1.patch +64 -0
- package/managed/raw/tooling/direnv/developer-links.ts +121 -51
- package/managed/raw/tooling/direnv/installed-bun-links.ts +7 -6
- package/managed/raw/tooling/direnv/setup-environment.ts +14 -4
- package/managed/raw/tooling/git-hooks/pinned-revisions-served.ts +252 -0
- package/managed/raw/tooling/git-hooks/pre-push.sh +34 -32
- package/package.json +57 -7
- package/runtime/nx-publish/.build-inputs.json +11 -0
- package/runtime-input.sh +50 -23
- package/src/bin/smoo-nx-go-test-build.ts +83 -0
- package/src/bin/smoo-nx-go-test-run.ts +140 -0
- package/src/bounded-test-policy.ts +9 -8
- package/src/cargo-workspace.ts +12 -24
- package/src/cross-check-policy.ts +2 -2
- package/src/deploy-policy.ts +11 -0
- package/src/executors/bounded-exec/executor.ts +61 -42
- package/src/executors/bounded-exec/mbx-pool.ts +97 -33
- package/src/executors/bounded-exec/progress.ts +5 -5
- package/src/executors/bounded-exec/runner-sizing.ts +73 -7
- package/src/executors/bounded-exec/runtime-pin.ts +1 -1
- package/src/executors/bounded-exec/verdict.ts +7 -0
- package/src/executors/wrangler-deploy/deploy-hash.ts +15 -0
- package/src/executors/wrangler-deploy/executor.ts +63 -0
- package/src/executors/wrangler-deploy/hasher.ts +111 -0
- package/src/executors/wrangler-deploy/schema.json +16 -0
- package/src/executors/wrangler-deploy/schema.ts +4 -0
- package/src/go-tests.ts +67 -0
- package/src/index.ts +294 -253
- package/src/managed-files/files.ts +5 -0
- package/src/process-group.ts +2 -2
- package/src/runtime-input-policy.ts +3 -3
- package/src/test-timings.ts +72 -14
- package/src/version-actions.cts +10 -11
- package/src/workspace-config-policy.ts +20 -29
- package/src/workspace-manifest.ts +3 -3
- package/test-timings.json +131 -130
- package/dist/executors/clean-outputs/executor.d.ts +0 -26
- package/dist/executors/clean-outputs/executor.d.ts.map +0 -1
- package/dist/executors/clean-outputs/executor.js +0 -83
- package/dist/executors/clean-outputs/schema.d.ts +0 -4
- package/dist/executors/clean-outputs/schema.d.ts.map +0 -1
- package/src/executors/clean-outputs/executor.ts +0 -131
- package/src/executors/clean-outputs/schema.json +0 -15
- package/src/executors/clean-outputs/schema.ts +0 -3
- /package/dist/executors/{clean-outputs → wrangler-deploy}/schema.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/managed-files/files.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,aAAa,EACb,6BAA6B,EAC7B,uBAAuB,EACvB,wBAAwB,EACxB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M7E;AAED,+GAA+G;AAC/G,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,aAAa,GAAG,kBAAkB,GAAG,6BAA6B,GAAG,yBAAyB,EACtG,OAAO,EAAE,kBAAkB,GAC1B,MAAM,CAMR"}
|
|
@@ -147,6 +147,11 @@ const managedFiles = [
|
|
|
147
147
|
target: 'tooling/git-hooks/pre-push.sh',
|
|
148
148
|
executable: true,
|
|
149
149
|
},
|
|
150
|
+
{
|
|
151
|
+
kind: 'raw',
|
|
152
|
+
source: 'tooling/git-hooks/pinned-revisions-served.ts',
|
|
153
|
+
target: 'tooling/git-hooks/pinned-revisions-served.ts',
|
|
154
|
+
},
|
|
150
155
|
{
|
|
151
156
|
kind: 'raw',
|
|
152
157
|
source: 'tooling/git-reword-commit',
|
package/dist/process-group.js
CHANGED
|
@@ -137,8 +137,8 @@ export function killProcessGroupNow(pgid, patience) {
|
|
|
137
137
|
* Waits `ms` of host time without blocking this thread, so that the event loop serves everything else meanwhile and
|
|
138
138
|
* reaps the group's leader. Two waits, and whichever ends first ends the pause: a timer, which keeps the process alive
|
|
139
139
|
* while it waits, and `Atomics.waitAsync`, which does not (a process with nothing else pending exits under it, as
|
|
140
|
-
* measured on Node 26 and Bun 1.4.3) but is not a timer. A timer alone is its caller's clock, and a test
|
|
141
|
-
* clock stops it for good, while what a kill waits for is the kernel.
|
|
140
|
+
* measured on Node 26 and Bun 1.4.3 and 1.4.4) but is not a timer. A timer alone is its caller's clock, and a test
|
|
141
|
+
* that fakes the clock stops it for good, while what a kill waits for is the kernel.
|
|
142
142
|
*/
|
|
143
143
|
function pause(ms) {
|
|
144
144
|
return new Promise((resolve) => {
|
|
@@ -65,9 +65,9 @@ export declare function hostProgramReason(host: HostProgram): string;
|
|
|
65
65
|
export declare const RUNTIME_INPUT_FAILURES = ".runtime-input-failures";
|
|
66
66
|
/**
|
|
67
67
|
* The report of every failure runtime-input.sh retained under `root` at or after `sinceMs`, oldest first, each headed
|
|
68
|
-
* by its path. Nx
|
|
69
|
-
* drops the input's stderr, so a headless run prints these after Nx fails: they name the command,
|
|
70
|
-
* its stderr. A record without a report (its evidence could not be written) is named as such.
|
|
68
|
+
* by its path. Nx names a failed runtime input's tasks and their runtime inputs (`Could not hash …`), not which one
|
|
69
|
+
* failed or why, and drops the input's stderr, so a headless run prints these after Nx fails: they name the command,
|
|
70
|
+
* its exit status and its stderr. A record without a report (its evidence could not be written) is named as such.
|
|
71
71
|
*/
|
|
72
72
|
export declare function runtimeInputFailureReports(root: string, sinceMs: number): string[];
|
|
73
73
|
export {};
|
|
@@ -360,9 +360,9 @@ function absentAsUndefined(read) {
|
|
|
360
360
|
}
|
|
361
361
|
/**
|
|
362
362
|
* The report of every failure runtime-input.sh retained under `root` at or after `sinceMs`, oldest first, each headed
|
|
363
|
-
* by its path. Nx
|
|
364
|
-
* drops the input's stderr, so a headless run prints these after Nx fails: they name the command,
|
|
365
|
-
* its stderr. A record without a report (its evidence could not be written) is named as such.
|
|
363
|
+
* by its path. Nx names a failed runtime input's tasks and their runtime inputs (`Could not hash …`), not which one
|
|
364
|
+
* failed or why, and drops the input's stderr, so a headless run prints these after Nx fails: they name the command,
|
|
365
|
+
* its exit status and its stderr. A record without a report (its evidence could not be written) is named as such.
|
|
366
366
|
*/
|
|
367
367
|
export function runtimeInputFailureReports(root, sinceMs) {
|
|
368
368
|
const directory = join(root, RUNTIME_INPUT_FAILURES);
|
package/dist/test-timings.d.ts
CHANGED
|
@@ -57,12 +57,31 @@ export interface TimingManifest {
|
|
|
57
57
|
* Bun's test discovery for `args` in `cwd`, replayed without running a test: files named `*.test.*`, `*_test.*`,
|
|
58
58
|
* `*.spec.*` or `*_spec.*` with a JavaScript extension, in any letter case, under bunfig's `test.root`, outside
|
|
59
59
|
* `node_modules` and hidden directories. A symlink counts as its target, a directory entered and a file matched, and a
|
|
60
|
-
* link to nothing
|
|
61
|
-
* the cwd-relative path as written and replace bunfig's
|
|
62
|
-
* bunfig; `.gitignore` plays no part. These are the rules
|
|
63
|
-
* files `bun test --update-timings` writes for a fixture,
|
|
60
|
+
* link to nothing is skipped; any other link it cannot resolve refuses the replay. The link's own name is the one the
|
|
61
|
+
* name rules see. `--path-ignore-patterns` globs match the cwd-relative path as written and replace bunfig's
|
|
62
|
+
* `pathIgnorePatterns` when given; `--config=` names another bunfig; `.gitignore` plays no part. These are the rules
|
|
63
|
+
* of Bun 1.4.4: `test-timings.test.ts` compares them with the files `bun test --update-timings` writes for a fixture,
|
|
64
|
+
* so a Bun release that changes them fails there.
|
|
64
65
|
*/
|
|
65
66
|
export declare function timingsCoverage(workspaceRoot: string, suite: Pick<TimingsShardedSuite, 'cwd' | 'args'>): Promise<TimingsCoverageResult>;
|
|
67
|
+
/**
|
|
68
|
+
* What the shard-timings check reads, as Nx inputs: its timing manifests and its bunfig as files, and the names Bun's
|
|
69
|
+
* discovery would find as {@link bunTestFileNamesInput}. Files alone cannot key the last: discovery finds gitignored
|
|
70
|
+
* files too, and Nx hashes no ignored file.
|
|
71
|
+
*/
|
|
72
|
+
export declare function timingsSuiteInputs(suite: Pick<TimingsShardedSuite, 'cwd' | 'args'>): (string | {
|
|
73
|
+
runtime: string;
|
|
74
|
+
})[];
|
|
75
|
+
/**
|
|
76
|
+
* The names of the files under `cwd` (workspace-relative) Bun's discovery could run, sorted, as a runtime input. It is a
|
|
77
|
+
* superset of {@link timingsCoverage}'s rules (any extension, the whole tree whatever bunfig's `test.root`, no ignore
|
|
78
|
+
* glob), so every file discovery would find changes the value, and a name discovery skips costs at most a cache miss.
|
|
79
|
+
* Like Bun, it skips `node_modules` and hidden directories, follows symlinks (each directory once, by its real path),
|
|
80
|
+
* skips a link to nothing, and reads no `.gitignore`. It walks with Bun, which every workspace declares.
|
|
81
|
+
*/
|
|
82
|
+
export declare function bunTestFileNamesInput(cwd: string): {
|
|
83
|
+
runtime: string;
|
|
84
|
+
};
|
|
66
85
|
/**
|
|
67
86
|
* The failure an untimed file earns: every such file, and the one command that refreshes the manifest. `cwd` is the
|
|
68
87
|
* suite's workspace-relative directory, so the operator can find the files from the repository root.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-timings.d.ts","sourceRoot":"","sources":["../src/test-timings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-timings.d.ts","sourceRoot":"","sources":["../src/test-timings.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,kBAAkB,CAAC;AACpD,eAAO,MAAM,sBAAsB,0CAA0C,CAAC;AAE9E,iHAAiH;AACjH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAErE;AAED,6EAA6E;AAC7E,MAAM,WAAW,mBAAmB;IAClC,wDAAwD;IACxD,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,mGAAmG;IACnG,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED,MAAM,MAAM,yBAAyB,GACjC;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI,CAAA;CAAE,GACjE;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAInD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACzC,yBAAyB,CAsB3B;AAoFD,wHAAwH;AACxH,MAAM,WAAW,eAAe;IAC9B,wHAAwH;IACxH,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,8CAA8C;IAC9C,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IAClC,kEAAkE;IAClE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAA;CAAE,GACzD;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,wFAAwF;AACxF,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAaD;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CACnC,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,KAAK,GAAG,MAAM,CAAC,GAC/C,OAAO,CAAC,qBAAqB,CAAC,CA6BhC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,CAOrH;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAEtE;AAqBD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,GAAG,MAAM,CAQ1G"}
|
package/dist/test-timings.js
CHANGED
|
@@ -6,7 +6,7 @@ import { readdir, readFile, stat } from 'node:fs/promises';
|
|
|
6
6
|
import { join, posix } from 'node:path';
|
|
7
7
|
import { parse as parseToml } from 'smol-toml';
|
|
8
8
|
import typia from 'typia';
|
|
9
|
-
import { shellWord } from './runtime-input.js';
|
|
9
|
+
import { runtimeInput, shellWord } from './runtime-input.js';
|
|
10
10
|
import { isRecord } from './type-guards.js';
|
|
11
11
|
/**
|
|
12
12
|
* The check inferred beside a Bun suite that `--shard=N/M` targets split and a `--timings` manifest balances. Bun
|
|
@@ -276,10 +276,11 @@ const validateBunfigDiscovery = (() => {
|
|
|
276
276
|
* Bun's test discovery for `args` in `cwd`, replayed without running a test: files named `*.test.*`, `*_test.*`,
|
|
277
277
|
* `*.spec.*` or `*_spec.*` with a JavaScript extension, in any letter case, under bunfig's `test.root`, outside
|
|
278
278
|
* `node_modules` and hidden directories. A symlink counts as its target, a directory entered and a file matched, and a
|
|
279
|
-
* link to nothing
|
|
280
|
-
* the cwd-relative path as written and replace bunfig's
|
|
281
|
-
* bunfig; `.gitignore` plays no part. These are the rules
|
|
282
|
-
* files `bun test --update-timings` writes for a fixture,
|
|
279
|
+
* link to nothing is skipped; any other link it cannot resolve refuses the replay. The link's own name is the one the
|
|
280
|
+
* name rules see. `--path-ignore-patterns` globs match the cwd-relative path as written and replace bunfig's
|
|
281
|
+
* `pathIgnorePatterns` when given; `--config=` names another bunfig; `.gitignore` plays no part. These are the rules
|
|
282
|
+
* of Bun 1.4.4: `test-timings.test.ts` compares them with the files `bun test --update-timings` writes for a fixture,
|
|
283
|
+
* so a Bun release that changes them fails there.
|
|
283
284
|
*/
|
|
284
285
|
export async function timingsCoverage(workspaceRoot, suite) {
|
|
285
286
|
const cwd = join(workspaceRoot, suite.cwd);
|
|
@@ -296,7 +297,14 @@ export async function timingsCoverage(workspaceRoot, suite) {
|
|
|
296
297
|
const ignores = cliIgnores.length > 0 ? cliIgnores : typeof bunfigIgnores === 'string' ? [bunfigIgnores] : bunfigIgnores;
|
|
297
298
|
const root = posix.normalize(bunfig.test?.root ?? '.');
|
|
298
299
|
const files = [];
|
|
299
|
-
|
|
300
|
+
try {
|
|
301
|
+
await collectTestFiles(cwd, root === '.' ? '' : root.replace(/\/$/, ''), ignores, files);
|
|
302
|
+
}
|
|
303
|
+
catch (error) {
|
|
304
|
+
if (!(error instanceof Error && 'code' in error))
|
|
305
|
+
throw error;
|
|
306
|
+
return { ok: false, error: `cannot replay Bun's discovery under ${posix.join(suite.cwd, root)}: ${error.message}` };
|
|
307
|
+
}
|
|
300
308
|
files.sort();
|
|
301
309
|
const timed = new Set();
|
|
302
310
|
for (const manifest of manifests) {
|
|
@@ -308,6 +316,47 @@ export async function timingsCoverage(workspaceRoot, suite) {
|
|
|
308
316
|
}
|
|
309
317
|
return { ok: true, coverage: { manifests, files, untimed: files.filter((file) => !timed.has(file)) } };
|
|
310
318
|
}
|
|
319
|
+
/**
|
|
320
|
+
* What the shard-timings check reads, as Nx inputs: its timing manifests and its bunfig as files, and the names Bun's
|
|
321
|
+
* discovery would find as {@link bunTestFileNamesInput}. Files alone cannot key the last: discovery finds gitignored
|
|
322
|
+
* files too, and Nx hashes no ignored file.
|
|
323
|
+
*/
|
|
324
|
+
export function timingsSuiteInputs(suite) {
|
|
325
|
+
const inCwd = (file) => `{workspaceRoot}/${posix.join(suite.cwd, file)}`;
|
|
326
|
+
return [
|
|
327
|
+
...flagValues(suite.args, '--timings').map(inCwd),
|
|
328
|
+
inCwd(flagValues(suite.args, '--config').at(-1) ?? 'bunfig.toml'),
|
|
329
|
+
bunTestFileNamesInput(suite.cwd),
|
|
330
|
+
];
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* The names of the files under `cwd` (workspace-relative) Bun's discovery could run, sorted, as a runtime input. It is a
|
|
334
|
+
* superset of {@link timingsCoverage}'s rules (any extension, the whole tree whatever bunfig's `test.root`, no ignore
|
|
335
|
+
* glob), so every file discovery would find changes the value, and a name discovery skips costs at most a cache miss.
|
|
336
|
+
* Like Bun, it skips `node_modules` and hidden directories, follows symlinks (each directory once, by its real path),
|
|
337
|
+
* skips a link to nothing, and reads no `.gitignore`. It walks with Bun, which every workspace declares.
|
|
338
|
+
*/
|
|
339
|
+
export function bunTestFileNamesInput(cwd) {
|
|
340
|
+
return runtimeInput(`bun -e ${shellWord(LIST_TEST_FILE_NAMES)} ${shellWord(cwd)}`);
|
|
341
|
+
}
|
|
342
|
+
const LIST_TEST_FILE_NAMES = [
|
|
343
|
+
'const { readdirSync, realpathSync, statSync } = require("node:fs");',
|
|
344
|
+
'const names = []; const seen = new Set();',
|
|
345
|
+
'const walk = (dir) => {',
|
|
346
|
+
' const real = realpathSync(dir); if (seen.has(real)) return; seen.add(real);',
|
|
347
|
+
' for (const entry of readdirSync(dir, { withFileTypes: true })) {',
|
|
348
|
+
' const path = dir === "." ? entry.name : dir + "/" + entry.name; const name = entry.name.toLowerCase();',
|
|
349
|
+
' let directory = entry.isDirectory();',
|
|
350
|
+
' if (entry.isSymbolicLink()) {',
|
|
351
|
+
' try { directory = statSync(path).isDirectory(); }',
|
|
352
|
+
' catch (error) { if (error?.code !== "ENOENT") throw error; continue; }',
|
|
353
|
+
' }',
|
|
354
|
+
' if (directory) { if (!name.startsWith(".") && name !== "node_modules") walk(path); }',
|
|
355
|
+
' else if (/[._](test|spec)[.]/.test(name)) names.push(path);',
|
|
356
|
+
' }',
|
|
357
|
+
'};',
|
|
358
|
+
'process.chdir(process.argv[1]); walk("."); names.sort(); for (const name of names) console.log(name);',
|
|
359
|
+
].join(' ');
|
|
311
360
|
/**
|
|
312
361
|
* The failure an untimed file earns: every such file, and the one command that refreshes the manifest. `cwd` is the
|
|
313
362
|
* suite's workspace-relative directory, so the operator can find the files from the repository root.
|
|
@@ -327,16 +376,16 @@ async function collectTestFiles(cwd, dir, ignores, files) {
|
|
|
327
376
|
const path = dir === '' ? entry.name : `${dir}/${entry.name}`;
|
|
328
377
|
// Bun matches every name in lower case, and its ignore globs see the path as written.
|
|
329
378
|
const name = entry.name.toLowerCase();
|
|
330
|
-
// Bun follows a symlink to what it points at and
|
|
331
|
-
const resolved = entry.isSymbolicLink() ? await
|
|
332
|
-
if (resolved
|
|
379
|
+
// Bun follows a symlink to what it points at and skips one that points at nothing.
|
|
380
|
+
const resolved = entry.isSymbolicLink() ? await statUnlessMissing(join(cwd, path)) : entry;
|
|
381
|
+
if (resolved === null)
|
|
382
|
+
continue;
|
|
383
|
+
if (resolved.isDirectory()) {
|
|
333
384
|
if (!name.startsWith('.') && name !== 'node_modules') {
|
|
334
385
|
await collectTestFiles(cwd, path, ignores, files);
|
|
335
386
|
}
|
|
336
387
|
}
|
|
337
|
-
else if ((
|
|
338
|
-
TEST_FILE.test(name) &&
|
|
339
|
-
!ignores.some((glob) => posix.matchesGlob(path, glob))) {
|
|
388
|
+
else if (resolved.isFile() && TEST_FILE.test(name) && !ignores.some((glob) => posix.matchesGlob(path, glob))) {
|
|
340
389
|
files.push(path);
|
|
341
390
|
}
|
|
342
391
|
}
|
|
@@ -378,6 +427,17 @@ async function readTimingManifest(path) {
|
|
|
378
427
|
}
|
|
379
428
|
return { ok: true, files: validated.data.files };
|
|
380
429
|
}
|
|
430
|
+
/** What a symlink at `path` leads to, or null when it leads nowhere; any other failure to resolve it is thrown. */
|
|
431
|
+
async function statUnlessMissing(path) {
|
|
432
|
+
try {
|
|
433
|
+
return await stat(path);
|
|
434
|
+
}
|
|
435
|
+
catch (error) {
|
|
436
|
+
if (error instanceof Error && 'code' in error && error.code === 'ENOENT')
|
|
437
|
+
return null;
|
|
438
|
+
throw error;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
381
441
|
async function readOptionalFile(path) {
|
|
382
442
|
try {
|
|
383
443
|
return await readFile(path, 'utf-8');
|
package/dist/version-actions.cjs
CHANGED
|
@@ -9,19 +9,18 @@ const baseVersionActions = nxJsVersionActions.default ?? nxJsVersionActions;
|
|
|
9
9
|
const PUBLISHED_DEPENDENCY_FIELDS = ['dependencies', 'peerDependencies', 'optionalDependencies'];
|
|
10
10
|
const afterAllProjectsVersioned = async (cwd, options) => {
|
|
11
11
|
const result = await nxJsVersionActions.afterAllProjectsVersioned(cwd, options);
|
|
12
|
-
// Temporary Bun workaround. Delete this hook together with the CLI lockfile
|
|
13
|
-
// sync/validation code once supported Bun versions fix all three issues:
|
|
14
|
-
// - https://github.com/oven-sh/bun/issues/18906
|
|
15
|
-
// - https://github.com/oven-sh/bun/issues/20477
|
|
16
|
-
// - https://github.com/oven-sh/bun/issues/20829
|
|
17
|
-
//
|
|
18
12
|
// After ANY version bump (release or prepare-next), bun.lock workspace versions
|
|
19
|
-
// must match package.json exactly
|
|
20
|
-
//
|
|
13
|
+
// must match package.json exactly, unpublished -next included, and
|
|
14
|
+
// `smoo monorepo validate` refuses a lock that does not. The Bun bugs this hook
|
|
15
|
+
// began as a workaround for are closed (oven-sh/bun#18906, #20477, #20829):
|
|
16
|
+
// measured on Bun 1.4.4, `bun install --lockfile-only`, the lock update Nx runs
|
|
17
|
+
// after versioning, writes a bumped package.json version into bun.lock. But
|
|
18
|
+
// `bun install --frozen-lockfile` still accepts an entry the manifest moved
|
|
19
|
+
// past, so the release commit's lock is made exact here whatever ran before.
|
|
21
20
|
//
|
|
22
|
-
// Publish-time
|
|
23
|
-
// `smoo release publish
|
|
24
|
-
//
|
|
21
|
+
// Publish-time pins (-next → last stable tag) go only into the packed manifest
|
|
22
|
+
// of `smoo release publish`, never into bun.lock. Rewriting the lock that way
|
|
23
|
+
// on prepare-next is what left it at 0.x.y while package.json said
|
|
25
24
|
// 0.x.y-next.0 and blew up monorepo validate / packed-package-manifest.
|
|
26
25
|
const updated = syncBunLockfileVersionsToPackageJson(cwd);
|
|
27
26
|
if (updated === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-actions.d.cts","sourceRoot":"","sources":["../src/version-actions.cts"],"names":[],"mappings":"AAEA,OAAO,KAAK,gBAAgB,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,EAAgB,sBAAsB,EAA2B,MAAM,6BAA6B,CAAC;AAMjH,KAAK,qBAAqB,GAAG,OAAO,gBAAgB,GAAG;IACrD,yBAAyB,EAAE,yBAAyB,CAAC;CACtD,CAAC;AAEF,4EAA4E;AAC5E,KAAK,+BAA+B,GAAG,qBAAqB,GAAG;IAC7D,qBAAqB,CACnB,YAAY,EAAE,SAAS,sBAAsB,EAAE,EAC/C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GACpD,sBAAsB,EAAE,CAAC;CAC7B,CAAC;
|
|
1
|
+
{"version":3,"file":"version-actions.d.cts","sourceRoot":"","sources":["../src/version-actions.cts"],"names":[],"mappings":"AAEA,OAAO,KAAK,gBAAgB,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,KAAK,EAAgB,sBAAsB,EAA2B,MAAM,6BAA6B,CAAC;AAMjH,KAAK,qBAAqB,GAAG,OAAO,gBAAgB,GAAG;IACrD,yBAAyB,EAAE,yBAAyB,CAAC;CACtD,CAAC;AAEF,4EAA4E;AAC5E,KAAK,+BAA+B,GAAG,qBAAqB,GAAG;IAC7D,qBAAqB,CACnB,YAAY,EAAE,SAAS,sBAAsB,EAAE,EAC/C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GACpD,sBAAsB,EAAE,CAAC;CAC7B,CAAC;AAuGF,QAAA,MAAM,cAAc,EAAE,+BAA4D,CAAC;SAE1E,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-config-policy.d.ts","sourceRoot":"","sources":["../src/workspace-config-policy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAQrD,eAAO,MAAM,4BAA4B,0CAA0C,CAAC;AAGpF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,yBAAyB,YACpC,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,WAAW,EACX,UAAU,EACV,QAAQ,EACR,OAAO,EACP,QAAQ,CACA,CAAC;AAEX,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAI/B;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAI/D;AAQD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE5D;
|
|
1
|
+
{"version":3,"file":"workspace-config-policy.d.ts","sourceRoot":"","sources":["../src/workspace-config-policy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAQrD,eAAO,MAAM,4BAA4B,0CAA0C,CAAC;AAGpF,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,yBAAyB,YACpC,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,WAAW,EACX,UAAU,EACV,QAAQ,EACR,OAAO,EACP,QAAQ,CACA,CAAC;AAEX,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAI/B;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAI/D;AAQD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE5D;AA2BD;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,cAAc,CAAC;AAEvD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,aAAa,EAAE,CA+ErF;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAyB7E;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,GAAG,aAAa,EAAE,CAKpE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAQ5D;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CAYxE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAWhE"}
|
|
@@ -140,7 +140,11 @@ export function isTestRunnerTargetName(name) {
|
|
|
140
140
|
}
|
|
141
141
|
const nxJsTypescriptPlugin = '@nx/js/typescript';
|
|
142
142
|
const smoothBricksNxPlugin = '@smoothbricks/nx-plugin';
|
|
143
|
-
|
|
143
|
+
/**
|
|
144
|
+
* The executor of the retired `clean` target, which deleted declared outputs file by file. Build state is removed whole
|
|
145
|
+
* instead (cowshed rm, mbx gc), so a `targetDefaults.clean` naming it is refused and removed.
|
|
146
|
+
*/
|
|
147
|
+
const retiredCleanOutputsExecutor = '@smoothbricks/nx-plugin:clean-outputs';
|
|
144
148
|
const ciWorkflowNamedInput = ['{workspaceRoot}/.github/workflows/ci.yml'];
|
|
145
149
|
const inferredTestTypecheckTarget = 'typecheck-tests';
|
|
146
150
|
/**
|
|
@@ -189,6 +193,12 @@ export function checkWorkspaceConfig(nxJson) {
|
|
|
189
193
|
'Per-project inference selects current library or build outputs before test typechecking.',
|
|
190
194
|
});
|
|
191
195
|
}
|
|
196
|
+
if (isRetiredCleanTargetDefault(targetDefaults, targetName)) {
|
|
197
|
+
issues.push({
|
|
198
|
+
path: 'nx.json',
|
|
199
|
+
message: `targetDefaults.clean names the retired ${retiredCleanOutputsExecutor}; run smoo monorepo update to remove it`,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
192
202
|
}
|
|
193
203
|
}
|
|
194
204
|
// Build target default
|
|
@@ -196,8 +206,6 @@ export function checkWorkspaceConfig(nxJson) {
|
|
|
196
206
|
// Test target default: dependsOn is inferred per project (cargo-test vs ^build/build)
|
|
197
207
|
validateTestTargetDefault(nxJson, 'nx.json', issues);
|
|
198
208
|
validateLintTargetDefault(nxJson, 'nx.json', issues);
|
|
199
|
-
// Clean target default
|
|
200
|
-
validateCleanTargetDefault(nxJson, 'nx.json', issues);
|
|
201
209
|
// Named input defaults
|
|
202
210
|
validateNamedInputDefaults(nxJson, 'nx.json', issues);
|
|
203
211
|
if (nxJson.cacheDirectory !== CHECKOUT_NX_CACHE_DIRECTORY) {
|
|
@@ -243,7 +251,6 @@ export function applyWorkspaceConfig(nxJson) {
|
|
|
243
251
|
changed = applyBuildTargetDefault(nxJson) || changed;
|
|
244
252
|
changed = applyTestTargetDefault(nxJson) || changed;
|
|
245
253
|
changed = applyLintTargetDefault(nxJson) || changed;
|
|
246
|
-
changed = applyCleanTargetDefault(nxJson) || changed;
|
|
247
254
|
changed = applyNamedInputDefaults(nxJson) || changed;
|
|
248
255
|
const plugins = validatePlugins(nxJson.plugins === undefined ? [] : nxJson.plugins);
|
|
249
256
|
if (plugins.success) {
|
|
@@ -353,16 +360,6 @@ function validateBuildTargetDefault(nxJson, nxJsonPath, issues) {
|
|
|
353
360
|
}
|
|
354
361
|
}
|
|
355
362
|
}
|
|
356
|
-
function validateCleanTargetDefault(nxJson, nxJsonPath, issues) {
|
|
357
|
-
const targetDefaults = recordProperty(nxJson, 'targetDefaults');
|
|
358
|
-
const clean = targetDefaults ? recordProperty(targetDefaults, 'clean') : null;
|
|
359
|
-
if (!clean || clean.executor !== cleanOutputsExecutor) {
|
|
360
|
-
issues.push({ path: nxJsonPath, message: `targetDefaults.clean.executor must be ${cleanOutputsExecutor}` });
|
|
361
|
-
}
|
|
362
|
-
if (clean?.cache !== false) {
|
|
363
|
-
issues.push({ path: nxJsonPath, message: 'targetDefaults.clean.cache must be false' });
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
363
|
function validateNamedInputDefaults(nxJson, nxJsonPath, issues) {
|
|
367
364
|
const namedInputs = recordProperty(nxJson, 'namedInputs');
|
|
368
365
|
if (!namedInputs) {
|
|
@@ -483,13 +480,6 @@ function applyLintTargetDefault(nxJson) {
|
|
|
483
480
|
}
|
|
484
481
|
return changed;
|
|
485
482
|
}
|
|
486
|
-
function applyCleanTargetDefault(nxJson) {
|
|
487
|
-
const targetDefaults = getOrCreateRecord(nxJson, 'targetDefaults');
|
|
488
|
-
const clean = getOrCreateRecord(targetDefaults, 'clean');
|
|
489
|
-
let changed = setStringProperty(clean, 'executor', cleanOutputsExecutor);
|
|
490
|
-
changed = setBooleanProperty(clean, 'cache', false) || changed;
|
|
491
|
-
return changed;
|
|
492
|
-
}
|
|
493
483
|
function applyNamedInputDefaults(nxJson) {
|
|
494
484
|
const namedInputs = getOrCreateRecord(nxJson, 'namedInputs');
|
|
495
485
|
let changed = false;
|
|
@@ -528,13 +518,18 @@ function removeDisallowedTargetDefaults(nxJson) {
|
|
|
528
518
|
}
|
|
529
519
|
let changed = false;
|
|
530
520
|
for (const targetName of Object.keys(targetDefaults)) {
|
|
531
|
-
if (targetName.includes(':') ||
|
|
521
|
+
if (targetName.includes(':') ||
|
|
522
|
+
targetName === inferredTestTypecheckTarget ||
|
|
523
|
+
isRetiredCleanTargetDefault(targetDefaults, targetName)) {
|
|
532
524
|
delete targetDefaults[targetName];
|
|
533
525
|
changed = true;
|
|
534
526
|
}
|
|
535
527
|
}
|
|
536
528
|
return changed;
|
|
537
529
|
}
|
|
530
|
+
function isRetiredCleanTargetDefault(targetDefaults, targetName) {
|
|
531
|
+
return targetName === 'clean' && recordProperty(targetDefaults, 'clean')?.executor === retiredCleanOutputsExecutor;
|
|
532
|
+
}
|
|
538
533
|
function isPreciseProductionNamedInput(production) {
|
|
539
534
|
let hasPositiveProjectInput = false;
|
|
540
535
|
for (const input of production) {
|
|
@@ -28,9 +28,9 @@ export function catalogName(value) {
|
|
|
28
28
|
/**
|
|
29
29
|
* Where Bun reads a root manifest's catalogs: from the object form of `workspaces` once it holds `catalog` or
|
|
30
30
|
* `catalogs`, and then from nowhere else; otherwise from the manifest's own top-level `catalog` and `catalogs`.
|
|
31
|
-
* Measured with `bun install` 1.4.3: beside a `workspaces.catalog`, a top-level `catalog` entry is not in
|
|
32
|
-
* and a top-level `catalogs` name is "no catalog named"; beside a `workspaces` object without either, the
|
|
33
|
-
* resolves.
|
|
31
|
+
* Measured with `bun install` 1.4.3 and 1.4.4: beside a `workspaces.catalog`, a top-level `catalog` entry is not in
|
|
32
|
+
* the catalog and a top-level `catalogs` name is "no catalog named"; beside a `workspaces` object without either, the
|
|
33
|
+
* top level resolves.
|
|
34
34
|
*/
|
|
35
35
|
function catalogHolder(root) {
|
|
36
36
|
const workspaces = root.workspaces;
|
package/executors.json
CHANGED
|
@@ -25,11 +25,6 @@
|
|
|
25
25
|
"schema": "./src/executors/scriptc-native/schema.json",
|
|
26
26
|
"description": "Compile each package bin from the package's transformed JavaScript to one platform's executable with scriptc and zig"
|
|
27
27
|
},
|
|
28
|
-
"clean-outputs": {
|
|
29
|
-
"implementation": "./dist/executors/clean-outputs/executor.js",
|
|
30
|
-
"schema": "./src/executors/clean-outputs/schema.json",
|
|
31
|
-
"description": "Remove declared build output directories unless they contain tracked files"
|
|
32
|
-
},
|
|
33
28
|
"cargo-zigbuild": {
|
|
34
29
|
"implementation": "./dist/executors/cargo-zigbuild/executor.js",
|
|
35
30
|
"schema": "./src/executors/cargo-zigbuild/schema.json",
|
|
@@ -44,6 +39,12 @@
|
|
|
44
39
|
"implementation": "./dist/executors/all-verdicts/executor.js",
|
|
45
40
|
"schema": "./src/executors/all-verdicts/schema.json",
|
|
46
41
|
"description": "Run every command at once to its own verdict and report each one a signal ended or that never ran as UNJUDGED; resolve an ESLint sources placeholder against the files that exist when the command runs"
|
|
42
|
+
},
|
|
43
|
+
"wrangler-deploy": {
|
|
44
|
+
"implementation": "./dist/executors/wrangler-deploy/executor.js",
|
|
45
|
+
"hasher": "./dist/executors/wrangler-deploy/hasher.js",
|
|
46
|
+
"schema": "./src/executors/wrangler-deploy/schema.json",
|
|
47
|
+
"description": "Deploy a stage with smoo wrangler deploy-stage, cached on the artifact and the stage while the stage serves that artifact's version"
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
}
|