mapbox / carto

fast CSS-like map stylesheets
https://cartocss.readthedocs.io/
Apache License 2.0
652 stars 129 forks source link

lib/carto/mml.js: FIX: Error: Function yaml.safeLoad is removed in js… #514

Open josch opened 2 years ago

josch commented 2 years ago

…-yaml 4. Use yaml.load instead, which is now safe by default.

This makes the code compatible with js-yaml >= 4.

gravitystorm commented 2 years ago

This PR, as it currently stands, would be using the unsafe load method from js-yaml 3.x . We would need to make the change from safeLoad to load at the same time as upgrading the package.json file to use the 4.x series.

josch commented 2 years ago

This PR, as it currently stands, would be using the unsafe load method from js-yaml 3.x . We would need to make the change from safeLoad to load at the same time as upgrading the package.json file to use the 4.x series.

Yes. I'll leave it up to you to make the switch. I'm just forwarding a patch that I apply to the Debian package of carto because in Debian we can only ship one version of each package, so we have carto use the latest version of js-yaml which is 4.x.