@zgeoff/chex 0.3.13 → 0.3.14
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 +1 -1
- package/package.json +1 -1
- package/src/test-layout/collect-folder-faults.ts +12 -0
- package/src/test-layout/collect-import-faults.ts +143 -56
- package/src/test-layout/collect-test-preloads.ts +55 -0
- package/src/test-layout/read-workspace-packages.ts +24 -0
- package/src/test-layout/run-test-layout-check.ts +30 -14
- package/src/test-layout/types.ts +18 -0
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ The repo checks read the branch, the pushed commits and the repo's config:
|
|
|
57
57
|
| `commits` | a pushed commit whose message fails `@zgeoff/commitlint-config` | `--pushed-refs` |
|
|
58
58
|
| `local-paths` | a line a pushed commit adds that holds the home folder or the host name | `--pushed-refs` |
|
|
59
59
|
| `test-timeouts` | a `bun test` timeout above its lane's limit, in a script or a `bunfig.toml` | none |
|
|
60
|
-
| `test-layout` | a test folder, file name or import outside [the test layout](../../docs/guides/test-layout.md)
|
|
60
|
+
| `test-layout` | a test folder, file name or import outside [the test layout](../../docs/guides/test-layout.md); test code includes a relative `[test] preload` file, a `.nix`-only `tests/` folder and a private workspace that only test code imports | none |
|
|
61
61
|
| `workflows` | nothing: it prints each fault of the shared workflow lint, and fails when there is one | the paths |
|
|
62
62
|
| `dependency-gates` | a stale age-gate exclude, an override or an audit ignore that nothing needs, a first-party package with no age-gate exclude, or a pinned release younger than the age gate ([details](../../docs/architecture/dependency-updates.md#the-dependency-gates-check)) | none |
|
|
63
63
|
| `uncommitted` | a file the branch changes that holds a change the push does not send | none |
|
package/package.json
CHANGED
|
@@ -79,6 +79,7 @@ function collectTestFolderFaults(trackedPaths: readonly string[]): string[] {
|
|
|
79
79
|
return collectFolderPaths(trackedPaths)
|
|
80
80
|
.filter((folder) => testFolderNames.has(posix.basename(folder)))
|
|
81
81
|
.filter((folder) => !isCargoTestsFolder(folder, tracked))
|
|
82
|
+
.filter((folder) => !isNixTestsFolder(folder, trackedPaths))
|
|
82
83
|
.map(
|
|
83
84
|
(folder) =>
|
|
84
85
|
`${folder}/ is a test folder; move its tests beside the modules they test, its end-to-end tests into the package's e2e/, and its helpers into src/test-utils/`,
|
|
@@ -93,6 +94,17 @@ function isCargoTestsFolder(folder: string, tracked: ReadonlySet<string>): boole
|
|
|
93
94
|
);
|
|
94
95
|
}
|
|
95
96
|
|
|
97
|
+
// A tests/ folder of only .nix files holds NixOS checks that a flake imports, not tests that move.
|
|
98
|
+
function isNixTestsFolder(folder: string, trackedPaths: readonly string[]): boolean {
|
|
99
|
+
const files = trackedPaths.filter((path) => path.startsWith(`${folder}/`));
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
posix.basename(folder) === 'tests' &&
|
|
103
|
+
files.length > 0 &&
|
|
104
|
+
files.every((path) => path.endsWith('.nix'))
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
96
108
|
function collectHelperFolderFaults(layout: TestLayout): string[] {
|
|
97
109
|
return layout.workspaces
|
|
98
110
|
.filter((root) => layout.trackedPaths.some((path) => path.startsWith(`${root}/test-utils/`)))
|
|
@@ -5,6 +5,12 @@ import type { SourceFile, TestLayout } from './types.ts';
|
|
|
5
5
|
|
|
6
6
|
const sourcePattern = /\.(?:[cm]?[jt]s|[jt]sx)$/u;
|
|
7
7
|
|
|
8
|
+
interface ParsedImports {
|
|
9
|
+
readonly path: string;
|
|
10
|
+
|
|
11
|
+
readonly specifiers: readonly string[];
|
|
12
|
+
}
|
|
13
|
+
|
|
8
14
|
// The faults of imports: a relative import of another workspace's helper, and production code that
|
|
9
15
|
// imports a helper.
|
|
10
16
|
export function collectImportFaults(
|
|
@@ -12,70 +18,80 @@ export function collectImportFaults(
|
|
|
12
18
|
layout: TestLayout,
|
|
13
19
|
sources: readonly SourceFile[],
|
|
14
20
|
): string[] {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
const parseFaults: string[] = [];
|
|
22
|
+
const imports: ParsedImports[] = [];
|
|
23
|
+
|
|
24
|
+
for (const source of sources.filter((candidate) => sourcePattern.test(candidate.path))) {
|
|
25
|
+
const parsed = oxc.parseSync(source.path, source.text);
|
|
26
|
+
const [parseError] = parsed.errors;
|
|
27
|
+
|
|
28
|
+
if (parseError === undefined) {
|
|
29
|
+
imports.push({
|
|
30
|
+
path: source.path,
|
|
31
|
+
specifiers: collectImportSpecifiers(oxc, parsed.program),
|
|
32
|
+
});
|
|
33
|
+
} else {
|
|
34
|
+
parseFaults.push(
|
|
35
|
+
`${source.path} does not parse, so the layout check cannot read its imports: ${parseError.message}`,
|
|
29
36
|
);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const packageHelperPattern = /^@[^/]+\/[^/]+\/test-utils(?:\/|$)/u;
|
|
34
|
-
|
|
35
|
-
function collectSpecifierFaults(layout: TestLayout, importer: string, specifier: string): string[] {
|
|
36
|
-
const isRelative = specifier.startsWith('./') || specifier.startsWith('../');
|
|
37
|
-
const target = isRelative ? normalize(join(dirname(importer), specifier)) : specifier;
|
|
38
|
-
const isHelper = isRelative ? isHelperPath(layout, target) : packageHelperPattern.test(specifier);
|
|
39
|
-
|
|
40
|
-
if (isHelper && isProductionCode(layout, importer)) {
|
|
41
|
-
return [
|
|
42
|
-
`${importer} imports ${target}, a test helper, from production code; import test helpers only from tests and other test helpers`,
|
|
43
|
-
];
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
if (!isRelative || !isHelper) {
|
|
47
|
-
return [];
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
const targetRoot = getWorkspaceRoot(layout, target);
|
|
51
|
-
|
|
52
|
-
if (targetRoot === getWorkspaceRoot(layout, importer)) {
|
|
53
|
-
return [];
|
|
37
|
+
}
|
|
54
38
|
}
|
|
55
39
|
|
|
56
|
-
const
|
|
57
|
-
? "import it by the package's name, with the package as a workspace:* dev dependency"
|
|
58
|
-
: "copy the helper into the importer's own test-utils/";
|
|
40
|
+
const testOnlyRoots = collectTestOnlyWorkspaces(layout, imports);
|
|
59
41
|
|
|
60
|
-
return [
|
|
42
|
+
return [
|
|
43
|
+
...parseFaults,
|
|
44
|
+
...imports.flatMap((file) =>
|
|
45
|
+
file.specifiers.flatMap((specifier) =>
|
|
46
|
+
collectSpecifierFaults(layout, testOnlyRoots, file.path, specifier),
|
|
47
|
+
),
|
|
48
|
+
),
|
|
49
|
+
];
|
|
61
50
|
}
|
|
62
51
|
|
|
63
|
-
|
|
64
|
-
|
|
52
|
+
// A private workspace that no production file imports. A root-level source such as cli.ts counts
|
|
53
|
+
// as production here, though it may import helpers itself. The check runs to a fixed point: a workspace that a test-only workspace imports counts as imported
|
|
54
|
+
// by test code.
|
|
55
|
+
function collectTestOnlyWorkspaces(
|
|
56
|
+
layout: TestLayout,
|
|
57
|
+
imports: readonly ParsedImports[],
|
|
58
|
+
): ReadonlySet<string> {
|
|
59
|
+
const candidates = new Map(
|
|
60
|
+
layout.workspacePackages
|
|
61
|
+
.filter((workspace) => workspace.isPrivate && workspace.name !== '')
|
|
62
|
+
.map((workspace) => [workspace.root, workspace.name]),
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
let changed = true;
|
|
66
|
+
|
|
67
|
+
while (changed) {
|
|
68
|
+
changed = false;
|
|
69
|
+
|
|
70
|
+
const roots = new Set(candidates.keys());
|
|
71
|
+
|
|
72
|
+
for (const [root, name] of candidates) {
|
|
73
|
+
const importers = imports
|
|
74
|
+
.filter((file) => getWorkspaceRoot(layout, file.path) !== root)
|
|
75
|
+
.filter((file) =>
|
|
76
|
+
file.specifiers.some(
|
|
77
|
+
(specifier) => specifier === name || specifier.startsWith(`${name}/`),
|
|
78
|
+
),
|
|
79
|
+
)
|
|
80
|
+
.map((file) => file.path);
|
|
81
|
+
|
|
82
|
+
const isImportedOnlyByTests = importers.every(
|
|
83
|
+
(path) => !isProductionImporter(layout, roots, path),
|
|
84
|
+
);
|
|
65
85
|
|
|
66
|
-
|
|
67
|
-
|
|
86
|
+
if (!isImportedOnlyByTests) {
|
|
87
|
+
candidates.delete(root);
|
|
68
88
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (root === '') {
|
|
75
|
-
return layout.isWorkspaceRepo ? 'test-utils' : 'src/test-utils';
|
|
89
|
+
changed = true;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
76
92
|
}
|
|
77
93
|
|
|
78
|
-
return
|
|
94
|
+
return new Set(candidates.keys());
|
|
79
95
|
}
|
|
80
96
|
|
|
81
97
|
// A path belongs to its workspace, to the single package of a repo with no workspaces, or else to
|
|
@@ -98,10 +114,16 @@ function getWorkspaceRoot(layout: TestLayout, path: string): string {
|
|
|
98
114
|
|
|
99
115
|
const packageTestFolders = new Set(['e2e', 'evals', 'bench', 'test-utils']);
|
|
100
116
|
|
|
101
|
-
|
|
117
|
+
// Whether a file's import keeps its target in production. Unlike isProductionCode, a root-level
|
|
118
|
+
// source such as cli.ts counts, because it ships.
|
|
119
|
+
function isProductionImporter(
|
|
120
|
+
layout: TestLayout,
|
|
121
|
+
testOnlyRoots: ReadonlySet<string>,
|
|
122
|
+
path: string,
|
|
123
|
+
): boolean {
|
|
102
124
|
const root = getWorkspaceRoot(layout, path);
|
|
103
125
|
|
|
104
|
-
if ((root
|
|
126
|
+
if (testOnlyRoots.has(root) || layout.testPreloads.includes(path) || isHelperPath(layout, path)) {
|
|
105
127
|
return false;
|
|
106
128
|
}
|
|
107
129
|
|
|
@@ -120,3 +142,68 @@ function isProductionCode(layout: TestLayout, path: string): boolean {
|
|
|
120
142
|
|
|
121
143
|
return !packageTestFolders.has(folder ?? '');
|
|
122
144
|
}
|
|
145
|
+
|
|
146
|
+
function isHelperPath(layout: TestLayout, path: string): boolean {
|
|
147
|
+
const folder = getHelperFolder(layout, getWorkspaceRoot(layout, path));
|
|
148
|
+
|
|
149
|
+
return path === folder || path.startsWith(`${folder}/`);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function getHelperFolder(layout: TestLayout, root: string): string {
|
|
153
|
+
if (layout.workspaces.includes(root)) {
|
|
154
|
+
return `${root}/src/test-utils`;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (root === '') {
|
|
158
|
+
return layout.isWorkspaceRepo ? 'test-utils' : 'src/test-utils';
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return `${root}/test-utils`;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const packageHelperPattern = /^@[^/]+\/[^/]+\/test-utils(?:\/|$)/u;
|
|
165
|
+
|
|
166
|
+
function collectSpecifierFaults(
|
|
167
|
+
layout: TestLayout,
|
|
168
|
+
testOnlyRoots: ReadonlySet<string>,
|
|
169
|
+
importer: string,
|
|
170
|
+
specifier: string,
|
|
171
|
+
): string[] {
|
|
172
|
+
const isRelative = specifier.startsWith('./') || specifier.startsWith('../');
|
|
173
|
+
const target = isRelative ? normalize(join(dirname(importer), specifier)) : specifier;
|
|
174
|
+
const isHelper = isRelative ? isHelperPath(layout, target) : packageHelperPattern.test(specifier);
|
|
175
|
+
|
|
176
|
+
if (isHelper && isProductionCode(layout, testOnlyRoots, importer)) {
|
|
177
|
+
return [
|
|
178
|
+
`${importer} imports ${target}, a test helper, from production code; import test helpers only from tests and other test helpers`,
|
|
179
|
+
];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (!isRelative || !isHelper) {
|
|
183
|
+
return [];
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const targetRoot = getWorkspaceRoot(layout, target);
|
|
187
|
+
|
|
188
|
+
if (targetRoot === getWorkspaceRoot(layout, importer)) {
|
|
189
|
+
return [];
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
const fix = layout.workspaces.includes(targetRoot)
|
|
193
|
+
? "import it by the package's name, with the package as a workspace:* dev dependency"
|
|
194
|
+
: "copy the helper into the importer's own test-utils/";
|
|
195
|
+
|
|
196
|
+
return [`${importer} imports ${target}, a test helper of ${targetRoot}; ${fix}`];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function isProductionCode(
|
|
200
|
+
layout: TestLayout,
|
|
201
|
+
testOnlyRoots: ReadonlySet<string>,
|
|
202
|
+
path: string,
|
|
203
|
+
): boolean {
|
|
204
|
+
return !isRootLevelSource(layout, path) && isProductionImporter(layout, testOnlyRoots, path);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function isRootLevelSource(layout: TestLayout, path: string): boolean {
|
|
208
|
+
return layout.isWorkspaceRepo && getWorkspaceRoot(layout, path) === '';
|
|
209
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { posix } from 'node:path';
|
|
2
|
+
import type { SourceFile } from './types.ts';
|
|
3
|
+
|
|
4
|
+
export interface TestPreloads {
|
|
5
|
+
readonly preloads: string[];
|
|
6
|
+
|
|
7
|
+
readonly faults: string[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Reads the `[test] preload` list of each bunfig.toml. A relative entry names a test file, resolved
|
|
11
|
+
// against the folder of its bunfig.toml; a bare package name is skipped.
|
|
12
|
+
export function collectTestPreloads(bunfigs: readonly SourceFile[]): TestPreloads {
|
|
13
|
+
const preloads: string[] = [];
|
|
14
|
+
const faults: string[] = [];
|
|
15
|
+
|
|
16
|
+
for (const bunfig of bunfigs) {
|
|
17
|
+
let parsed: unknown;
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
parsed = Bun.TOML.parse(bunfig.text);
|
|
21
|
+
} catch (error) {
|
|
22
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
23
|
+
|
|
24
|
+
faults.push(
|
|
25
|
+
`${bunfig.path} does not parse, so the layout check cannot read its test preloads: ${reason}; fix the TOML`,
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
for (const entry of pickPreloadEntries(parsed)) {
|
|
32
|
+
if (entry.startsWith('./') || entry.startsWith('../')) {
|
|
33
|
+
const joined = posix.join(posix.dirname(bunfig.path), entry);
|
|
34
|
+
|
|
35
|
+
preloads.push(posix.normalize(joined));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return { preloads, faults };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function pickPreloadEntries(parsed: unknown): string[] {
|
|
44
|
+
const section: unknown =
|
|
45
|
+
typeof parsed === 'object' && parsed !== null ? Reflect.get(parsed, 'test') : null;
|
|
46
|
+
|
|
47
|
+
const list: unknown =
|
|
48
|
+
typeof section === 'object' && section !== null ? Reflect.get(section, 'preload') : null;
|
|
49
|
+
|
|
50
|
+
if (typeof list === 'string') {
|
|
51
|
+
return [list];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return Array.isArray(list) ? list.filter((item): item is string => typeof item === 'string') : [];
|
|
55
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { WorkspacePackage } from './types.ts';
|
|
2
|
+
|
|
3
|
+
// Reads the name and `private` flag of the package.json of each workspace folder.
|
|
4
|
+
export function readWorkspacePackages(
|
|
5
|
+
roots: readonly string[],
|
|
6
|
+
readText: (path: string) => Promise<string>,
|
|
7
|
+
): Promise<WorkspacePackage[]> {
|
|
8
|
+
return Promise.all(
|
|
9
|
+
roots.map(async (root) => {
|
|
10
|
+
const text = await readText(`${root}/package.json`);
|
|
11
|
+
|
|
12
|
+
const manifest: unknown = JSON.parse(text);
|
|
13
|
+
|
|
14
|
+
const fields: Record<string, unknown> =
|
|
15
|
+
typeof manifest === 'object' && manifest !== null ? { ...manifest } : {};
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
root,
|
|
19
|
+
name: typeof fields['name'] === 'string' ? fields['name'] : '',
|
|
20
|
+
isPrivate: fields['private'] === true,
|
|
21
|
+
};
|
|
22
|
+
}),
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { join } from 'node:path';
|
|
1
|
+
import { join, posix } from 'node:path';
|
|
2
2
|
import { runProgram } from '../program/run-program.ts';
|
|
3
3
|
import { collectLaneSuffixes } from './collect-lane-suffixes.ts';
|
|
4
4
|
import { collectTestLayoutFaults } from './collect-test-layout-faults.ts';
|
|
5
|
+
import { collectTestPreloads } from './collect-test-preloads.ts';
|
|
5
6
|
import { collectWorkspaceRoots } from './collect-workspace-roots.ts';
|
|
6
7
|
import type { OxcParserModule } from './oxc-parser-module.ts';
|
|
7
8
|
import { parseWorkspacePatterns } from './parse-workspace-patterns.ts';
|
|
8
9
|
import { readOxcParser } from './read-oxc-parser.ts';
|
|
10
|
+
import { readWorkspacePackages } from './read-workspace-packages.ts';
|
|
9
11
|
|
|
10
12
|
export interface TestLayoutCheckOptions {
|
|
11
13
|
readonly readTrackedPaths: () => Promise<readonly string[]>;
|
|
@@ -54,21 +56,35 @@ export async function runTestLayoutCheck(options: TestLayoutCheckOptions): Promi
|
|
|
54
56
|
.map(async (path) => ({ path, text: await options.readText(path) })),
|
|
55
57
|
);
|
|
56
58
|
|
|
57
|
-
const
|
|
59
|
+
const workspaceRoots =
|
|
60
|
+
workspaces.kind === 'single' ? [] : collectWorkspaceRoots(trackedPaths, workspaces.patterns);
|
|
58
61
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
workspaces:
|
|
64
|
-
workspaces.kind === 'single'
|
|
65
|
-
? []
|
|
66
|
-
: collectWorkspaceRoots(trackedPaths, workspaces.patterns),
|
|
67
|
-
isWorkspaceRepo: workspaces.kind === 'workspaces',
|
|
68
|
-
laneSuffixes: collectLaneSuffixes(oxlintConfigText, rigConfig),
|
|
69
|
-
},
|
|
70
|
-
sources,
|
|
62
|
+
const bunfigs = await Promise.all(
|
|
63
|
+
trackedPaths
|
|
64
|
+
.filter((path) => posix.basename(path) === 'bunfig.toml')
|
|
65
|
+
.map(async (path) => ({ path, text: await options.readText(path) })),
|
|
71
66
|
);
|
|
67
|
+
|
|
68
|
+
const testPreloads = collectTestPreloads(bunfigs);
|
|
69
|
+
|
|
70
|
+
const workspacePackages = await readWorkspacePackages(workspaceRoots, options.readText);
|
|
71
|
+
const parser = await options.readParser();
|
|
72
|
+
|
|
73
|
+
faults = [
|
|
74
|
+
...testPreloads.faults,
|
|
75
|
+
...collectTestLayoutFaults(
|
|
76
|
+
parser,
|
|
77
|
+
{
|
|
78
|
+
trackedPaths,
|
|
79
|
+
workspaces: workspaceRoots,
|
|
80
|
+
isWorkspaceRepo: workspaces.kind === 'workspaces',
|
|
81
|
+
laneSuffixes: collectLaneSuffixes(oxlintConfigText, rigConfig),
|
|
82
|
+
testPreloads: testPreloads.preloads,
|
|
83
|
+
workspacePackages,
|
|
84
|
+
},
|
|
85
|
+
sources,
|
|
86
|
+
),
|
|
87
|
+
];
|
|
72
88
|
} catch (error) {
|
|
73
89
|
options.writeError(`test-layout: ${error instanceof Error ? error.message : String(error)}\n`);
|
|
74
90
|
|
package/src/test-layout/types.ts
CHANGED
|
@@ -4,6 +4,17 @@ export interface SourceFile {
|
|
|
4
4
|
readonly text: string;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
+
export interface WorkspacePackage {
|
|
8
|
+
// The workspace folder, relative to the repo root.
|
|
9
|
+
readonly root: string;
|
|
10
|
+
|
|
11
|
+
// The `name` of its package.json, or an empty string when it has none.
|
|
12
|
+
readonly name: string;
|
|
13
|
+
|
|
14
|
+
// Whether its package.json has `"private": true`.
|
|
15
|
+
readonly isPrivate: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
7
18
|
export interface TestLayout {
|
|
8
19
|
// Every path git tracks.
|
|
9
20
|
readonly trackedPaths: readonly string[];
|
|
@@ -16,4 +27,11 @@ export interface TestLayout {
|
|
|
16
27
|
|
|
17
28
|
// The suffixes that lanes use, each with its dot, such as `.browser`.
|
|
18
29
|
readonly laneSuffixes: readonly string[];
|
|
30
|
+
|
|
31
|
+
// The files that a `[test] preload` entry of a bunfig.toml names by a relative path, relative to
|
|
32
|
+
// the repo root. They are test code.
|
|
33
|
+
readonly testPreloads: readonly string[];
|
|
34
|
+
|
|
35
|
+
// The name and privacy of each workspace's package.json.
|
|
36
|
+
readonly workspacePackages: readonly WorkspacePackage[];
|
|
19
37
|
}
|