You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make onSkip required, delete the raw-stderr default entirely
Three review rounds each turned up one more expandPluginPath call
site writing raw stderr mid-frame: the default onSkip was an optional
parameter with a silent, harmful fallback, so every call site was a
fresh chance to get it wrong and nothing caught it.
Delete defaultExpandSkip and make onSkip a required field on
ExpandPluginPathOptions. This turns every call site into a compile
error until it picks a handler on purpose, which is how this round
found the fourth instance: expandExistingPluginMembers called
expandPluginPath with no onSkip, reachable from runner.ts's startup
trust-migration path seven lines before the discovery call already
fixed, and from exec/runner.ts where raw stderr is legitimate.
expandExistingPluginMembers now takes a required onSkip too, so a
skipped member's reason still reaches diagnostics even though the
member itself is correctly dropped from the returned list (trust
decisions must not pre-grant a directory that could appear later).
Interactive callers pass expandSkipDiagnosticsHandler; exec passes an
explicit stderr writer built from the newly exported formatExpandSkip,
making that choice visible at its own call site instead of an
invisible library default.
expandSkipDiagnosticsHandler is now the ordinary handler (its
diagnostics parameter is required, no more undefined fallback), and
every internal call site that used to spread a conditional { onSkip }
object now always passes one.
Updated two pre-existing tests that asserted the old stderr-default
behavior to instead assert onSkip is required and receives every
skip, and added coverage for a skip reached through
expandExistingPluginMembers.
0 commit comments