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

Remove Babel dependency #27

Closed
Keavon opened this issue Apr 10, 2021 · 4 comments
Closed

Remove Babel dependency #27

Keavon opened this issue Apr 10, 2021 · 4 comments

Comments

@Keavon
Copy link

Keavon commented Apr 10, 2021

Babel is not necessary. It should be removed. It sucks having it included in random sub-sub-sub dependencies, which this package is.

@sindresorhus
Copy link
Owner

Babel is not a dependency, @babel/code-frame is.

@Keavon
Copy link
Author

Keavon commented Apr 10, 2021

I see, thanks for pointing out that there's a difference. Could you please excuse my ignorance and describe briefly what @babel/code-frame does? Unfortunately the website for it doesn't actually describe that and I can't find anything else from researching it. What necessary function does it perform?

For a little bit of background context, I was searching my dependency tree for Babel because I know it is notoriously bad at bloating the dependency chain of projects. I didn't realize @babel/code-frame is distinct from the rest of Babel, but now I'm wondering what its relationship is with the rest of Babel and the ecosystem.

Thank you!

@sindresorhus
Copy link
Owner

It shows the source code of where the error originated with an arrow pointing to it, to make errors more user-friendly. See an example in the readme: https://github.com/sindresorhus/parse-json#usage

@Keavon
Copy link
Author

Keavon commented Apr 10, 2021

Ah I see, thank you for explaining! Yes, I definitely understand how that's a vital dependency for parse-json. It seems like they should just release that as its own package outside the Babel namespace, at least to avoid scaring people like me about how much Babel is prevalent in project dependency trees (i.e. it isn't, but it looked like it!). Cheers!

@Keavon Keavon closed this as completed Apr 10, 2021
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

No branches or pull requests

2 participants