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

Update to js-yaml v4 #137

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

pelleknaap
Copy link

@pelleknaap pelleknaap commented Feb 6, 2022

Updating to js-yaml 4.1.0 will dramatically reduce bundle size (~70%) and only requires replacing two function names.

@pelleknaap
Copy link
Author

See #136 for more info

@gr2m
Copy link

gr2m commented Feb 18, 2022

I published https://www.npmjs.com/package/@gr2m/gray-matter for the time being.

You also need to update test/parse-custom.js and examples/sections.js

@cloudhead
Copy link

cloudhead commented Mar 11, 2022

This fixes a bug with numbers as well: currently, 024 would be treated as octal and result in 20, but according to the YAML spec this is not correct: 0o is the correct prefix. This was fixed in js-yaml v4.

@robertmassaioli any chance this could be merged?

@pixelass
Copy link

@jonschlinkert Can we get this merged? We use js-yaml alongside gray-matter (to prevent using several packages for yaml).

Right now we are forced to use v3 of js-yaml until this is merged ❤️

@jonschlinkert
Copy link
Owner

jonschlinkert commented Apr 27, 2024 via email

@pixelass
Copy link

@jonschlinkert I fully agree, I removed yaml and switched to js-yaml for the sole reason of preventing duplicate packages for parsing yaml.

It looks like a rather easy refactor: https://github.com/jonschlinkert/gray-matter/blob/master/lib/engines.js#L15-L18

I can see if I can spin up a PR for that, if you're open.

@pixelass
Copy link

Looks like someone already did the work and was waiting for a response?

#147

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.

5 participants