jonschlinkert/gray-matter

Update to js-yaml 4.1.0 (was 3.13.0)

pelleknaap opened this issue · 1 comments

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/gray-matter@4.0.3 and https://bundlephobia.com/package/js-yaml@4.1.0 .

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.