Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Pair not extend NodeBase; drop its prop forwarding #250

Merged
merged 5 commits into from Apr 1, 2021
Merged

Conversation

eemeli
Copy link
Owner

@eemeli eemeli commented Mar 28, 2021

This builds on top of #249, so the current commit log includes its changes as well.

BREAKING CHANGE: While the inheritance of the class is just an implementation detail, dropping the prop forwarding means that a user that previously set the commentBefore, comment or spaceBefore property of a pair will now need to set it for the appropriate key or value.

While adjusting the test suite for the changes, the somewhat surprising behaviour of multi-line comments on scalar values getting handled as commentBefore instead of comment is also dropped. Also, the behaviour of line comments in flow collections is significantly improved.

BREAKING CHANGE: The shape of FlowCollection items changes from `Token[]`
to `{ start, key, sep, value }[]`, so that it now matches the items of
BlockMap and BlockSequence. This means that the corresponding composer
is completely rewritten.
BREAKING CHANGE: While the inheritance of the class is just an
implementation detail, dropping the prop forwarding means that a user
that previously set the `commentBefore`, `comment` or `spaceBefore`
property of a pair will now need to set it for the appropriate key or
value.

While adjusting the test suite for the changes, the somewhat surprising
behaviour of multi-line comments on scalar values getting handled as
`commentBefore` instead of `comment` is also dropped.
@eemeli eemeli merged commit b4e3f98 into master Apr 1, 2021
@eemeli eemeli deleted the solo-pair branch April 1, 2021 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant