diff --git a/CHANGELOG.md b/CHANGELOG.md index c5eb1ba..0e77602 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,17 @@ -# Unreleased +# 1.1.0 (October 2, 2024) -* The YAML decoder now exactly follows the [YAML specification](https://yaml.org/spec/1.2-old/spec.html#id2805071) when parsing integers. - **Note:** This removes support for `_` spaces as well as signed base8 and base16 values. +* The YAML decoder now exactly follows the [YAML specification](https://yaml.org/spec/1.2-old/spec.html#id2805071) when resolving the implied YAML tags for integers. ([#6](https://github.com/zclconf/go-cty-yaml/pull/6)) + + The new implementation matches the patterns in the specification, but it now has stricter integer resolution than the previous release. The primary goal of this library is to translate valid YAML syntax to and from `cty`'s type system and so deviation from the YAML grammar is treated typically as a bug to be fixed even if that means a change in behavior for existing callers that were dealing in invalid input. This further improves earlier work done in v1.0.2, which didn't quite match the spec. + + In particular: + + - Scalars containing underscores can no longer be resolved as integers. + - Octal and hexadecimal sequences must now start with exactly `Oo` and `0x` respectively to be resolved as integers; a leading sign (`+` or `-`) is accepted only for the decimal integer and float patterns. + + The YAML tag resolution process infers an implied type tag for each scalar value that isn't explicitly tagged. `go-cty-yaml` then uses the YAML tags (whether implied or explicit) to decide which `cty` type to use for each value in the result. + + The scalar values that are no longer resolved as numbers will now all be resolved as strings instead, and so calling applications can perform further parsing and transformation on the resulting strings to accept forms outside of those in the YAML specification, if required. # 1.0.3 (November 2, 2022)