-
-
Notifications
You must be signed in to change notification settings - Fork 526
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
fix(migrate): properly handle rule removal and insertion #3207
Conversation
42f2099
to
9ab5f71
Compare
9ab5f71
to
6b290f7
Compare
crates/biome_migrate/tests/specs/migrations/nurseryRules/middleToExistingGroup.json.snap
Outdated
Show resolved
Hide resolved
I'm not sure what you mean, |
It's defined in the
|
Oh, shoot, that's a mistake. It was meant for promotion, discussed it and decided to revert the change. I forgot to revert that too. We should remove it, it's a bug |
I will fix it in this PR. Anyway it's a good bug because it helps us catch this bug :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a suggestion. Thank you for fixing this! I admit, I wasn't expecting a case of double rules
Summary
npx @biomejs/biome migrate
command crashes #3179.biome migrate
can now properly handle the comma separators when removing stale nursery rules from the nursery group.nursery
group,biome migrate
now only removes the source rule from thenursery
group to avoid duplicate keys in the target group.useImportRestrictions
, see fix(migrate): properly handle rule removal and insertion #3207 (comment)Sorry about the diff. I had to rename most of the variables to understand the code.
Test Plan
Added several test cases where the nursery rule to migrate is present in different positions. I also tested the repo provided in #3179.