Skip to content

Commit 1b3ea66

Browse files
committed
fix(console-intercept-disarm): spell ROOT_DIR_WATCH_HINTS as a literal array
check:watch-hint-literal refuses a declaration wrapped in Object.freeze. Claude-Session: https://claude.ai/code/session_01JQwxbXV6v4rbiDvvaaabhb Co-authored-by: Claude <noreply@anthropic.com>
1 parent a39185b commit 1b3ea66

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎scripts/check-console-intercept-disarm.mjs‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,14 @@ const VITEST_CONFIG_NAMES = [
133133
// at the first comment line in the `packages:` list, so the `ui` members below
134134
// it are not in this gate's population, and are not declared here either.
135135
//
136-
// ⛔ Hand-kept, and `scan()` holds it to the workspace file: a glob in
136+
// ⛔ A literal array, never computed from the globs (`check:watch-hint-literal`):
137+
// the derivation reads source text, so a computed list contributes no hint.
138+
// Hand-kept, and `main()` holds it to the workspace file: a glob in
137139
// `pnpm-workspace.yaml` with no pair here, or a pair here for a glob that file
138140
// no longer lists, is a finding (`watchHintDrift`). Not readable from the
139141
// repo-root files themselves — `pnpm-workspace.yaml` and `vitest.preset.mts`
140142
// carry no separator, so no spelling of them is a hint the derivation admits.
141-
export const ROOT_DIR_WATCH_HINTS = Object.freeze([
143+
export const ROOT_DIR_WATCH_HINTS = [
142144
'packages/*/package.json',
143145
'packages/*/vitest.config.*',
144146
'packages/apps/*/package.json',
@@ -161,7 +163,7 @@ export const ROOT_DIR_WATCH_HINTS = Object.freeze([
161163
'apps/*/vitest.config.*',
162164
'examples/*/package.json',
163165
'examples/*/vitest.config.*',
164-
]);
166+
];
165167

166168
const DISARM_RE = /\bdisableConsoleIntercept\s*:\s*true\b/;
167169
const REARM_RE = /\bdisableConsoleIntercept\s*:\s*false\b/;

0 commit comments

Comments
 (0)