switch from js-yaml to yaml
Context: Pointed out by @remcohaszing in x npm:yaml is much more spec-compliant than npm:js-yaml
The main reason for choosing js-yaml was that it is ~10x faster and it is important for recurring reads (especially for cases like markdown front matter) but if spec compliant is better I think switch would make sense.
You can see some reasoning in https://github.com/orgs/remarkjs/discussions/1006#discussioncomment-2955255. Also js-yaml hasn’t been updated for a while. It appears to be abandoned.
(seems pnpm is using js-yaml now too https://pnpm.io/package_json)
Another benefit of yaml over js-yaml is that it has a powerful AST API. It can preserve comments and to some extent formatting.
Yeah i agree comment alone is really good reason to move for us. Just mentioned as found about it today about pnpm.
I support this, I'm also looking for a great all in one solution for AST generation for all of these file types, specifically in the context of OpenAPI files.