Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions ui/scripts/__tests__/check-node-esm-load.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,24 +369,24 @@ describe('the scope this gate ratchets, now that the emit question is answered',
// sources — so nothing live left the leg with it. The sources keep a
// STRICTER guard than this heuristic: that config pins `nodenext`, under
// which a missing relative extension is TS2835 in the package's own build.
const dir = path.join(REPO_ROOT, 'packages/fields');
const build = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf8')).scripts.build;
const pkgDir = path.join(REPO_ROOT, 'packages/fields');
const build = JSON.parse(fs.readFileSync(path.join(pkgDir, 'package.json'), 'utf8')).scripts.build;

expect(effectiveNoEmit(path.join(dir, 'tsconfig.json'))).toBe(true);
expect(buildPreservesSpecifiers(build, dir)).toBe(false);
expect(parseTsconfig(path.join(dir, 'tsconfig.json')).compilerOptions?.noEmit).toBeUndefined();
expect(effectiveNoEmit(path.join(pkgDir, 'tsconfig.json'))).toBe(true);
expect(buildPreservesSpecifiers(build, pkgDir)).toBe(false);
expect(parseTsconfig(path.join(pkgDir, 'tsconfig.json')).compilerOptions?.noEmit).toBeUndefined();
});

it('keeps `@object-ui/auth` in the leg on its DECLARED noEmit, not on a catch', () => {
// Its config throws under the old reader too, so it was in the leg by
// accident. It declares `"noEmit": false` outright, so the verdict is
// unchanged — what changes is that it is now a reading.
const dir = path.join(REPO_ROOT, 'packages/auth');
const build = JSON.parse(fs.readFileSync(path.join(dir, 'package.json'), 'utf8')).scripts.build;
const pkgDir = path.join(REPO_ROOT, 'packages/auth');
const build = JSON.parse(fs.readFileSync(path.join(pkgDir, 'package.json'), 'utf8')).scripts.build;

expect(parseTsconfig(path.join(dir, 'tsconfig.json')).compilerOptions?.noEmit).toBe(false);
expect(effectiveNoEmit(path.join(dir, 'tsconfig.json'))).toBe(false);
expect(buildPreservesSpecifiers(build, dir)).toBe(true);
expect(parseTsconfig(path.join(pkgDir, 'tsconfig.json')).compilerOptions?.noEmit).toBe(false);
expect(effectiveNoEmit(path.join(pkgDir, 'tsconfig.json'))).toBe(false);
expect(buildPreservesSpecifiers(build, pkgDir)).toBe(true);
});
});

Expand Down
2 changes: 1 addition & 1 deletion ui/scripts/__tests__/markdown-test-inputs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const [TYPE_CHECK_STEP, TEST_STEP, DIST_PINS_STEP, E2E_STEP] = STEPS;

type Outcome = { shouldRun: string; log: string };

let scratch = '';
let scratch: string;

function git(cwd: string, ...args: string[]): void {
execFileSync('git', args, { cwd, stdio: 'pipe' });
Expand Down
2 changes: 1 addition & 1 deletion ui/scripts/__tests__/select-affected-tests-wiring.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function parseOutputs(text: string): Record<string, string> {
return outputs;
}

let scratch = '';
let scratch: string;
const nodeDir = path.dirname(process.execPath);

/** Write an executable stand-in for `name` into a fresh bin directory. */
Expand Down
Loading