Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flushDeprecations merges detected deprecations with existing config #209

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simonihmig
Copy link
Contributor

Currently calling flushDeprecations() is destructive in that it ignores any existing config. Users would need to merge the detected deprecations with their existing config manually. Which is error prone, and does not scale for very large monorepos.

This change is doing the merge automatically. Only minor drawback is that we need to serialize the merged config with JSON.serialize, so it is getting returned with additional quotes e.g. { "handler": "silence", "matchId": "test" } instead of { handler: 'silence', matchId: 'test' }. But when using prettier, this will get auto-fixed anyway, so I think the trade-offs are positive here.

…nfig

Currently calling flushDeprecations() is destructive in that it ignores any existing config. Users would need to merge the detected deprecations with their existing config manually. Which is error prone, and does not scale for very large monorepos.

This change is doing the merge automatically. Only minor drawback is that we need to serialize the merged config with `JSON.serialize`, so it is getting returned as e.g. `{ "handler": "silence", "matchId": "test" }` instead of `{ handler: 'silence', matchId: 'test' }`. But when using prettier, this will get auto-fixed anyway, so I think the trade-offs are positive here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant