You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a large monorepo, and frequently run dedupe on some packages. Recently yarn dedupe resolve led to a key longer than 1024 chars, making the yaml invalid according to the yaml 1.2 spec, and failing to parse with other libraries (even js-yaml).
Yaml seems to implement its own yaml parser, syml, that isn't spec compliant. Dumping the object with js-yaml generates proper yaml. Is there anything special about syml that js-yaml can't do?
Self-service
Describe the bug
I have a large monorepo, and frequently run
dedupe
on some packages. Recentlyyarn dedupe resolve
led to a key longer than 1024 chars, making the yaml invalid according to the yaml 1.2 spec, and failing to parse with other libraries (evenjs-yaml
).Example:
The working way is to use
?
as a prefix and:
in a new line, and the key can be any length.E.g.
Yaml seems to implement its own yaml parser,
syml
, that isn't spec compliant. Dumping the object withjs-yaml
generates proper yaml. Is there anything special aboutsyml
thatjs-yaml
can't do?Example of parse error
Example with proper long key
To reproduce
Links above.
Environment
System: OS: macOS 12.2.1 CPU: (10) arm64 Apple M1 Max Binaries: Node: 16.13.1 - /private/var/folders/8r/75v81kkd78x69n_wmwh_1c2h0000gp/T/xfs-4f26fda1/node Yarn: 3.1.1 - /private/var/folders/8r/75v81kkd78x69n_wmwh_1c2h0000gp/T/xfs-4f26fda1/yarn npm: 8.1.2 - ~/.nvm/version/npm
Additional context
No response
The text was updated successfully, but these errors were encountered: