Replies: 2 comments 6 replies
-
This would also be nice for me. I migrated |
Beta Was this translation helpful? Give feedback.
0 replies
-
@outslept I certainly want to find the time to get #8326 over the line! |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, pnpm uses
js-yaml
which inconsistently mixes YAML 1.1 and 1.2 specifications. This is particularly relevant for workspace configurations where anchors and merge keys are commonly used.Here's a simple test showing the differences:
Output
As shown:
js-yaml
expands the merge key (<<
), treating it as a valid YAML 1.1 feature.yaml
preserves<<
as a plain key, because YAML 1.2 does not define merge semantics.This inconsistency can lead to surprises for users who expect their anchors/aliases to “just work,” or who assume that
pnpm-workspace.yaml
is parsed according to one YAML spec.Why consider yaml?
The yaml package:
I’ve been experimenting locally with pnpm-workspace.yaml and found a few inconsistencies due to this YAML parsing behavior. I wasn’t sure if this warranted a formal issue — but I’m happy to open one and provide more examples if helpful.
Also open to discussing further on Twitter or wherever is convenient!
If there's any plan to migrate from js-yaml to the yaml package in the future (or continuing efforts with #8326), I’d be more than happy to help with that effort as well.
Beta Was this translation helpful? Give feedback.
All reactions