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

Replace line-column with vfile-location #1466

Merged
merged 2 commits into from Nov 21, 2020
Merged

Replace line-column with vfile-location #1466

merged 2 commits into from Nov 21, 2020

Conversation

TrySound
Copy link
Member

vfile-location is dependency free and quite fresh package.
https://github.com/vfile/vfile-location

line-column has outdated dependencies and was not touched in 5 years.
https://github.com/io-monad/line-column

vfile-location is dependency free and quite fresh package.
https://github.com/vfile/vfile-location

line-column has outdated dependencies and was not touched in 5 years.
https://github.com/io-monad/line-column
@TrySound TrySound requested a review from ai November 21, 2020 16:19
lib/input.d.ts Outdated
fromOffset (offset: number): { line: number; col: number } | null
fromOffset (
offset: number
): { offset?: number; line?: number; column?: number }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can’t change public API. Let’s convert object.

let position = finder.toPoint(i)
return {
line: position.line,
col: position.column
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add TODO here to make api consistent in v9?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am using issue for that

@ai
Copy link
Member

ai commented Nov 21, 2020

LGTM. Will release it a few hours later.

@ai ai merged commit b6351d5 into master Nov 21, 2020
@ai ai deleted the vfile-location branch November 21, 2020 18:27
@ai
Copy link
Member

ai commented Nov 21, 2020

Released in 8.1.9. Thanks.

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