hashicorp/hcl
### [`v2.12.0`](https://togithub.com/hashicorp/hcl/blob/HEAD/CHANGELOG.md#v2120-April-22-2022)
[Compare Source](https://togithub.com/hashicorp/hcl/compare/v2.11.1...v2.12.0)
##### Enhancements
- hclsyntax: Evaluation of conditional expressions will now produce more precise error messages about inconsistencies between the types of the true and false result expressions, particularly in cases where both are of the same structural type kind but differ in their nested elements. ([#530](https://togithub.com/hashicorp/hcl/pull/530))
- hclsyntax: The lexer will no longer allocate a small object on the heap for each token. Instead, in that situation it will allocate only when needed to return a diagnostic message with source location information. ([#490](https://togithub.com/hashicorp/hcl/pull/490))
- hclwrite: New functions `TokensForTuple`, `TokensForObject`, and `TokensForFunctionCall` allow for more easily constructing the three constructs which are supported for static analysis and which HCL-based languages typically use in contexts where an expression is used only for its syntax, and not evaluated to produce a real value. For example, these new functions together are sufficient to construct all valid type constraint expressions from [the Type Expressions Extension](./ext/typeexpr/), which is the basis of variable type constraints in the Terraform language at the time of writing. ([#502](https://togithub.com/hashicorp/hcl/pull/502))
- json: New functions `IsJSONExpression` and `IsJSONBody` to determine if a given expression or body was created by the JSON syntax parser. In normal situations it's better not to worry about what syntax a particular expression/body originated in, but this can be useful in some trickier cases where an application needs to shim for backwards-compatibility or for static analysis that needs to have special handling of the JSON syntax's embedded expression/template conventions. ([#524](https://togithub.com/hashicorp/hcl/pull/524))
##### Bugs Fixed
- gohcl: Fix docs about supported types for blocks. ([#507](https://togithub.com/hashicorp/hcl/pull/507))
### [`v2.11.1`](https://togithub.com/hashicorp/hcl/blob/HEAD/CHANGELOG.md#v2111-December-1-2021)
[Compare Source](https://togithub.com/hashicorp/hcl/compare/v2.11.0...v2.11.1)
##### Bugs Fixed
- hclsyntax: The type for an upgraded unknown value with a splat expression cannot be known ([#495](https://togithub.com/hashicorp/hcl/pull/495))
### [`v2.11.0`](https://togithub.com/hashicorp/hcl/blob/HEAD/CHANGELOG.md#v2110-December-1-2021)
[Compare Source](https://togithub.com/hashicorp/hcl/compare/v2.10.1...v2.11.0)
##### Enhancements
- hclsyntax: Various error messages related to unexpectedly reaching end of file while parsing a delimited subtree will now return specialized messages describing the opening tokens as "unclosed", instead of returning a generic diagnostic that just happens to refer to the empty source range at the end of the file. This gives better feedback when error messages are being presented alongside a source code snippet, as is common in HCL-based applications, because it shows which innermost container the parser was working on when it encountered the error. ([#492](https://togithub.com/hashicorp/hcl/pull/492))
##### Bugs Fixed
- hclsyntax: Upgrading an unknown single value to a list using a splat expression must return unknown ([#493](https://togithub.com/hashicorp/hcl/pull/493))
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, click this checkbox.
This PR contains the following updates:
v2.10.1
->v2.12.0
Release Notes
hashicorp/hcl
### [`v2.12.0`](https://togithub.com/hashicorp/hcl/blob/HEAD/CHANGELOG.md#v2120-April-22-2022) [Compare Source](https://togithub.com/hashicorp/hcl/compare/v2.11.1...v2.12.0) ##### Enhancements - hclsyntax: Evaluation of conditional expressions will now produce more precise error messages about inconsistencies between the types of the true and false result expressions, particularly in cases where both are of the same structural type kind but differ in their nested elements. ([#530](https://togithub.com/hashicorp/hcl/pull/530)) - hclsyntax: The lexer will no longer allocate a small object on the heap for each token. Instead, in that situation it will allocate only when needed to return a diagnostic message with source location information. ([#490](https://togithub.com/hashicorp/hcl/pull/490)) - hclwrite: New functions `TokensForTuple`, `TokensForObject`, and `TokensForFunctionCall` allow for more easily constructing the three constructs which are supported for static analysis and which HCL-based languages typically use in contexts where an expression is used only for its syntax, and not evaluated to produce a real value. For example, these new functions together are sufficient to construct all valid type constraint expressions from [the Type Expressions Extension](./ext/typeexpr/), which is the basis of variable type constraints in the Terraform language at the time of writing. ([#502](https://togithub.com/hashicorp/hcl/pull/502)) - json: New functions `IsJSONExpression` and `IsJSONBody` to determine if a given expression or body was created by the JSON syntax parser. In normal situations it's better not to worry about what syntax a particular expression/body originated in, but this can be useful in some trickier cases where an application needs to shim for backwards-compatibility or for static analysis that needs to have special handling of the JSON syntax's embedded expression/template conventions. ([#524](https://togithub.com/hashicorp/hcl/pull/524)) ##### Bugs Fixed - gohcl: Fix docs about supported types for blocks. ([#507](https://togithub.com/hashicorp/hcl/pull/507)) ### [`v2.11.1`](https://togithub.com/hashicorp/hcl/blob/HEAD/CHANGELOG.md#v2111-December-1-2021) [Compare Source](https://togithub.com/hashicorp/hcl/compare/v2.11.0...v2.11.1) ##### Bugs Fixed - hclsyntax: The type for an upgraded unknown value with a splat expression cannot be known ([#495](https://togithub.com/hashicorp/hcl/pull/495)) ### [`v2.11.0`](https://togithub.com/hashicorp/hcl/blob/HEAD/CHANGELOG.md#v2110-December-1-2021) [Compare Source](https://togithub.com/hashicorp/hcl/compare/v2.10.1...v2.11.0) ##### Enhancements - hclsyntax: Various error messages related to unexpectedly reaching end of file while parsing a delimited subtree will now return specialized messages describing the opening tokens as "unclosed", instead of returning a generic diagnostic that just happens to refer to the empty source range at the end of the file. This gives better feedback when error messages are being presented alongside a source code snippet, as is common in HCL-based applications, because it shows which innermost container the parser was working on when it encountered the error. ([#492](https://togithub.com/hashicorp/hcl/pull/492)) ##### Bugs Fixed - hclsyntax: Upgrading an unknown single value to a list using a splat expression must return unknown ([#493](https://togithub.com/hashicorp/hcl/pull/493))Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.