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

todo: switch yaml libraries #114

Open
jonschlinkert opened this issue Jan 26, 2021 · 4 comments
Open

todo: switch yaml libraries #114

jonschlinkert opened this issue Jan 26, 2021 · 4 comments

Comments

@jonschlinkert
Copy link
Owner

I've spent quite a bit of time reviewing the code in https://github.com/eemeli/yaml, it's amazing. Very well done @eemeli!

If someone wants to do a PR to swap js-yaml for yaml, that would be great. Otherwise I'll do it when I get a chance.

@robertmassaioli
Copy link
Collaborator

robertmassaioli commented Jan 26, 2021

For those of us that have not read it yet, what's amazing about the code? (Now considering if I should also try it for other projects) And would this require a major version bump because potentially the two yaml libraries behave differently?

@jonschlinkert
Copy link
Owner Author

jonschlinkert commented Jan 28, 2021

what's amazing about the code?

Thanks for asking!

  • the code is well written, well organized, and well tested
  • The documentation is awesome
  • the API is nice. From basic methods like parse and stringify, to more advanced methods for getting the CST or YAML.Document
  • loads 20-40ms faster than js-yaml

The only small gripe I have is that the package is published with browser code, which adds 299Kb to the download and should be released separately. But IMHO that's not important enough to dissuade me.

because potentially the two yaml libraries behave differently?

I'm not aware of any differences in expected output, and the comprehensive test suite and documentation indicate that yaml will be a drop-in replacement.

@sakulstra
Copy link

@jonschlinkert any chance of merging and releasing this?
#147

@remcohaszing
Copy link

I'm less concerned about library size and performance. The biggest reason to prefer yaml over js-yaml, is that it's compliant with the YAML spec.

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

4 participants