@smoothbricks/nx-plugin 0.5.1 → 0.5.3
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 +74 -13
- package/dist/bin/smoo-nx-test-clocks.js +2 -2
- package/dist/bin/smoo-nx-test-walks.js +6 -9
- package/dist/cargo-closure-input.d.ts.map +1 -1
- package/dist/cargo-closure-input.js +25 -15
- package/dist/cargo-source-hash.d.ts +2 -2
- package/dist/cargo-source-hash.d.ts.map +1 -1
- package/dist/cargo-source-hash.js +106 -46
- package/dist/ensure-built-witness.d.ts +33 -5
- package/dist/ensure-built-witness.d.ts.map +1 -1
- package/dist/ensure-built-witness.js +84 -18
- package/dist/ensure-built.d.ts.map +1 -1
- package/dist/ensure-built.js +19 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/owned-installation.d.ts +6 -5
- package/dist/owned-installation.d.ts.map +1 -1
- package/dist/owned-installation.js +324 -201
- package/dist/test-walk-policy.d.ts +8 -0
- package/dist/test-walk-policy.d.ts.map +1 -1
- package/dist/test-walk-policy.js +34 -0
- package/dist/workspace-manifest.d.ts +5 -5
- package/dist/workspace-manifest.d.ts.map +1 -1
- package/managed/raw/patches/nx@23.2.1.patch +196 -48
- package/managed/raw/tooling/direnv/developer-links.ts +37 -10
- package/managed/raw/tooling/direnv/linked-snapshots.ts +31 -4
- package/managed/raw/tooling/direnv/setup-environment.ts +2 -0
- package/managed/raw/tooling/git-hooks/pre-push.sh +34 -11
- package/package.json +3 -3
- package/runtime-input.sh +21 -9
- package/src/__tests__/cargo-closure-filesets.ts +94 -0
- package/src/__tests__/owned-installation.ts +5 -6
- package/src/bin/smoo-nx-test-clocks.ts +2 -2
- package/src/bin/smoo-nx-test-walks.ts +6 -9
- package/src/cargo-closure-filesets.test.ts +63 -0
- package/src/cargo-closure-input.test.ts +1 -1
- package/src/cargo-closure-input.ts +23 -15
- package/src/cargo-closure-key.test.ts +1 -1
- package/src/cargo-resolve-cache.test.ts +1 -1
- package/src/cargo-source-hash.test.ts +143 -2
- package/src/cargo-source-hash.ts +108 -44
- package/src/cross-check-policy.test.ts +53 -12
- package/src/ensure-built-witness.test.ts +53 -2
- package/src/ensure-built-witness.ts +103 -18
- package/src/ensure-built.test.ts +40 -5
- package/src/ensure-built.ts +28 -6
- package/src/index.ts +4 -0
- package/src/linked-snapshots.nx.test.ts +1 -1
- package/src/nextest-partitions.test.ts +1 -1
- package/src/nx-daemon-start-never.test.ts +126 -0
- package/src/nx-daemon-validity.test.ts +51 -0
- package/src/nx-task-output-lease.test.ts +136 -0
- package/src/owned-installation.test.ts +105 -0
- package/src/owned-installation.ts +335 -93
- package/src/runtime-input.test.ts +22 -1
- package/src/task-results.test.ts +1 -1
- package/src/test-walk-policy.test.ts +35 -0
- package/src/test-walk-policy.ts +32 -0
- package/src/workspace-manifest.ts +5 -5
- package/test-timings.json +95 -92
|
@@ -2,7 +2,7 @@ import * as _assertGuard_1 from "typia/lib/internal/_assertGuard";
|
|
|
2
2
|
import * as _accessExpressionAsString_1 from "typia/lib/internal/_accessExpressionAsString";
|
|
3
3
|
const __typia_transform__accessExpressionAsString = _accessExpressionAsString_1._accessExpressionAsString;
|
|
4
4
|
/**
|
|
5
|
-
* A fixture's own copy of a workspace's Nx installation, and the check that nothing wrote into it.
|
|
5
|
+
* A fixture's own copy of a workspace's Nx installation, kept between runs, and the check that nothing wrote into it.
|
|
6
6
|
*
|
|
7
7
|
* The graph witness binds node stamps (ctime included) of every file in the closure of Nx, this plugin and
|
|
8
8
|
* TypeScript (README "Ancestor directories bind..."). Linked from a workspace, that closure is the host's: on CI
|
|
@@ -16,48 +16,64 @@ const __typia_transform__accessExpressionAsString = _accessExpressionAsString_1.
|
|
|
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
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
19
|
+
* The copy is kept between runs, in the workspace's own tool cache, because making it is most of what a test file
|
|
20
|
+
* costs: about 21,000 files, which clonefile cannot share across the volume between Bun's global store and any
|
|
21
|
+
* directory a cowshed job may write (specs/cowshed/03_caches.md "Clone-materializing caches"). It is trusted only as
|
|
22
|
+
* its census proves it: on first use in a run, the census of the host closure and the proven census of the copy are
|
|
23
|
+
* compared package by package, by what each holds (resolution edges, node types and modes, file bytes), and a package
|
|
24
|
+
* whose copy no longer holds what the host's holds is copied again. Both censuses take the hashes of files whose
|
|
25
|
+
* stamps have not moved from the ones recorded beside the copy, so a run that changes nothing reads no file bytes.
|
|
26
|
+
*
|
|
27
|
+
* The copy lies beneath `censusRoot`'s `node_modules`, so a census of it that resolves any package outside the copy
|
|
28
|
+
* proves nothing about it, and the copy is made again, whole, in a directory of its own (`installation-<uuid>`, named
|
|
29
|
+
* in the record beside it). A package in the copy that requires a dependency it does not
|
|
30
|
+
* declare still reaches the host's top-level `node_modules` the same way; the census binds declared edges only.
|
|
31
|
+
*
|
|
32
|
+
* A test file uses its copy, on first use, for all its fixtures; retiring it fails, naming the changed nodes, if any
|
|
33
|
+
* fixture wrote into it.
|
|
21
34
|
*/
|
|
35
|
+
import { randomUUID } from 'node:crypto';
|
|
22
36
|
import { constants } from 'node:fs';
|
|
23
|
-
import { cp, mkdir, readFile, rm, symlink } from 'node:fs/promises';
|
|
37
|
+
import { cp, mkdir, readdir, readFile, realpath, rename, rm, symlink, writeFile } from 'node:fs/promises';
|
|
24
38
|
import { basename, dirname, join, relative } from 'node:path';
|
|
25
39
|
import { expandOutputs } from 'nx/src/native';
|
|
26
40
|
import { readModulePackageJson } from 'nx/src/utils/package-json';
|
|
27
41
|
import typia from 'typia';
|
|
28
|
-
import { graphInstallationCensus,
|
|
42
|
+
import { graphInstallationCensus, installationIdentityOf, provenInstallationCensus, stampMode, } from './ensure-built-witness.js';
|
|
29
43
|
/** The configuration the census resolves: Nx, this plugin and TypeScript. */
|
|
30
44
|
const CENSUS_NX_JSON = { plugins: ['@smoothbricks/nx-plugin'] };
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return
|
|
45
|
+
/**
|
|
46
|
+
* Where a workspace keeps its test files' copies: its tool cache, `node_modules/.cache`. Nothing sweeps it. A cowshed
|
|
47
|
+
* fork clones it with the build volume and main adopts it at land (specs/cowshed/16_build_volumes.md); it goes cold
|
|
48
|
+
* only when `node_modules` is reinstalled or the build volume reseeded.
|
|
49
|
+
*/
|
|
50
|
+
const KEPT = join('node_modules', '.cache', 'smoothbricks-nx-plugin', 'owned-installations');
|
|
51
|
+
/** The proven installation census resolved from `root`, taking unmoved files' hashes from `previous`. */
|
|
52
|
+
function provenCensus(root, previous, onUnproved) {
|
|
53
|
+
return provenInstallationCensus(root, CENSUS_NX_JSON, readModulePackageJson, expandOutputs, null, onUnproved, previous);
|
|
40
54
|
}
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
55
|
+
/**
|
|
56
|
+
* The proven census of the copy under `root`, or `null`, with `onUnproved` told why, for one that is unproved or
|
|
57
|
+
* that resolves a package outside the copy. The copy lies in `censusRoot`'s `node_modules/.cache`, so where that is a
|
|
58
|
+
* real directory, as on a fresh CI checkout, Node's ancestor lookup from the copy reaches the host's own
|
|
59
|
+
* `node_modules`: a copy that is missing, or lacks a link, would otherwise be proved by a census of host packages.
|
|
60
|
+
* Node also keeps every resolution for the life of the process, so once a census has resolved a host package from a
|
|
61
|
+
* copy's directory, no copy made there again can be proved in that process: a copy made whole goes to a new directory.
|
|
47
62
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
63
|
+
function copyCensus(root, previous, onUnproved) {
|
|
64
|
+
const census = provenCensus(root, previous, onUnproved);
|
|
65
|
+
const escaped = census?.resolutions.find(([, , manifest]) => manifest !== null && !manifest.startsWith(`${root}/`));
|
|
66
|
+
if (escaped === undefined)
|
|
67
|
+
return census;
|
|
68
|
+
const [from, name, manifest] = escaped;
|
|
69
|
+
onUnproved(`it resolves ${name} from ${from} to ${manifest}, outside the copy`);
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
/** Where the copy keeps each package root the census of `censusRoot` resolves. */
|
|
73
|
+
async function placements({ resolutions }) {
|
|
74
|
+
const placed = new Map();
|
|
59
75
|
for (const [, , manifest] of resolutions) {
|
|
60
|
-
if (manifest === null ||
|
|
76
|
+
if (manifest === null || placed.has(dirname(manifest)))
|
|
61
77
|
continue;
|
|
62
78
|
const { name, bin } = (() => {
|
|
63
79
|
const _ao0 = (input, _path, _exceptionable = true) => ("string" === typeof input.name || _assertGuard_1._assertGuard(_exceptionable, {
|
|
@@ -120,205 +136,312 @@ async function makeOwnedInstallation(censusRoot, root) {
|
|
|
120
136
|
};
|
|
121
137
|
return (input, errorFactory) => __assert(JSON.parse(input), errorFactory);
|
|
122
138
|
})()(await readFile(manifest, 'utf8'));
|
|
123
|
-
const store = join(
|
|
124
|
-
|
|
139
|
+
const store = join('node_modules', '.store', String(placed.size), 'node_modules');
|
|
140
|
+
placed.set(dirname(manifest), { store, place: join(store, name), bin });
|
|
125
141
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
continue;
|
|
141
|
-
const link = join(from === censusRoot ? modules : copyOf(from).store, name);
|
|
142
|
-
await mkdir(dirname(link), { recursive: true });
|
|
143
|
-
await symlink(relative(dirname(link), copyOf(dirname(manifest)).copy), link, 'dir');
|
|
144
|
-
if (from !== censusRoot)
|
|
145
|
-
continue;
|
|
146
|
-
const { bin } = copyOf(dirname(manifest));
|
|
147
|
-
const commands = typeof bin === 'string' ? { [basename(name)]: bin } : (bin ?? {});
|
|
148
|
-
for (const [command, path] of Object.entries(commands)) {
|
|
149
|
-
await mkdir(join(modules, '.bin'), { recursive: true });
|
|
150
|
-
await symlink(relative(join(modules, '.bin'), join(link, path)), join(modules, '.bin', command));
|
|
142
|
+
return placed;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* What `census` holds, read from `root` with each package root in `places` named by its place in the copy. A node
|
|
146
|
+
* outside every package root keeps its path, in the place `''` with the root's own edges.
|
|
147
|
+
*/
|
|
148
|
+
function holdings(census, root, places) {
|
|
149
|
+
const named = (path) => {
|
|
150
|
+
for (let at = path;; at = dirname(at)) {
|
|
151
|
+
const place = at === root ? '' : places.get(at);
|
|
152
|
+
if (place !== undefined)
|
|
153
|
+
return [place, relative(at, path)];
|
|
154
|
+
if (dirname(at) === at)
|
|
155
|
+
return ['', path];
|
|
151
156
|
}
|
|
152
|
-
}
|
|
153
|
-
|
|
157
|
+
};
|
|
158
|
+
const packages = new Map();
|
|
159
|
+
const hold = (path, value) => {
|
|
160
|
+
const [place, inner] = named(path);
|
|
161
|
+
const held = packages.get(place);
|
|
162
|
+
if (held === undefined)
|
|
163
|
+
packages.set(place, [[inner, value]]);
|
|
164
|
+
else
|
|
165
|
+
held.push([inner, value]);
|
|
166
|
+
};
|
|
167
|
+
for (const { path, stamp } of census.nodes)
|
|
168
|
+
hold(path, stampMode(stamp));
|
|
169
|
+
for (const { path, sha256 } of census.files)
|
|
170
|
+
hold(path, sha256);
|
|
171
|
+
return {
|
|
172
|
+
edges: JSON.stringify(census.resolutions.map(([from, name, manifest]) => [
|
|
173
|
+
named(from),
|
|
174
|
+
name,
|
|
175
|
+
manifest === null ? null : named(manifest),
|
|
176
|
+
])),
|
|
177
|
+
packages: new Map([...packages].map(([place, held]) => [place, JSON.stringify(held)])),
|
|
178
|
+
};
|
|
154
179
|
}
|
|
155
180
|
/**
|
|
156
|
-
*
|
|
157
|
-
*
|
|
181
|
+
* Each package of `packages` (the first eight) with the first entry in which what the copy holds is not what the host
|
|
182
|
+
* closure holds: a path within the package and its mode or SHA-256, on each side.
|
|
158
183
|
*/
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
const _ap0 = (input, _path, _exceptionable = true) => "string" === typeof input["path"] || _assertGuard_1._assertGuard(_exceptionable, {
|
|
168
|
-
method: "typia.json.assertParse",
|
|
169
|
-
path: _path + ".path",
|
|
170
|
-
expected: "string",
|
|
171
|
-
value: input["path"]
|
|
172
|
-
}, _errorFactory);
|
|
173
|
-
const _ao0 = (input, _path, _exceptionable = true) => ((Array.isArray(input.resolutions) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
184
|
+
function differences(packages, host, copy) {
|
|
185
|
+
const entries = (held) => (() => {
|
|
186
|
+
const __is = input => Array.isArray(input) && input.every(elem => Array.isArray(elem) && (elem.length === 2 && "string" === typeof elem[0] && "string" === typeof elem[1]));
|
|
187
|
+
let _errorFactory;
|
|
188
|
+
const __assert = (input, errorFactory) => {
|
|
189
|
+
if (false === __is(input)) {
|
|
190
|
+
_errorFactory = errorFactory;
|
|
191
|
+
((input, _path, _exceptionable = true) => (Array.isArray(input) || _assertGuard_1._assertGuard(true, {
|
|
174
192
|
method: "typia.json.assertParse",
|
|
175
|
-
path: _path + "
|
|
176
|
-
expected: "
|
|
177
|
-
value: input
|
|
178
|
-
}, _errorFactory)) && input.
|
|
193
|
+
path: _path + "",
|
|
194
|
+
expected: "Array<[string, string]>",
|
|
195
|
+
value: input
|
|
196
|
+
}, _errorFactory)) && input.every((elem, _index2) => (Array.isArray(elem) || _assertGuard_1._assertGuard(true, {
|
|
179
197
|
method: "typia.json.assertParse",
|
|
180
|
-
path: _path + "
|
|
181
|
-
expected: "
|
|
198
|
+
path: _path + "[" + _index2 + "]",
|
|
199
|
+
expected: "[string, string]",
|
|
182
200
|
value: elem
|
|
183
|
-
}, _errorFactory)) && ((elem.length ===
|
|
201
|
+
}, _errorFactory)) && ((elem.length === 2 || _assertGuard_1._assertGuard(true, {
|
|
184
202
|
method: "typia.json.assertParse",
|
|
185
|
-
path: _path + "
|
|
186
|
-
expected: "[string, string
|
|
203
|
+
path: _path + "[" + _index2 + "]",
|
|
204
|
+
expected: "[string, string]",
|
|
187
205
|
value: elem
|
|
188
|
-
}, _errorFactory)) && ("string" === typeof elem[0] || _assertGuard_1._assertGuard(
|
|
206
|
+
}, _errorFactory)) && ("string" === typeof elem[0] || _assertGuard_1._assertGuard(true, {
|
|
189
207
|
method: "typia.json.assertParse",
|
|
190
|
-
path: _path + "
|
|
208
|
+
path: _path + "[" + _index2 + "][0]",
|
|
191
209
|
expected: "string",
|
|
192
210
|
value: elem[0]
|
|
193
|
-
}, _errorFactory)) && ("string" === typeof elem[1] || _assertGuard_1._assertGuard(
|
|
211
|
+
}, _errorFactory)) && ("string" === typeof elem[1] || _assertGuard_1._assertGuard(true, {
|
|
194
212
|
method: "typia.json.assertParse",
|
|
195
|
-
path: _path + "
|
|
213
|
+
path: _path + "[" + _index2 + "][1]",
|
|
196
214
|
expected: "string",
|
|
197
215
|
value: elem[1]
|
|
198
|
-
}, _errorFactory))
|
|
199
|
-
method: "typia.json.assertParse",
|
|
200
|
-
path: _path + ".resolutions[" + _index4 + "][2]",
|
|
201
|
-
expected: "(null | string)",
|
|
202
|
-
value: elem[2]
|
|
203
|
-
}, _errorFactory))) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
204
|
-
method: "typia.json.assertParse",
|
|
205
|
-
path: _path + ".resolutions[" + _index4 + "]",
|
|
206
|
-
expected: "readonly [string, string, string | null]",
|
|
207
|
-
value: elem
|
|
208
|
-
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
209
|
-
method: "typia.json.assertParse",
|
|
210
|
-
path: _path + ".resolutions",
|
|
211
|
-
expected: "ReadonlyArray<readonly [string, string, string | null]>",
|
|
212
|
-
value: input.resolutions
|
|
213
|
-
}, _errorFactory)) && ((Array.isArray(input.nodes) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
214
|
-
method: "typia.json.assertParse",
|
|
215
|
-
path: _path + ".nodes",
|
|
216
|
-
expected: "ReadonlyArray<NodeWitness>",
|
|
217
|
-
value: input.nodes
|
|
218
|
-
}, _errorFactory)) && input.nodes.every((elem, _index5) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
|
|
219
|
-
method: "typia.json.assertParse",
|
|
220
|
-
path: _path + ".nodes[" + _index5 + "]",
|
|
221
|
-
expected: "NodeWitness",
|
|
222
|
-
value: elem
|
|
223
|
-
}, _errorFactory)) && _ao1(elem, _path + ".nodes[" + _index5 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
224
|
-
method: "typia.json.assertParse",
|
|
225
|
-
path: _path + ".nodes[" + _index5 + "]",
|
|
226
|
-
expected: "NodeWitness",
|
|
227
|
-
value: elem
|
|
228
|
-
}, _errorFactory)) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
229
|
-
method: "typia.json.assertParse",
|
|
230
|
-
path: _path + ".nodes",
|
|
231
|
-
expected: "ReadonlyArray<NodeWitness>",
|
|
232
|
-
value: input.nodes
|
|
233
|
-
}, _errorFactory)) && ((Array.isArray(input.files) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
216
|
+
}, _errorFactory))) || _assertGuard_1._assertGuard(true, {
|
|
234
217
|
method: "typia.json.assertParse",
|
|
235
|
-
path: _path + "
|
|
236
|
-
expected: "
|
|
237
|
-
value: input.files
|
|
238
|
-
}, _errorFactory)) && input.files.every((elem, _index6) => ("object" === typeof elem && null !== elem || _assertGuard_1._assertGuard(_exceptionable, {
|
|
239
|
-
method: "typia.json.assertParse",
|
|
240
|
-
path: _path + ".files[" + _index6 + "]",
|
|
241
|
-
expected: "{ readonly path: string; readonly sha256: string; }",
|
|
242
|
-
value: elem
|
|
243
|
-
}, _errorFactory)) && _ao2(elem, _path + ".files[" + _index6 + "]", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
244
|
-
method: "typia.json.assertParse",
|
|
245
|
-
path: _path + ".files[" + _index6 + "]",
|
|
246
|
-
expected: "{ readonly path: string; readonly sha256: string; }",
|
|
218
|
+
path: _path + "[" + _index2 + "]",
|
|
219
|
+
expected: "[string, string]",
|
|
247
220
|
value: elem
|
|
248
|
-
}, _errorFactory)) || _assertGuard_1._assertGuard(
|
|
249
|
-
method: "typia.json.assertParse",
|
|
250
|
-
path: _path + ".files",
|
|
251
|
-
expected: "readonly { readonly path: string; readonly sha256: string; }[]",
|
|
252
|
-
value: input.files
|
|
253
|
-
}, _errorFactory));
|
|
254
|
-
const _ao1 = (input, _path, _exceptionable = true) => _ap0(input, _path, true && _exceptionable) && ("string" === typeof input.stamp || _assertGuard_1._assertGuard(_exceptionable, {
|
|
221
|
+
}, _errorFactory)) || _assertGuard_1._assertGuard(true, {
|
|
255
222
|
method: "typia.json.assertParse",
|
|
256
|
-
path: _path + "
|
|
257
|
-
expected: "string",
|
|
258
|
-
value: input
|
|
259
|
-
}, _errorFactory));
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
path: _path + ".sha256",
|
|
263
|
-
expected: "string",
|
|
264
|
-
value: input.sha256
|
|
265
|
-
}, _errorFactory));
|
|
266
|
-
const _io0 = input => Array.isArray(input.resolutions) && input.resolutions.every(elem => Array.isArray(elem) && (elem.length === 3 && "string" === typeof elem[0] && "string" === typeof elem[1] && (null === elem[2] || "string" === typeof elem[2]))) && (Array.isArray(input.nodes) && input.nodes.every(elem => "object" === typeof elem && null !== elem && _io1(elem))) && (Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io2(elem)));
|
|
267
|
-
const _io1 = input => _ip0(input) && "string" === typeof input.stamp;
|
|
268
|
-
const _io2 = input => _ip0(input) && "string" === typeof input.sha256;
|
|
269
|
-
const __is = input => "object" === typeof input && null !== input && _io0(input);
|
|
270
|
-
let _errorFactory;
|
|
271
|
-
const __assert = (input, errorFactory) => {
|
|
272
|
-
if (false === __is(input)) {
|
|
273
|
-
_errorFactory = errorFactory;
|
|
274
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _assertGuard_1._assertGuard(true, {
|
|
275
|
-
method: "typia.json.assertParse",
|
|
276
|
-
path: _path + "",
|
|
277
|
-
expected: "GraphInstallationCensus",
|
|
278
|
-
value: input
|
|
279
|
-
}, _errorFactory)) && _ao0(input, _path + "", true) || _assertGuard_1._assertGuard(true, {
|
|
280
|
-
method: "typia.json.assertParse",
|
|
281
|
-
path: _path + "",
|
|
282
|
-
expected: "GraphInstallationCensus",
|
|
283
|
-
value: input
|
|
284
|
-
}, _errorFactory))(input, "$input", true);
|
|
285
|
-
}
|
|
286
|
-
return input;
|
|
287
|
-
};
|
|
288
|
-
return (input, errorFactory) => __assert(JSON.parse(input), errorFactory);
|
|
289
|
-
})()(census);
|
|
290
|
-
return new Set([
|
|
291
|
-
...nodes.map(({ path, stamp }) => `${path} ${stamp}`),
|
|
292
|
-
...files.map(({ path, sha256 }) => `${path} ${sha256}`),
|
|
293
|
-
]);
|
|
223
|
+
path: _path + "",
|
|
224
|
+
expected: "Array<[string, string]>",
|
|
225
|
+
value: input
|
|
226
|
+
}, _errorFactory))(input, "$input", true);
|
|
227
|
+
}
|
|
228
|
+
return input;
|
|
294
229
|
};
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
230
|
+
return (input, errorFactory) => __assert(JSON.parse(input), errorFactory);
|
|
231
|
+
})()(held ?? '[]');
|
|
232
|
+
const entry = (held) => held === undefined ? 'nothing' : `${held[0] || '.'} ${held[1]}`;
|
|
233
|
+
const named = packages.slice(0, 8).map(([source, { place }]) => {
|
|
234
|
+
const wanted = entries(host.packages.get(place));
|
|
235
|
+
const found = entries(copy.packages.get(place));
|
|
236
|
+
let at = 0;
|
|
237
|
+
while (at < Math.max(wanted.length, found.length) && entry(wanted[at]) === entry(found[at]))
|
|
238
|
+
at += 1;
|
|
239
|
+
return `${source} (host: ${entry(wanted[at])}; copy: ${entry(found[at])})`;
|
|
240
|
+
});
|
|
241
|
+
return `${named.join(', ')}${packages.length > 8 ? ` and ${packages.length - 8} more` : ''}`;
|
|
242
|
+
}
|
|
243
|
+
async function readKept(path) {
|
|
244
|
+
try {
|
|
245
|
+
return (() => {
|
|
246
|
+
const _ip0 = input => "string" === typeof input["path"];
|
|
247
|
+
const _io0 = input => 2 === input.version && "string" === typeof input.installation && ("object" === typeof input.host && null !== input.host && _io1(input.host)) && ("object" === typeof input.copy && null !== input.copy && _io1(input.copy));
|
|
248
|
+
const _io1 = input => Array.isArray(input.resolutions) && input.resolutions.every(elem => Array.isArray(elem) && (elem.length === 3 && "string" === typeof elem[0] && "string" === typeof elem[1] && (null === elem[2] || "string" === typeof elem[2]))) && (Array.isArray(input.nodes) && input.nodes.every(elem => "object" === typeof elem && null !== elem && _io2(elem))) && (Array.isArray(input.files) && input.files.every(elem => "object" === typeof elem && null !== elem && _io3(elem))) && (Array.isArray(input.unproven) && input.unproven.every(elem => "string" === typeof elem));
|
|
249
|
+
const _io2 = input => _ip0(input) && "string" === typeof input.stamp;
|
|
250
|
+
const _io3 = input => _ip0(input) && "string" === typeof input.sha256;
|
|
251
|
+
const __is = input => "object" === typeof input && null !== input && _io0(input);
|
|
252
|
+
return input => { input = JSON.parse(input); return __is(input) ? input : null; };
|
|
253
|
+
})()(await readFile(path, 'utf8'));
|
|
254
|
+
}
|
|
255
|
+
catch (error) {
|
|
256
|
+
if (error instanceof SyntaxError || (error instanceof Error && 'code' in error && error.code === 'ENOENT')) {
|
|
257
|
+
return null;
|
|
258
|
+
}
|
|
259
|
+
throw error;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
async function writeKept(path, kept) {
|
|
263
|
+
const temporary = `${path}.${randomUUID()}`;
|
|
264
|
+
try {
|
|
265
|
+
await writeFile(temporary, JSON.stringify(kept), { flag: 'wx', mode: 0o600 });
|
|
266
|
+
await rename(temporary, path);
|
|
302
267
|
}
|
|
303
268
|
finally {
|
|
304
|
-
await rm(
|
|
269
|
+
await rm(temporary, { force: true });
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
/** Copy the host package root `source` to its place under `root`, with the census's own exclusions. */
|
|
273
|
+
function copyPackage(source, root, { place }) {
|
|
274
|
+
return cp(source, join(root, place), {
|
|
275
|
+
recursive: true,
|
|
276
|
+
verbatimSymlinks: true,
|
|
277
|
+
mode: constants.COPYFILE_FICLONE,
|
|
278
|
+
filter: (path) => path === source || !['node_modules', '.git', '.nx'].includes(basename(path)),
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
/** Link every resolution edge of `host` beside its copy under `root`, and the top-level packages' bins in `.bin`. */
|
|
282
|
+
async function linkCopies(censusRoot, root, { resolutions }, placed) {
|
|
283
|
+
const placementOf = (source) => {
|
|
284
|
+
const placement = placed.get(source);
|
|
285
|
+
if (placement === undefined)
|
|
286
|
+
throw new Error(`${source} resolves dependencies but is not in the census`);
|
|
287
|
+
return placement;
|
|
288
|
+
};
|
|
289
|
+
const modules = join(root, 'node_modules');
|
|
290
|
+
for (const [from, name, manifest] of resolutions) {
|
|
291
|
+
if (manifest === null)
|
|
292
|
+
continue;
|
|
293
|
+
const link = join(from === censusRoot ? modules : join(root, placementOf(from).store), name);
|
|
294
|
+
const { place, bin } = placementOf(dirname(manifest));
|
|
295
|
+
await mkdir(dirname(link), { recursive: true });
|
|
296
|
+
await symlink(relative(dirname(link), join(root, place)), link, 'dir');
|
|
297
|
+
if (from !== censusRoot)
|
|
298
|
+
continue;
|
|
299
|
+
const commands = typeof bin === 'string' ? { [basename(name)]: bin } : (bin ?? {});
|
|
300
|
+
for (const [command, path] of Object.entries(commands)) {
|
|
301
|
+
await mkdir(join(modules, '.bin'), { recursive: true });
|
|
302
|
+
await symlink(relative(join(modules, '.bin'), join(link, path)), join(modules, '.bin', command));
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Remove whatever sits in the copy's `node_modules` beside its store, bins and top-level links: a census binds none
|
|
308
|
+
* of it, and a run starts with the layout alone, as a fresh copy would.
|
|
309
|
+
*/
|
|
310
|
+
async function clearLeftovers(censusRoot, root, { resolutions }) {
|
|
311
|
+
const own = new Set(['.store', '.bin']);
|
|
312
|
+
for (const [from, name, manifest] of resolutions) {
|
|
313
|
+
if (from === censusRoot && manifest !== null)
|
|
314
|
+
own.add(name.split('/')[0]);
|
|
315
|
+
}
|
|
316
|
+
const modules = join(root, 'node_modules');
|
|
317
|
+
for (const entry of await readdir(modules)) {
|
|
318
|
+
if (!own.has(entry))
|
|
319
|
+
await rm(join(modules, entry), { recursive: true, force: true });
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* The copy of the closure `censusRoot` resolves kept as `name`, proved to hold what the host closure holds, copying
|
|
324
|
+
* again each package whose copy does not, and every package when the resolution edges moved or the copy is unproved.
|
|
325
|
+
* Says so on stderr when a copy that was there fails its proof: a closure that keeps changing is itself worth knowing.
|
|
326
|
+
*
|
|
327
|
+
* Only the closure is read from `censusRoot`, never its proof: that installation is the host's, whose shared store
|
|
328
|
+
* other tasks relink while the census reads it, which changes node stamps and would make every test that copies it
|
|
329
|
+
* fail for the host's work rather than its own. The copy, which the fixture owns, is what gets proved.
|
|
330
|
+
*/
|
|
331
|
+
async function keptInstallation(censusRoot, name) {
|
|
332
|
+
await mkdir(join(censusRoot, KEPT, name), { recursive: true });
|
|
333
|
+
const kept = await realpath(join(censusRoot, KEPT, name));
|
|
334
|
+
const record = join(kept, 'censuses.json');
|
|
335
|
+
const recorded = await readKept(record);
|
|
336
|
+
let unread = 'no detail';
|
|
337
|
+
const host = graphInstallationCensus(censusRoot, CENSUS_NX_JSON, readModulePackageJson, expandOutputs, null, (detail) => {
|
|
338
|
+
unread = detail;
|
|
339
|
+
}, recorded?.host);
|
|
340
|
+
if (host === null)
|
|
341
|
+
throw new Error(`the Nx installation closure of ${censusRoot} cannot be read: ${unread}`);
|
|
342
|
+
const placed = await placements(host);
|
|
343
|
+
const wanted = holdings(host, censusRoot, new Map([...placed].map(([source, { place }]) => [source, place])));
|
|
344
|
+
const placesIn = (root) => new Map([...placed.values()].map(({ place }) => [join(root, place), place]));
|
|
345
|
+
// Only a recorded copy is censused: a census of none would resolve the host's packages through the ancestor lookup.
|
|
346
|
+
const current = recorded === null ? null : join(kept, recorded.installation);
|
|
347
|
+
let unproved = 'no detail';
|
|
348
|
+
const found = current === null
|
|
349
|
+
? null
|
|
350
|
+
: copyCensus(current, recorded?.copy, (detail) => {
|
|
351
|
+
unproved = detail;
|
|
352
|
+
});
|
|
353
|
+
const held = current === null || found === null ? null : holdings(found, current, placesIn(current));
|
|
354
|
+
const stale = held === null || held.edges !== wanted.edges || held.packages.get('') !== wanted.packages.get('')
|
|
355
|
+
? null
|
|
356
|
+
: [...placed].filter(([, { place }]) => held.packages.get(place) !== wanted.packages.get(place));
|
|
357
|
+
if (current !== null && stale !== null) {
|
|
358
|
+
await clearLeftovers(censusRoot, current, host);
|
|
359
|
+
if (stale.length === 0 && found !== null) {
|
|
360
|
+
await writeKept(record, { version: 2, installation: basename(current), host, copy: found });
|
|
361
|
+
return { root: current, census: found };
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
if (current !== null) {
|
|
365
|
+
const why = held === null
|
|
366
|
+
? `its census is unproved (${unproved})`
|
|
367
|
+
: stale === null
|
|
368
|
+
? 'its resolution edges are not the host closure’s'
|
|
369
|
+
: `${stale.length} of ${placed.size} packages no longer hold what the host closure holds: ${differences(stale, wanted, held)}`;
|
|
370
|
+
process.stderr.write(`kept Nx installation ${current} failed its proof, copying again: ${why}\n`);
|
|
371
|
+
}
|
|
372
|
+
// A copy made whole goes to a directory no census in this process has resolved from (copyCensus).
|
|
373
|
+
const root = current !== null && stale !== null ? current : join(kept, `installation-${randomUUID()}`);
|
|
374
|
+
if (root === current && stale !== null) {
|
|
375
|
+
for (const [, { place }] of stale)
|
|
376
|
+
await rm(join(root, place), { recursive: true, force: true });
|
|
377
|
+
await Promise.all(stale.map(([source, placement]) => copyPackage(source, root, placement)));
|
|
378
|
+
}
|
|
379
|
+
else {
|
|
380
|
+
for (const entry of await readdir(kept)) {
|
|
381
|
+
if (entry !== 'censuses.json')
|
|
382
|
+
await rm(join(kept, entry), { recursive: true, force: true });
|
|
383
|
+
}
|
|
384
|
+
await Promise.all([...placed].map(([source, placement]) => copyPackage(source, root, placement)));
|
|
385
|
+
await linkCopies(censusRoot, root, host, placed);
|
|
386
|
+
}
|
|
387
|
+
const census = copyCensus(root, root === current ? (found ?? undefined) : undefined, (detail) => {
|
|
388
|
+
unproved = detail;
|
|
389
|
+
});
|
|
390
|
+
if (census === null)
|
|
391
|
+
throw new Error(`the Nx installation copied to ${root} is unproved: ${unproved}`);
|
|
392
|
+
const copied = holdings(census, root, placesIn(root));
|
|
393
|
+
const moved = [...placed].filter(([, { place }]) => copied.packages.get(place) !== wanted.packages.get(place));
|
|
394
|
+
if (copied.edges !== wanted.edges || moved.length > 0) {
|
|
395
|
+
// The host's own installs relink its shared store while it is read: the copy is proved as made, and the next run
|
|
396
|
+
// compares it with the host closure again.
|
|
397
|
+
process.stderr.write(`the Nx installation closure of ${censusRoot} moved while ${root} copied it: ${differences(moved, wanted, copied)}\n`);
|
|
305
398
|
}
|
|
399
|
+
await writeKept(record, { version: 2, installation: basename(root), host, copy: census });
|
|
400
|
+
return { root, census };
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* End a test file's use of its installation, failing, with the changed nodes named, if its identity is no longer the
|
|
404
|
+
* one it was taken with: the proof that its sharers only read it. A write moves a node's stamp, which the identity
|
|
405
|
+
* binds, so the census that proves it reads again only the files whose stamps moved. The copy stays for the next run,
|
|
406
|
+
* which proves it against the host closure before using it.
|
|
407
|
+
*/
|
|
408
|
+
function retireOwnedInstallation({ root, census }) {
|
|
409
|
+
let unproved = 'no detail';
|
|
410
|
+
const retired = provenCensus(root, census, (detail) => {
|
|
411
|
+
unproved = detail;
|
|
412
|
+
});
|
|
413
|
+
if (retired === null)
|
|
414
|
+
throw new Error(`a fixture left the installation it shares unproved, in ${root}: ${unproved}`);
|
|
415
|
+
if (installationIdentityOf(retired, null) === installationIdentityOf(census, null))
|
|
416
|
+
return;
|
|
417
|
+
const entries = ({ nodes, files }) => new Set([
|
|
418
|
+
...nodes.map(({ path, stamp }) => `${path} ${stamp}`),
|
|
419
|
+
...files.map(({ path, sha256 }) => `${path} ${sha256}`),
|
|
420
|
+
]);
|
|
421
|
+
const taken = entries(census);
|
|
422
|
+
const now = entries(retired);
|
|
423
|
+
const changed = [
|
|
424
|
+
...[...taken].filter((entry) => !now.has(entry)).map((entry) => `- ${entry}`),
|
|
425
|
+
...[...now].filter((entry) => !taken.has(entry)).map((entry) => `+ ${entry}`),
|
|
426
|
+
];
|
|
427
|
+
throw new Error(`a fixture changed the installation it shares, in ${root}:\n${changed.slice(0, 20).join('\n')}`);
|
|
306
428
|
}
|
|
307
429
|
/**
|
|
308
|
-
* The installation one test file owns:
|
|
309
|
-
* TypeScript the fixtures stand for) resolves,
|
|
310
|
-
* per file, at module scope: Bun runs many test files in one process, and
|
|
430
|
+
* The installation one test file owns: the copy of the closure `censusRoot` (the workspace whose Nx, plugin and
|
|
431
|
+
* TypeScript the fixtures stand for) resolves, kept as `name` in `censusRoot`'s tool cache and proved on first use.
|
|
432
|
+
* Call once per file, at module scope, with a name no other file uses: Bun runs many test files in one process, and
|
|
433
|
+
* each must own its copy. Two runs of one file at once share it, and a copy one of them makes again fails the other.
|
|
311
434
|
*/
|
|
312
|
-
export function ownedInstallation(censusRoot,
|
|
313
|
-
let
|
|
435
|
+
export function ownedInstallation(censusRoot, name) {
|
|
436
|
+
let taken;
|
|
314
437
|
return {
|
|
315
438
|
nodeModules: async () => {
|
|
316
|
-
|
|
317
|
-
return join((await
|
|
439
|
+
taken ??= keptInstallation(censusRoot, name);
|
|
440
|
+
return join((await taken).root, 'node_modules');
|
|
318
441
|
},
|
|
319
442
|
retire: async () => {
|
|
320
|
-
if (
|
|
321
|
-
|
|
443
|
+
if (taken !== undefined)
|
|
444
|
+
retireOwnedInstallation(await taken);
|
|
322
445
|
},
|
|
323
446
|
};
|
|
324
447
|
}
|
|
@@ -92,6 +92,14 @@ export type GitAnswer<T> = {
|
|
|
92
92
|
* upstream branch and `refs/remotes/origin/main`, and local `main` when none does.
|
|
93
93
|
*/
|
|
94
94
|
export declare function upstreamBase(root: string): GitAnswer<string>;
|
|
95
|
+
/**
|
|
96
|
+
* The upstream base as a run precondition, checked before Nx hashes anything:
|
|
97
|
+
* only a workspace whose own root package.json declares the test-walk check
|
|
98
|
+
* (this repository) is gated, and a missing main ref fails the run with the
|
|
99
|
+
* check's own reason instead of an error smuggled through a runtime input's
|
|
100
|
+
* byte channel. Workspaces that never declare the check are untouched.
|
|
101
|
+
*/
|
|
102
|
+
export declare function assertUpstreamBasePrecondition(workspaceRoot: string): void;
|
|
95
103
|
/**
|
|
96
104
|
* The files changed since `base`, tracked or untracked, and the new-side line ranges of each change; an untracked
|
|
97
105
|
* file is changed throughout.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-walk-policy.d.ts","sourceRoot":"","sources":["../src/test-walk-policy.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,aAAa;IACxB,EAAE;IACF,IAAI;IAIJ,kHAAkH;IAClH,QAAQ;IACR,iEAAiE;IACjE,WAAW;IACX,gGAAgG;IAChG,YAAY;IACZ,oHAAoH;IACpH,YAAY;CACb,CAAC;AAEF,0DAA0D;AAC1D,MAAM,WAAW,IAAI;IACnB,QAAQ,CAAC,KAAK,EAAE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