@smoothbricks/nx-plugin 0.4.28 → 0.4.30
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 +277 -89
- package/dist/bin/smoo-nx-test-clocks.d.ts +3 -0
- package/dist/bin/smoo-nx-test-clocks.d.ts.map +1 -0
- package/dist/bin/smoo-nx-test-clocks.js +28 -0
- package/dist/bounded-test-policy.d.ts +8 -8
- package/dist/bounded-test-policy.d.ts.map +1 -1
- package/dist/bounded-test-policy.js +18 -30
- package/dist/cargo-closure-input.d.ts +23 -0
- package/dist/cargo-closure-input.d.ts.map +1 -1
- package/dist/cargo-closure-input.js +41 -9
- package/dist/cargo-source-hash.d.ts.map +1 -1
- package/dist/cargo-source-hash.js +42 -19
- package/dist/ensure-built-receipt.d.ts +40 -6
- package/dist/ensure-built-receipt.d.ts.map +1 -1
- package/dist/ensure-built-receipt.js +297 -159
- package/dist/ensure-built-witness.d.ts +65 -4
- package/dist/ensure-built-witness.d.ts.map +1 -1
- package/dist/ensure-built-witness.js +2237 -23
- package/dist/ensure-built.d.ts +99 -1
- package/dist/ensure-built.d.ts.map +1 -1
- package/dist/ensure-built.js +45 -56
- package/dist/executors/bounded-exec/cpu-pool.d.ts +22 -7
- package/dist/executors/bounded-exec/cpu-pool.d.ts.map +1 -1
- package/dist/executors/bounded-exec/cpu-pool.js +51 -22
- package/dist/executors/bounded-exec/executor.d.ts +12 -3
- package/dist/executors/bounded-exec/executor.d.ts.map +1 -1
- package/dist/executors/bounded-exec/executor.js +174 -51
- package/dist/executors/bounded-exec/no-space.d.ts +8 -0
- package/dist/executors/bounded-exec/no-space.d.ts.map +1 -0
- package/dist/executors/bounded-exec/no-space.js +31 -0
- package/dist/executors/bounded-exec/ram-temp.d.ts +20 -11
- package/dist/executors/bounded-exec/ram-temp.d.ts.map +1 -1
- package/dist/executors/bounded-exec/ram-temp.js +42 -17
- package/dist/executors/bounded-exec/verdict.d.ts +34 -4
- package/dist/executors/bounded-exec/verdict.d.ts.map +1 -1
- package/dist/executors/bounded-exec/verdict.js +54 -3
- package/dist/generators/bun-test-tracing/generator.js +2 -2
- package/dist/graph-input-contract.d.ts +102 -0
- package/dist/graph-input-contract.d.ts.map +1 -0
- package/dist/graph-input-contract.js +637 -0
- package/dist/index.d.ts +12 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -3
- package/dist/managed-files/ci-workflow.d.ts.map +1 -1
- package/dist/managed-files/ci-workflow.js +5 -2
- package/dist/managed-files/publish-workflow.d.ts +11 -1
- package/dist/managed-files/publish-workflow.d.ts.map +1 -1
- package/dist/owned-installation.d.ts +14 -0
- package/dist/owned-installation.d.ts.map +1 -0
- package/dist/owned-installation.js +324 -0
- package/dist/producer-receipts.d.ts +19 -0
- package/dist/producer-receipts.d.ts.map +1 -0
- package/dist/producer-receipts.js +926 -0
- package/dist/test-backstop.d.ts +9 -0
- package/dist/test-backstop.d.ts.map +1 -0
- package/dist/test-backstop.js +10 -0
- package/dist/test-clock-policy.d.ts +30 -0
- package/dist/test-clock-policy.d.ts.map +1 -0
- package/dist/test-clock-policy.js +686 -0
- package/dist/testing.d.ts +8 -0
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +66 -1
- package/managed/raw/patches/nx@23.2.1.patch +328 -50
- package/managed/raw/tooling/direnv/developer-links.ts +148 -29
- package/managed/raw/tooling/direnv/devenv.smoo.nix +7 -7
- package/managed/raw/tooling/direnv/github-actions-bootstrap.sh +14 -5
- package/managed/raw/tooling/direnv/linked-snapshots.ts +206 -40
- package/managed/raw/tooling/direnv/repo-path +15 -2
- package/managed/raw/tooling/direnv/setup-environment.ts +179 -115
- package/managed/templates/github/actions/cache-node-modules/action.yml +9 -0
- package/managed/templates/github/actions/setup-devenv/action.yml +63 -7
- package/nextest.toml +1 -1
- package/package.json +25 -9
- package/src/__tests__/cargo-closure-fixture.ts +113 -0
- package/src/__tests__/counted-cargo.ts +8 -25
- package/src/__tests__/directory-change.ts +27 -0
- package/src/__tests__/fixture-nx-env.ts +7 -0
- package/src/__tests__/owned-installation.ts +14 -0
- package/src/__tests__/past-tick.ts +12 -0
- package/src/bin/smoo-nx-bound-failures.test.ts +1 -1
- package/src/bin/smoo-nx-test-clocks.ts +29 -0
- package/src/bounded-test-policy.test.ts +36 -22
- package/src/bounded-test-policy.ts +18 -32
- package/src/bun-bootstrap.test.ts +1 -1
- package/src/cargo-closure-input.property.test.ts +50 -0
- package/src/cargo-closure-input.test.ts +73 -121
- package/src/cargo-closure-input.ts +47 -8
- package/src/cargo-closure-key.test.ts +239 -0
- package/src/cargo-resolve-cache.test.ts +168 -31
- package/src/cargo-source-hash.test.ts +78 -3
- package/src/cargo-source-hash.ts +48 -30
- package/src/cross-check-policy.test.ts +2 -2
- package/src/ensure-built-receipt.test.ts +111 -16
- package/src/ensure-built-receipt.ts +294 -149
- package/src/ensure-built-witness.test.ts +306 -13
- package/src/ensure-built-witness.ts +255 -24
- package/src/ensure-built.test.ts +228 -102
- package/src/ensure-built.ts +127 -66
- package/src/executors/bounded-exec/cpu-pool.test.ts +134 -32
- package/src/executors/bounded-exec/cpu-pool.ts +64 -20
- package/src/executors/bounded-exec/cpu-tokens.test.ts +2 -2
- package/src/executors/bounded-exec/disk-lease.test.ts +47 -13
- package/src/executors/bounded-exec/executor-host.test.ts +74 -52
- package/src/executors/bounded-exec/executor.test.ts +343 -97
- package/src/executors/bounded-exec/executor.ts +192 -56
- package/src/executors/bounded-exec/hang-diagnostics.test.ts +14 -8
- package/src/executors/bounded-exec/no-space.ts +40 -0
- package/src/executors/bounded-exec/progress.test.ts +1 -1
- package/src/executors/bounded-exec/ram-temp-host.test.ts +51 -21
- package/src/executors/bounded-exec/ram-temp.test.ts +92 -16
- package/src/executors/bounded-exec/ram-temp.ts +49 -20
- package/src/executors/bounded-exec/verdict.test.ts +127 -22
- package/src/executors/bounded-exec/verdict.ts +78 -3
- package/src/generators/bounded-test-targets/generator.test.ts +1 -3
- package/src/generators/bun-test-tracing/generator.test.ts +2 -2
- package/src/generators/bun-test-tracing/generator.ts +2 -2
- package/src/graph-input-contract.test.ts +379 -0
- package/src/graph-input-contract.ts +627 -0
- package/src/index.test.ts +3 -3
- package/src/index.ts +24 -3
- package/src/linked-snapshots.nx.test.ts +112 -30
- package/src/managed-files/ci-workflow.ts +5 -2
- package/src/managed-files/publish-workflow.ts +12 -1
- package/src/managed-files/repo-path.test.ts +44 -1
- package/src/managed-files/setup-devenv-free-disk.test.ts +95 -0
- package/src/nextest-code-bound.test.ts +23 -17
- package/src/nextest-extraction.test.ts +114 -4
- package/src/nextest-partitions.test.ts +7 -1
- package/src/nx-cache-restore-mtime.test.ts +2 -2
- package/src/nx-daemon-claim.test.ts +10 -8
- package/src/nx-daemon-idle-cpu.test.ts +0 -1
- package/src/nx-daemon-idle-policy.test.ts +61 -1
- package/src/nx-daemon-ignore-files.test.ts +2 -2
- package/src/nx-daemon-validity.test.ts +36 -22
- package/src/nx-dot-input-policy.test.ts +5 -5
- package/src/nx-files-archive-racy.test.ts +1 -1
- package/src/nx-incomplete-run-summary.test.ts +1 -1
- package/src/nx-plugin-load-errors.test.ts +2 -2
- package/src/nx-project-graph-errors.test.ts +70 -0
- package/src/nx-skipped-task-exit.test.ts +2 -2
- package/src/nx-store-resolution.test.ts +7 -25
- package/src/nx-task-output-lease.test.ts +3 -3
- package/src/nx-use-local.test.ts +7 -5
- package/src/owned-installation.ts +174 -0
- package/src/producer-receipts.test.ts +164 -0
- package/src/producer-receipts.ts +636 -0
- package/src/runtime-input.test.ts +1 -1
- package/src/serial-group-wiring.test.ts +4 -4
- package/src/task-results.test.ts +18 -16
- package/src/test-backstop.ts +11 -0
- package/src/test-clock-policy.test.ts +338 -0
- package/src/test-clock-policy.ts +708 -0
- package/src/test-timings.test.ts +2 -2
- package/src/testing.test.ts +5 -5
- package/src/testing.ts +67 -1
- package/src/typecheck-test-policy.test.ts +1 -1
- package/src/typescript-resolution.test.ts +76 -0
- package/test-timings.json +8 -0
package/src/test-timings.test.ts
CHANGED
|
@@ -15,8 +15,8 @@ import {
|
|
|
15
15
|
} from './test-timings.js';
|
|
16
16
|
|
|
17
17
|
const SHARD = (n: number) =>
|
|
18
|
-
`bun test --timeout=
|
|
19
|
-
const SUITE_ARGS = ['--timeout=
|
|
18
|
+
`bun test --timeout=0 --timings=test-timings.json --shard=${n}/2 --path-ignore-patterns='**/*-host.test.ts'`;
|
|
19
|
+
const SUITE_ARGS = ['--timeout=0', '--timings=test-timings.json', '--path-ignore-patterns=**/*-host.test.ts'];
|
|
20
20
|
|
|
21
21
|
function shardTargets(command: (n: number) => string = SHARD): Record<string, unknown> {
|
|
22
22
|
return {
|
package/src/testing.test.ts
CHANGED
|
@@ -123,7 +123,7 @@ it('stops the Nx daemon of a fixture whose body throws, and deletes its socket a
|
|
|
123
123
|
expect(await pidsWorkingIn(root)).toEqual([]);
|
|
124
124
|
expect(existsSync(root)).toBe(false);
|
|
125
125
|
expect(lstatSync(alias, { throwIfNoEntry: false })).toBeUndefined();
|
|
126
|
-
}
|
|
126
|
+
});
|
|
127
127
|
|
|
128
128
|
it('ends owned Nx processes before daemon publication and after daemon exit', async () => {
|
|
129
129
|
let root = '';
|
|
@@ -196,7 +196,7 @@ it('ends owned Nx processes before daemon publication and after daemon exit', as
|
|
|
196
196
|
}
|
|
197
197
|
});
|
|
198
198
|
expect(await pidsWorkingIn(root)).toEqual([]);
|
|
199
|
-
}
|
|
199
|
+
});
|
|
200
200
|
|
|
201
201
|
it('binds and connects through its short alias without granting the long fixture root a socket namespace', async () => {
|
|
202
202
|
let alias = '';
|
|
@@ -363,7 +363,7 @@ it('starts and connects to a fixture daemon through owned short aliases with a l
|
|
|
363
363
|
expect(daemon.some(({ pid }) => pid === record.processId)).toBe(true);
|
|
364
364
|
expect(await stillRunning(daemon)).not.toEqual([]);
|
|
365
365
|
});
|
|
366
|
-
}
|
|
366
|
+
});
|
|
367
367
|
|
|
368
368
|
/**
|
|
369
369
|
* The alias a killed fixture leaves: what {@link publishFixtureSocketDirectory} makes, planted for a workspace in
|
|
@@ -441,7 +441,7 @@ it("reclaims a dead run's Nx daemon, helper processes and socket aliases, and no
|
|
|
441
441
|
}
|
|
442
442
|
await rm(suiteDirectory, { recursive: true, force: true });
|
|
443
443
|
}
|
|
444
|
-
}
|
|
444
|
+
});
|
|
445
445
|
|
|
446
446
|
it('stops what works in every run it owns when the process is signalled, then dies of the signal', async () => {
|
|
447
447
|
const suite = `signal-regression-${process.pid}`;
|
|
@@ -506,4 +506,4 @@ setInterval(() => {}, 1 << 30);
|
|
|
506
506
|
await rm(suiteDirectory, { recursive: true, force: true });
|
|
507
507
|
await rm(otherParent, { recursive: true, force: true });
|
|
508
508
|
}
|
|
509
|
-
}
|
|
509
|
+
});
|
package/src/testing.ts
CHANGED
|
@@ -36,9 +36,16 @@ import { dirname, isAbsolute, join, sep } from 'node:path';
|
|
|
36
36
|
import { setTimeout as sleep } from 'node:timers/promises';
|
|
37
37
|
import { promisify } from 'node:util';
|
|
38
38
|
import { findNxWorkspaceRoot } from './ensure-built.js';
|
|
39
|
+
import { BOUNDED_TEST_IDLE_TIMEOUT_MS } from './test-backstop.js';
|
|
39
40
|
|
|
40
41
|
const run = promisify(execFile);
|
|
41
|
-
|
|
42
|
+
/**
|
|
43
|
+
* How long a stopped process may take to exit when no caller names a grace: the leg's no-progress backstop
|
|
44
|
+
* (specs/cowshed/08_testing.md), so the exit itself decides and a hung one is the leg's to report. A smaller literal
|
|
45
|
+
* here was a per-test deadline on the host's load: a fixture Nx daemon and its plugin worker, SIGTERMed, outlived
|
|
46
|
+
* 10 s on a loaded gate host and failed teardown of a test that had passed.
|
|
47
|
+
*/
|
|
48
|
+
const EXIT_TIMEOUT_MS = BOUNDED_TEST_IDLE_TIMEOUT_MS;
|
|
42
49
|
/** Under half of the SIGTERM-to-SIGKILL grace a bounded test leg gives, per round of signals. */
|
|
43
50
|
const SIGNALLED_GRACE_MS = 3_000;
|
|
44
51
|
const FIXTURE_HOME = 'smoothbricks-fixtures';
|
|
@@ -202,6 +209,65 @@ export async function pidsWorkingIn(root: string): Promise<number[]> {
|
|
|
202
209
|
}
|
|
203
210
|
}
|
|
204
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Every process of this user started with `TMPDIR` set to `root` or beneath it. Such a process
|
|
214
|
+
* writes there whatever its working directory: a ttsc plugin build copies its Go sources into
|
|
215
|
+
* `$TMPDIR` from a process working in its project, and Node and Bun write their compile cache
|
|
216
|
+
* there on the way out. The environment is the one the process was started with, which is the
|
|
217
|
+
* one its children inherit unless it changed it for them.
|
|
218
|
+
*/
|
|
219
|
+
export async function pidsWithTempIn(root: string): Promise<number[]> {
|
|
220
|
+
// The value as it follows `TMPDIR=`: `root` itself, with or without its trailing slash, or below it.
|
|
221
|
+
const names = (value: string) => value.startsWith(root) && ['', '/', ' '].includes(value.charAt(root.length));
|
|
222
|
+
switch (process.platform) {
|
|
223
|
+
case 'linux': {
|
|
224
|
+
const found: number[] = [];
|
|
225
|
+
for (const pid of (await readdir('/proc')).filter((name) => /^\d+$/.test(name))) {
|
|
226
|
+
const environ = await readFile(`/proc/${pid}/environ`, 'utf8').catch((error: unknown) => {
|
|
227
|
+
// Another user's process, or one that exited since the listing.
|
|
228
|
+
if (errorCode(error) === 'EACCES' || errorCode(error) === 'ENOENT' || errorCode(error) === 'ESRCH') {
|
|
229
|
+
return null;
|
|
230
|
+
}
|
|
231
|
+
throw error;
|
|
232
|
+
});
|
|
233
|
+
const entry = environ?.split('\0').find((variable) => variable.startsWith('TMPDIR='));
|
|
234
|
+
if (entry !== undefined && names(entry.slice('TMPDIR='.length))) {
|
|
235
|
+
found.push(Number(pid));
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return found;
|
|
239
|
+
}
|
|
240
|
+
case 'darwin': {
|
|
241
|
+
// `ps -E` follows each command line with the environment it was started with, as words
|
|
242
|
+
// separated by spaces, and only for this user's processes. A word `TMPDIR=<root>` is matched
|
|
243
|
+
// with what follows it in that word, so a root containing a space is still found whole. An
|
|
244
|
+
// argument spelled `TMPDIR=<root>` names the same directory and counts too: an `env` that
|
|
245
|
+
// sets it is about to run something there. `/bin/ps` by path: a procps `ps` has no `-E`.
|
|
246
|
+
const { stdout } = await run('/bin/ps', ['-E', '-ww', '-U', String(userInfo().uid), '-o', 'pid=,command='], {
|
|
247
|
+
maxBuffer: 256 * 1024 * 1024,
|
|
248
|
+
});
|
|
249
|
+
const token = ` TMPDIR=${root}`;
|
|
250
|
+
const found: number[] = [];
|
|
251
|
+
for (const line of stdout.split('\n')) {
|
|
252
|
+
const row = /^\s*(\d+) (.*)$/.exec(line);
|
|
253
|
+
if (row === null) {
|
|
254
|
+
continue;
|
|
255
|
+
}
|
|
256
|
+
const words = ` ${row[2]}`;
|
|
257
|
+
for (let at = words.indexOf(token); at !== -1; at = words.indexOf(token, at + 1)) {
|
|
258
|
+
if (names(words.slice(at + ' TMPDIR='.length))) {
|
|
259
|
+
found.push(Number(row[1]));
|
|
260
|
+
break;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return found;
|
|
265
|
+
}
|
|
266
|
+
default:
|
|
267
|
+
throw new Error(`No TMPDIR scan for ${process.platform}`);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
205
271
|
/**
|
|
206
272
|
* The Nx daemon `workspace` runs, the daemon first, then every process it
|
|
207
273
|
* started. Empty when the workspace records no daemon or the recorded one is
|
|
@@ -1139,7 +1139,7 @@ async function toolingShapedWorkspace(root: string): Promise<void> {
|
|
|
1139
1139
|
targets: {
|
|
1140
1140
|
test: {
|
|
1141
1141
|
executor: '@smoothbricks/nx-plugin:bounded-exec',
|
|
1142
|
-
options: { command: 'bun test --timeout=
|
|
1142
|
+
options: { command: 'bun test --timeout=0 direnv', cwd: '{projectRoot}' },
|
|
1143
1143
|
},
|
|
1144
1144
|
},
|
|
1145
1145
|
},
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { expect, it } from 'bun:test';
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { mkdir, realpath, symlink, writeFile } from 'node:fs/promises';
|
|
4
|
+
import { createRequire } from 'node:module';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { fixtureNxEnv, withNxFixture } from './__tests__/fixture-nx-env.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The project graph must not depend on which `typescript` Bun's isolated linker hoists. A package that requires
|
|
10
|
+
* `typescript` without declaring it (as @nx/js does) gets the copy in node_modules/.bun/node_modules, and beside the
|
|
11
|
+
* `@typescript/native` alias that can be TypeScript 7, whose package exports no compiler API. A publish runner hoisted
|
|
12
|
+
* it once: every project failed with "Cannot read properties of undefined (reading 'readFile')".
|
|
13
|
+
*
|
|
14
|
+
* The preload hoists TypeScript 7 for every undeclared `typescript` request, as that runner did, and leaves declared
|
|
15
|
+
* ones and path-anchored resolutions (Nx's resolveFromWorkspace) alone.
|
|
16
|
+
*/
|
|
17
|
+
const repositoryRoot = join(import.meta.dir, '../../..');
|
|
18
|
+
const nxEntry = join(repositoryRoot, 'node_modules/.bin/nx');
|
|
19
|
+
const require = createRequire(join(repositoryRoot, 'package.json'));
|
|
20
|
+
|
|
21
|
+
const HOIST_TYPESCRIPT_7 = `
|
|
22
|
+
const Module = require('node:module');
|
|
23
|
+
const { existsSync, readFileSync } = require('node:fs');
|
|
24
|
+
const { dirname, join } = require('node:path');
|
|
25
|
+
const native = ${JSON.stringify(require.resolve('@typescript/native'))};
|
|
26
|
+
function declaresTypescript(file) {
|
|
27
|
+
for (let directory = dirname(file); directory !== dirname(directory); directory = dirname(directory)) {
|
|
28
|
+
const manifest = join(directory, 'package.json');
|
|
29
|
+
if (!existsSync(manifest)) continue;
|
|
30
|
+
const json = JSON.parse(readFileSync(manifest, 'utf8'));
|
|
31
|
+
return ['dependencies', 'peerDependencies', 'optionalDependencies'].some((field) => json[field]?.typescript);
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
const resolve = Module._resolveFilename;
|
|
36
|
+
Module._resolveFilename = function (request, parent, isMain, options) {
|
|
37
|
+
if (request === 'typescript' && options?.paths === undefined && parent?.filename && !declaresTypescript(parent.filename)) {
|
|
38
|
+
return native;
|
|
39
|
+
}
|
|
40
|
+
return resolve.call(this, request, parent, isMain, options);
|
|
41
|
+
};
|
|
42
|
+
`;
|
|
43
|
+
|
|
44
|
+
for (const isolate of ['false', 'true']) {
|
|
45
|
+
it(`reads a test tsconfig whichever typescript is hoisted (isolated plugins: ${isolate})`, async () => {
|
|
46
|
+
await withNxFixture('nx-typescript-hoist-', async ({ workspace, socketDirectory }) => {
|
|
47
|
+
await symlink(await realpath(join(repositoryRoot, 'node_modules')), join(workspace, 'node_modules'), 'dir');
|
|
48
|
+
await writeFile(join(workspace, 'package.json'), JSON.stringify({ name: 'hoist', private: true }));
|
|
49
|
+
await writeFile(join(workspace, 'nx.json'), JSON.stringify({ plugins: ['@smoothbricks/nx-plugin'] }));
|
|
50
|
+
// An ESLint config makes the plugin read the test program to key lint on its sources.
|
|
51
|
+
await writeFile(join(workspace, 'eslint.config.mjs'), 'export default [];\n');
|
|
52
|
+
await mkdir(join(workspace, 'packages/example/src'), { recursive: true });
|
|
53
|
+
await writeFile(
|
|
54
|
+
join(workspace, 'packages/example/package.json'),
|
|
55
|
+
JSON.stringify({ name: 'example', private: true, scripts: { test: 'bun test' } }),
|
|
56
|
+
);
|
|
57
|
+
await writeFile(join(workspace, 'packages/example/tsconfig.test.json'), '{"include":["src/**/*.test.ts"]}\n');
|
|
58
|
+
await writeFile(join(workspace, 'packages/example/src/a.test.ts'), 'export {};\n');
|
|
59
|
+
const preload = join(workspace, 'hoist-typescript-7.cjs');
|
|
60
|
+
await writeFile(preload, HOIST_TYPESCRIPT_7);
|
|
61
|
+
|
|
62
|
+
const ran = spawnSync('node', [nxEntry, 'show', 'project', 'example', '--json'], {
|
|
63
|
+
cwd: workspace,
|
|
64
|
+
env: {
|
|
65
|
+
...fixtureNxEnv(workspace, socketDirectory),
|
|
66
|
+
NX_ISOLATE_PLUGINS: isolate,
|
|
67
|
+
NODE_OPTIONS: `--require ${preload}`,
|
|
68
|
+
},
|
|
69
|
+
encoding: 'utf8',
|
|
70
|
+
});
|
|
71
|
+
expect(ran.status, `${ran.stdout}${ran.stderr}`).toBe(0);
|
|
72
|
+
// Lint keys the test program's sources, which only reading tsconfig.test.json yields.
|
|
73
|
+
expect(ran.stdout).toContain('{workspaceRoot}/packages/example/src/a.test.ts');
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
}
|
package/test-timings.json
CHANGED
|
@@ -3,10 +3,16 @@
|
|
|
3
3
|
"files": {
|
|
4
4
|
"src/index.test.ts": 57872,
|
|
5
5
|
"src/nx-daemon-validity.test.ts": 46596,
|
|
6
|
+
"src/nx-project-graph-errors.test.ts": 32787,
|
|
7
|
+
"src/cargo-closure-key.test.ts": 22410,
|
|
6
8
|
"src/ensure-built.test.ts": 18391,
|
|
9
|
+
"src/graph-input-contract.test.ts": 16550,
|
|
7
10
|
"src/executors/bounded-exec/executor.test.ts": 12975,
|
|
8
11
|
"src/cargo-resolve-cache.test.ts": 11421,
|
|
12
|
+
"src/cargo-closure-input.property.test.ts": 10902,
|
|
9
13
|
"src/executors/bounded-exec/ram-temp.test.ts": 10766,
|
|
14
|
+
"src/producer-receipts.test.ts": 10581,
|
|
15
|
+
"src/typescript-resolution.test.ts": 10482,
|
|
10
16
|
"src/executors/napi-cross-toolchain/executor.test.ts": 10474,
|
|
11
17
|
"src/nx-daemon-claim.test.ts": 9477,
|
|
12
18
|
"src/cargo-source-hash.test.ts": 9179,
|
|
@@ -17,6 +23,7 @@
|
|
|
17
23
|
"src/executors/typescript-emit/executor.test.ts": 4856,
|
|
18
24
|
"src/linked-snapshots.nx.test.ts": 4462,
|
|
19
25
|
"src/nx-dot-input-policy.test.ts": 3918,
|
|
26
|
+
"src/test-clock-policy.test.ts": 3700,
|
|
20
27
|
"src/nx-daemon-ignore-files.test.ts": 3191,
|
|
21
28
|
"src/task-results.test.ts": 3168,
|
|
22
29
|
"src/task-history-namespace.test.ts": 2376,
|
|
@@ -52,6 +59,7 @@
|
|
|
52
59
|
"src/bun-bootstrap.test.ts": 378,
|
|
53
60
|
"src/ensure-built-witness.test.ts": 280,
|
|
54
61
|
"src/test-walk-policy.test.ts": 280,
|
|
62
|
+
"src/managed-files/setup-devenv-free-disk.test.ts": 277,
|
|
55
63
|
"src/package-target-policy.test.ts": 208,
|
|
56
64
|
"src/nextest-extraction.test.ts": 151,
|
|
57
65
|
"src/executors/bounded-exec/cpu-tokens.test.ts": 136,
|