jonschlinkert / gray-matter

Smarter YAML front matter parser, used by metalsmith, Gatsby, Netlify, Assemble, mapbox-gl, phenomic, vuejs vitepress, TinaCMS, Shopify Polaris, Ant Design, Astro, hashicorp, garden, slidev, saber, sourcegraph, and many others. Simple to use, and battle tested. Parses YAML by default but can also parse JSON Front Matter, Coffee Front Matter, TOML Front Matter, and has support for custom parsers. Please follow gray-matter's author: https://github.com/jonschlinkert
https://github.com/jonschlinkert
MIT License
3.97k stars 138 forks source link

feat: updating to use yaml #147

Open sakulstra opened 2 years ago

sakulstra commented 2 years ago

use yaml instead of js-yaml as requested in #145

@jonschlinkert are you sure yaml is smaller than js-yaml (for some reason bundlephobia is broken for yaml and vscode showing bigger package size, might be wrong due to shaking though)

yaml seems to behave slightly different as you can see in the two failing tests.

sakulstra commented 2 years ago

@jonschlinkert with #148 applied tests are passing.

jonschlinkert commented 2 years ago

are you sure yaml is smaller than js-yaml (for some reason bundlephobia is broken for yaml and vscode showing bigger package size

I'm not at all sure about that lol. Thank you for doing this and for bringing it to my attention. I was initially under the impression that yaml would be smaller, since js-yaml was massively bloated the last time I checked. They included all of their tests, test fixtures, browser code, etc. in the published package. Now that you have seen both, what is your recommendation?

edit: and also, thank you for taking the time to do this, and apologies for making you jump through hoops. I promise we'll get this merged and published as soon as we settle on which library to use.

sakulstra commented 2 years ago

Would in fact go with yaml - seems more solid to me.

sakulstra commented 2 years ago

@jonschlinkert any chance of getting this merged? :sweat_smile:

sakulstra commented 2 years ago

@jonschlinkert ping :sweat_smile:

sakulstra commented 2 years ago

@jonschlinkert :crying_cat_face: - quite a lot of ppl are using this library (1M downloads per week). Would be really good if this could be merged anytime soon.

sakulstra commented 1 year ago

@jonschlinkert ping on this, let me know if anything prevents merging.

benmccann commented 3 months ago

for some reason bundlephobia is broken for yaml

It no longer is. It shows yaml at 102.6 kB and js-yaml at 39 kB.