What's Changed
-
Possibly breaking changes
- Required Go version is increased to 1.24 (https://go.dev/doc/devel/release#go1.24.0) (#850)
- When evaluating in
--multi--stringmode, output files now have an extra (trailing) newline added. If you do not want this, you can use--no-trailing-newline. (#819, #843) - Output files in
--multimode are restricted to the specified output directory (and subdirectories) - Pre-built binary archive names have changed (#848, #814)
-
Language changes, new features, etc
- Numbers in Jsonnet code can now be written with underscore used to separate groups of digits (e.g.,
1_500_000) (#760) - New function
std.isNull(#806) - Bitwise operation arguments are now limited to the "safe-integer" range (#859)
jsonnetCLI: New flag--no-trailing-newline- this disables the final newline that is normally included in the output of any Jsonnet evaluation. This option is also added to the API (#819, #843)jsonnetfmtCLI: Names of unclean files are printed to stdout when using--testor--in-placemode (#863)- API:
FindDependenciescan now optionally follow symlinks (#730) - Restrict file writes to the specified output directory for --multi (#850)
- Numbers in Jsonnet code can now be written with underscore used to separate groups of digits (e.g.,
-
Bug fixes
- The index expression of a
super[e]access (#849) - Function
std.objectRemoveKeyhas been re-implemented to fix several bugs and unexpected behaviours (#837) - Missing trailing newline when using both --multi and --string options (#819)
- Fix implicit-to-explicit-plus conversion in jsonnetfmt (#853)
- Improve handling of YAML document streams in std.parseYaml (#862)
- Unchecked error in std.manifestYamlDoc(). (#800)
- Cache the error too in importAST(). (#823)
- Do not mutate std.removeAt parameters (#812)
- Handle negative range by returning an empty array (#839)
- Return null if parseYaml does not yield any result (#841)
- Linter: Support std.clamp function (#840)
- Linter: add optional parameters to std.manifestJsonEx in (#842)
- Linter: Optimize runtime complexity when passing in multiple snippets (#725)
- The index expression of a
-
Build systems, testing, CI, internal
Full commit history: v0.21.0...v0.22.0-rc1
New Contributors
- @y1hao made their first contribution in #820
- @shrred26 made their first contribution in #806
- @hofbi made their first contribution in #815
- @seizethedave made their first contribution in #760
- @zarelit made their first contribution in #812
- @thequailman made their first contribution in #730
- @Sam-C made their first contribution in #819
- @He-Pin made their first contribution in #855
The Python module is published at https://pypi.org/project/gojsonnet/0.22.0rc1/