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

feat(range): remove Range from the API #2882

Merged
merged 7 commits into from May 11, 2021
Merged

feat(range): remove Range from the API #2882

merged 7 commits into from May 11, 2021

Conversation

nicojs
Copy link
Member

@nicojs nicojs commented May 7, 2021

Remove Mutant.range from the plugin API. Plugin creators should rely on location instead (which has start and end positions). See changes in the TypeScript checker for an example.

The range property was a way to identify changed code. It was a tuple defined as [start: number, end: number]. As plugin creator, you had the opportunity to use this instead of location. We've chosen to remove it because having 2 ways to identify location is redundant and this will allow us to implement #322 in the future.

BREAKING CHANGE: The range property is no longer present on a mutant. Note, this is a breaking change for plugin creators only.

@nicojs nicojs added this to the 5.0 milestone May 8, 2021
@nicojs nicojs marked this pull request as ready for review May 9, 2021 20:16
@nicojs nicojs merged commit b578b22 into epic/v5 May 11, 2021
@nicojs nicojs deleted the remove-range branch May 11, 2021 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants