Skip to content

Commit aa174d1

Browse files
committed
fix(scripts): address review on the scripts typecheck change
- check-wiring.test.ts no longer claims typecheck skips scripts/: tsc now enforces the LAYERING_RULES record over every rule id - build-package-xcuitest.d.mts names the four platforms the build script accepts instead of any string Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016qAu53rMak1bXMuR5U2gF4
1 parent 247eb6e commit aa174d1

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
// Type surface for the plain-Node package runner build (it must stay runnable by bare `node`).
22
// Keep it in step with the exports of `./build-package-xcuitest.mjs`.
3-
export type PackageXcuitestBuild = { root: string; platform: string; derivedPath: string };
3+
/** The platforms `scripts/build-xcuitest-apple.sh` builds; it rejects any other value. */
4+
export type PackageXcuitestPlatform = 'ios' | 'macos' | 'tvos' | 'visionos';
5+
6+
export type PackageXcuitestBuild = {
7+
root: string;
8+
platform: PackageXcuitestPlatform;
9+
derivedPath: string;
10+
};
411

512
export function buildPackageXcuitest(
613
options?: Readonly<{
714
root?: string;
8-
platforms?: readonly string[];
15+
platforms?: readonly PackageXcuitestPlatform[];
916
build?: (build: PackageXcuitestBuild) => void;
1017
}>,
1118
): void;

‎scripts/layering/check-wiring.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// duplicate registration unrepresentable on its own (an object holds a key once, and oxlint's
44
// no-dupe-keys rejects the attempt), so what is left to check is the other direction: that the
55
// catalog and the registry still describe the same set of rules.
6-
// scripts/ is outside tsconfig.json's `include`, so the Record's exhaustiveness is an editor
7-
// signal, not a CI gate — this test is what fails the build when wiring goes missing.
6+
// `pnpm typecheck` enforces the Record's exhaustiveness over LAYERING_RULE_IDS; this test
7+
// also proves the runtime registry and catalog agree, key for key and in order.
88

99
import assert from 'node:assert/strict';
1010
import { test } from 'node:test';

0 commit comments

Comments
 (0)