Skip to content

Tags: goccy/go-yaml

Tags

v1.19.2

Toggle v1.19.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix anchor reference regression in nested structures (#839)

* Add failing test for anchor reference regression

This test demonstrates a regression in v1.16.0 where anchors defined
in unmapped struct fields cannot be referenced using direct aliases
in nested map structures.

The test currently fails with:
  could not find alias \"base_url\"

This regression was introduced by PR #660 which removed the fallback
to anchorNodeMap when resolving aliases.

Test case:
- Anchor defined in 'shared' field (not mapped to struct)
- Direct alias reference in nested structure: defaults.http.url: *base_url
- This pattern works in v1.15.0 but fails in v1.16.0+

Note: Existing tests only cover merge keys (<<:) which still work.
This test covers direct alias references which are broken.

* Fix anchor reference regression in nested structures

This fixes the regression demonstrated by TestDecoder_AnchorInUnmappedField
where anchors defined in unmapped struct fields could not be referenced
using direct aliases in nested map structures.

* Remove redundant aliasName variable

As suggested by @goccy, eliminate the redundant aliasName variable
and use the existing text variable instead, which holds the same value.

https://github.com/goccy/go-yaml/pull/839/changes#r2670489037

v1.19.1

Toggle v1.19.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Support line comment for flow sequence or flow map (#834)

* support line comment for flow sequence or flow map

* fix lint error

* fix bytes unmarshaler for flow sequence or flow map with line comment

v1.19.0

Toggle v1.19.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add support for RawMessage, similar to json.RawMessage (#790)

* Add support for RawMessage, similar to json.RawMessage

This adds a type that users can use to refer to raw data in the yaml for
deferred decoding.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>

* test: add suggested cases from #668

---------

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Co-authored-by: Brian Goff <cpuguy83@gmail.com>

v1.18.0

Toggle v1.18.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Update custom marshaler and unmarshaler to accept context (#745)

* feat: Update custom marshaler and unmarshaler to accept context

* Add tests for custom marshaler and unmarshaler with context

v1.17.1

Toggle v1.17.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix unmarshaler with comment (#683)

v1.17.0

Toggle v1.17.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix comment map with no body (#682)

v1.16.0

Toggle v1.16.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix tab character handling ( if ignore the tab character, do not incr…

…ement the column number ) (#676)

* if ignore the tab character, do not increment the column number

* apply `npm audit fix`

* fix lint error

v1.15.23

Toggle v1.15.23's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix encoding of string that contains "- " (#657)

* fix encoding of string that contains "- "

* fix test case

v1.15.22

Toggle v1.15.22's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix format with empty value (#654)

v1.15.21

Toggle v1.15.21's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix format indent (#653)

* fix indent of formatted text

* add space to origin buffer for implicit null token