Skip to content

v0.21.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 07 May 13:32
· 1 commit to prepare-release since this release

A release, after (slightly over) 2 years since v0.20.0.

A corresponding PyPI package is published at: https://pypi.org/project/jsonnet/0.21.0/

What's Changed since v0.20.0

Bug fixes

  • std.all, std.any - had incorrect error reporting (#1101)
  • std.parseYaml - RapidYAML updated to version 0.5.0; fixes various details (#942, #1014, #1050)
  • Printed number output is now independent of global system locale (#722)
  • UTF-8 input representing Unicode characters outside the Basic Multilingual Plane were not decoded correctly (#1181)
  • Field visibility is now inherited as expected in objects constructed by object-comprehension expressions (#1111) [this was already the case in go-jsonnet, now fixed in C++ jsonnet]
  • Range checks on bitwise operations, and arithmetic shifts are now limited to the integer-safe range (Jsonnet numbers are IEEE double precision floating point, so they can safely represent integers from -2^53 to 2^53).
  • [Windows] On Windows, backslash is now supported as a directory separator (in imports)
  • [go-jsonnet] YAML streams were incorrectly detected for some inputs to parseYAML (go-jsonnet/#673)
  • [go-jsonnet] Internal error in conversion of native functions results to numbers (go-jsonnet/#752)

Language changes

  • Array slices can now have negative start and/or end indexes; these are now wrapped-around (similar behaviour to Python).
  • Multiline text blocks can now start with |||- to cause a trailing newline to be trimmed. (#289)

New standard library functionality

  • std.contains
  • std.objectRemoveKey
  • std.remove
  • std.removeAt
  • std.flattenDeepArray
  • std.minArray
  • std.maxArray
  • std.avg
  • std.isEven
  • std.isOdd
  • std.isInteger
  • std.isDecimal
  • std.atan2
  • std.hypot
  • std.pi (constant)
  • std.deg2rad
  • std.rad2deg
  • std.log2
  • std.log10
  • std.equalsIgnoreCase
  • std.trim
  • [go-jsonnet only] std.sha1
  • [go-jsonnet only] std.sha256
  • [go-jsonnet only] std.sha512
  • [go-jsonnet only] std.sha3
  • [go-jsonnet only] std.manifestYamlDoc is now implemented in native Go
  • [go-jsonnet only] std.escapeStringJson is now implemented in native Go
  • [go-jsonnet only] std.splitLimitR is now implemented in native Go

Build & dependency changes

  • Bazel build now uses MODULE.bazel (bzlmod), and the WORKSPACE file has been removed. bzlmod is the default in Bazel 8 and beyond, and is supported in Bazel 6 and beyond.
  • Pin Bazel to 7.5.0 when building directly: #1220
  • [C++ jsonnet] Python build should now work on Windows / MSVC
  • [C++ jsonnet] Bazel build now uses rules_python
  • [C++ jsonnet] RapidYAML updated to 0.5.0
  • [go-jsonnet] The formatter package now provides FormatNode() and SnippetToRawAST() functions (go-jsonnet/#710)
  • [go-jsonnet] golang.org/x/crypto updated from 0.17.0 to 0.33.0
  • PyPI packages are now published direct from GitHub Actions and come with publisher attestations.
  • Python wheel packages are built for Windows, Linux and MacOS.

New Contributors

Full Changelog: v0.20.0...v0.21.0