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 4.1.0 (was 3.13.0) #136

Open
pelleknaap opened this issue Feb 6, 2022 · 1 comment
Open

Update to js-yaml 4.1.0 (was 3.13.0) #136

pelleknaap opened this issue Feb 6, 2022 · 1 comment

Comments

@pelleknaap
Copy link

pelleknaap commented Feb 6, 2022

Updating to js-yaml 4.1.0 will decrease bundle size.

According to Bundlephobia, the v4 release of js-yaml excludes the esprisma dependency. The exclusion dramatically reduces the bundle size of js-yaml and therefore gray-matter. See https://bundlephobia.com/package/[email protected] and https://bundlephobia.com/package/[email protected] .

The new version replaces the safeLoad and safeDump functions with the load and dump functions (both are safe by default now). Since gray-matter never used the old unsafe load function, we only have to replace the safeLoad function call with load.
See https://github.com/nodeca/js-yaml/blob/master/migrate_v3_to_v4.md for more information

I will make a PR with the changes.

@pelleknaap
Copy link
Author

See #137

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

1 participant