mercari / hcledit

Go package to edit HCL configuration
MIT License
44 stars 13 forks source link

Bump github.com/hashicorp/hcl/v2 from 2.10.1 to 2.14.0 #77

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps github.com/hashicorp/hcl/v2 from 2.10.1 to 2.14.0.

Release notes

Sourced from github.com/hashicorp/hcl/v2's releases.

v2.14.0

Enhancements

  • ext/typeexpr: Added support for optional object attributes to TypeConstraint. Attributes can be wrapped in the special optional(…) modifier, allowing the attribute to be omitted while still meeting the type constraint. For more information, cty's documentation on conversion between object types. (#549)
  • ext/typeexpr: New function: TypeConstraintWithDefaults. In this mode, the optional(…) modifier accepts a second argument which can be used as the default value for omitted object attributes. The function returns both a cty.Type and associated Defaults, the latter of which has an Apply method to apply defaults to a given value. (#549)

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)
  • 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)
  • 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, which is the basis of variable type constraints in the Terraform language at the time of writing. (#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)

Bugs Fixed

  • gohcl: Fix docs about supported types for blocks. (#507)

v2.11.1

Bugs Fixed

  • hclsyntax: The type for an upgraded unknown value with a splat expression cannot be known (#495)

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)

Bugs Fixed

  • hclsyntax: Upgrading an unknown single value to a list using a splat expression must return unknown (#493)
Changelog

Sourced from github.com/hashicorp/hcl/v2's changelog.

v2.14.0 (September 1, 2022)

Enhancements

  • ext/typeexpr: Added support for optional object attributes to TypeConstraint. Attributes can be wrapped in the special optional(…) modifier, allowing the attribute to be omitted while still meeting the type constraint. For more information, cty's documentation on conversion between object types. (#549)
  • ext/typeexpr: New function: TypeConstraintWithDefaults. In this mode, the optional(…) modifier accepts a second argument which can be used as the default value for omitted object attributes. The function returns both a cty.Type and associated Defaults, the latter of which has an Apply method to apply defaults to a given value. (#549)

v2.13.0 (June 22, 2022)

Enhancements

  • hcl: hcl.Diagnostic now has an additional field Extra which is intended for carrying arbitrary supporting data ("extra information") related to the diagnostic message, intended to allow diagnostic renderers to optionally tailor the presentation of messages for particular situations. (#539)
  • hclsyntax: When an error occurs during a function call, the returned diagnostics will include extra information (as described in the previous point) about which function was being called and, if the message is about an error returned by the function itself, that raw error value without any post-processing. (#539)

Bugs Fixed

  • hclwrite: Fixed a potential data race for any situation where hclwrite.Format runs concurrently with itself. (#534)

v2.12.0 (April 22, 2022)

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)
  • 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)
  • 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, which is the basis of variable type constraints in the Terraform language at the time of writing. (#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)

Bugs Fixed

  • gohcl: Fix docs about supported types for blocks. (#507)

v2.11.1 (December 1, 2021)

Bugs Fixed

  • hclsyntax: The type for an upgraded unknown value with a splat expression cannot be known (#495)

v2.11.0 (December 1, 2021)

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)

Bugs Fixed

  • hclsyntax: Upgrading an unknown single value to a list using a splat expression must return unknown (#493)
Commits
  • 85e45c5 Update CHANGELOG.md
  • 74d03f3 Update CHANGELOG.md
  • c4381b5 Release v2.14.0
  • 8f2d3d7 Update CHANGELOG.md
  • 75d5692 Merge pull request #549 from hashicorp/typeexpr-optional-defaults
  • 47464b2 typeexpr: Optional object attributes with defaults
  • 3186414 Prepare for a possible future v2.13.1 release
  • bc4516e Release v2.13.0
  • ee5af8c Update CHANGELOG.md
  • 88ecd13 hcl: Allow individual diagnostics to carry extra information
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 1 year ago

Superseded by #79.