Migrate renamed/removed preset names inside ignorePresets, not just extends
#44576
tngwoerleij
started this conversation in
Suggest an Idea
Replies: 1 comment
-
|
Sounds good. PR Welcome |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Tell us more.
Is your feature request related to a problem? Please describe
ExtendsMigration(lib/config/migrations/custom/extends-migration.ts) already rewrites preset names inextendswhen a preset has been renamed or removed, based on theremovedPresetsmap inlib/config/presets/common.ts(and on the user-configuredmigratePresetsoption). However, there is no equivalent migration forignorePresets.This causes silent breakage when a preset used in
ignorePresetsgets renamed. For example,replacements:ojdbc10-to-ojdbc11was renamed toreplacements:ojdbc-to-ojdbc11:Config that does:
{ "extends": ["config:recommended"], "ignorePresets": ["replacements:ojdbc10-to-ojdbc11"] }gets the
extendsentries migrated correctly, butignorePresetskeeps the old, now-nonexistent preset name. Since the ignore list is matched by exact string against the resolved preset name (seeshouldResolvePresetinlib/config/presets/index.ts), the entry silently stops matching anything — the preset is no longer ignored, and previously-suppressed config from the shared preset reappears without any warning or error.Describe the solution you'd like
Extend the config migrations to also rewrite preset names inside
ignorePresets, using the same rename/removal mapping (removedPresets+migratePresets) thatExtendsMigrationalready uses.(This discussion post was created with the help of Claude)
Beta Was this translation helpful? Give feedback.
All reactions