Update to js-yaml v4 #137
Loading…
Reference in a new issue
No description provided.
Delete branch "pelleknaap/master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Updating to js-yaml 4.1.0 will dramatically reduce bundle size (~70%) and only requires replacing two function names.
See #136 for more info
I published https://www.npmjs.com/package/@gr2m/gray-matter for the time being.
You also need to update
test/parse-custom.jsandexamples/sections.jsThis fixes a bug with numbers as well: currently,
024would be treated as octal and result in20, but according to the YAML spec this is not correct:0ois the correct prefix. This was fixed in js-yaml v4.@robertmassaioli any chance this could be merged?
@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 ❤️
I don’t want to use js-yaml at all. The yaml package is better IMHO.Sent from my iPhoneOn Apr 27, 2024, at 1:03 AM, Gregor Adams @.***> wrote: @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 ❤️
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
@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.
Looks like someone already did the work and was waiting for a response?
https://github.com/jonschlinkert/gray-matter/pull/147
This should get a bump to
js-yaml@^4.1.1due to the "prototype pollution in merge (<<)" vulnerability injs-yamlversions < v4.1.1.FYI there's a maintained fork here with this upgrade included: https://github.com/11ty/gray-matter
Already adopted by Eleventy and Docusaurus (see https://github.com/facebook/docusaurus/pull/12181)
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.