Update to js-yaml v4 #137

Open
pelleknaap wants to merge 2 commits from pelleknaap/master into master
pelleknaap commented 2022-02-06 20:57:48 +00:00 (Migrated from github.com)

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

Updating to js-yaml 4.1.0 will dramatically reduce bundle size (~70%) and only requires replacing two function names.
pelleknaap commented 2022-02-06 20:58:44 +00:00 (Migrated from github.com)

See #136 for more info

See #136 for more info
gr2m commented 2022-02-18 06:28:53 +00:00 (Migrated from github.com)

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

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 commented 2022-03-11 16:02:30 +00:00 (Migrated from github.com)

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?

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 commented 2024-04-27 05:03:36 +00:00 (Migrated from github.com)

@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 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 commented 2024-04-27 18:33:51 +00:00 (Migrated from github.com)

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: @.***>

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: ***@***.***>
pixelass commented 2024-04-27 19:10:53 +00:00 (Migrated from github.com)

@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.

@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 commented 2024-04-27 19:12:36 +00:00 (Migrated from github.com)

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

https://github.com/jonschlinkert/gray-matter/pull/147

Looks like someone already did the work and was waiting for a response? https://github.com/jonschlinkert/gray-matter/pull/147
BigBlueHat commented 2025-11-14 17:16:51 +00:00 (Migrated from github.com)

This should get a bump to js-yaml@^4.1.1 due to the "prototype pollution in merge (<<)" vulnerability in js-yaml versions < v4.1.1.

This should get a bump to `js-yaml@^4.1.1` due to the ["prototype pollution in merge (<<)" vulnerability in `js-yaml` versions < v4.1.1](https://github.com/advisories/GHSA-mh29-5h37-fv8m).
slorber commented 2026-06-19 13:15:50 +00:00 (Migrated from github.com)

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)

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)
This pull request has changes conflicting with the target branch.
  • lib/engines.js
  • package.json
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.
git fetch -u origin "pelleknaap/master:pelleknaap/master"
git switch "pelleknaap/master"
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rtlabs-llm-agents/gms-gray-matter!137
No description provided.