mirror of
https://github.com/supabase/supabase.git
synced 2026-09-02 22:58:28 +08:00
chore(studio): keep useTrackExperimentExposure across experiment gaps (#49765)
## Summary Adds a narrow knip suppression so `hooks/misc/useTrackExperimentExposure.ts` isn't flagged as an unused file when no experiment is currently consuming it. ## Why Different from the other files #49719 cleaned up. Those were one-off feature code (specific banners, mutations, table rows) — genuinely dead when their feature was removed. This hook is **shared experiment plumbing**: every A/B experiment plugs into it, and we run experiments frequently. Gaps between experiments are normal. Deleting and re-adding it each cycle: - Churns the codebase for no real cleanup value - Adds review surface to every next experiment PR (has to also add the hook back) - Caused a stacked-merge race today — #49719 deleted it, #49534 reintroduced a usage in `plan-presentation.ts`. Both PRs' CI ran green on their own bases, but merging both broke master's typecheck + Studio deploy. Fixed in #49763. ## What this changes One entry in `knip.jsonc` under `workspaces["apps/studio"].ignoreIssues`: \`\`\`jsonc "hooks/misc/useTrackExperimentExposure.ts": ["files"] \`\`\` `ignoreIssues` (not `ignore`) is the right knob per the config's own guidance — it suppresses only the "unused file" issue for this specific path, while knip still traces the file's imports so anything it depends on stays honestly tracked. ## Test plan - [ ] `pnpm knip --workspace apps/studio` still clean - [ ] With no experiment referencing the hook, knip does not report it
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
// read are documentation of the valid values, not dead code. Scoped to
|
||||
// this file so `enumMembers` keeps working everywhere else.
|
||||
"data/database/constraints-query.ts": ["enumMembers"],
|
||||
"hooks/misc/useTrackExperimentExposure.ts": ["files"],
|
||||
},
|
||||
// `vercel` is a globally installed CLI used by the `deploy:staging` script
|
||||
"ignoreBinaries": ["vercel"],
|
||||
|
||||
Reference in New Issue
Block a user