Jsonnet

Latest version: v0.20.0

Safety actively analyzes 629004 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 7

0.17.0

Language
* Operator `<` now works on arrays and performs lexicographic comparison.
* New stdlib functions `std.objectValues` and `std.objectValuesAll` for getting an array on field values.
* Bitshift by negative value is now an error (previously the behavior was inconsistent).

Go implementation
* New tool available: `jsonnet-lint` which automatically finds common problems in Jsonnet programs.
* New tool available: `jsonnet-deps` which finds all transitive dependencies.
* Fixed multiple issues with stack traces, which sometimes resulted in missing or confusing stack trace entries.
* Fixed handling of object locals in object comprehensions.
* Added missing convenience functions to C and Python bindings. They should be now 100% complete.
* Python bindings no longer hold GIL during evaluation of Jsonnet code.
* `std.manifestJsonEx` is now much faster.
* Strings are now supported in `std.flatMap` (in addition to arrays).
* Improved Go library API: more consitent handling of paths. We no longer treat fake names for ad hoc snippets or extvars as paths. Function family `EvaluateSnippet*` is now deprecated in favor of `EvaluateAnonymousSnippet*` or `EvaluateFile*`.
* When using bazel, it is possible now to use `go_repository` rule for go-jsonnet.

C++ implementation
* Python bindings no longer hold GIL during evaluation of Jsonnet code.

Docs
* New language reference is available at https://jsonnet.org/ref/language.html.
* Fixed multiple mistakes in the formal spec.
* Fixed a mistake in the documentation for `std.rstripChars`
* Added documentation for `std.slice`.

Development and Internals
* The shared test suite allows specifying an overriding directory for test results (useful for error messages).
* Added a mechanism to C++ interpreter to call normal Jsonnet functions in the implementation of builtin operations (currently it's used for implementing array comparison).
* The `tests.sh` script for go-jsonnet no longer refreshes cpp-jsonnet submodule.
* Added a separate script for updating cpp-jsonnet, which automatically regenerates stdlib.

0.16.0

Language
* It is now allowed to have positional parameters after named ones

Interpreter (Go)
* New `jsonnetfmt` implementation in Go was added.
* New formatter library in Go was added.
* It is now possible to install Python package `gojsonnet` using pip. It is a source package, so a reasonably recent Go toolchain is required to install it.

Interpreter (C++)
* Shifting (`<<` and `>>`) by negative exponent is a runtime error now.
* Some improvements to error messages.
* Python bindings now support adding multiple jpathdirs.
* CMake uses CMAKE_CURRENT_SOURCE_DIR instead of CMAKE_SOURCE_DIR, which makes it easier to include Jsonnet in another project.

0.15.0

Language

* New stdlib functions:
- std.member
- std.clamp
- std.stripChars, std.lstripChars, std.stripChars
- std.flatMap
- std.repeat

Interpreter (Go)

Runtime

* Greatly improved performance of multiple stdlib functions:
- std.reverse
- std.substr
- std.base64, std.base64Decode, std.base64DecodeBytes
* Adaptive string representation - naively joining many short
strings using operator + is now a linear operation.
* Fixed incorrect handling of overflow in bitwise operators.
* Tests should now pass on x86 and ARM.
* Unary + no longer allowed on objects.

API
* Fully compatible, experimental Python API is now available.
* Import cache is now preserved across evaluations, which
improves performance when evaluating multiple files, which
use the same libraries or when evaluating the same file with
different TLAVars. Note that changing ExtVars still clears
the cache, because they potentially affect every import.
* New public functions jsonnet.ResolveImport and
jsonnet.ImportData for easier integration of tooling
with importers.
* New public function toolutils.Children for easier traversing
of AST.
* AST contains comments now, which allow building code transformation
tooling.

Interpreter (C++)

* Fixed incorrect error message, when too few arguments are provided
for string formatting.
* Fixed a dangling pointer, which could have potentially caused crashes.

0.14.0

Interpreter (Go)

* Object field caching - now each field is evaluated only once for each object. This may drastically improve performance in many cases.
* Fixed crash during preprocessing of some array comprehensions (https://github.com/google/go-jsonnet/pull/291).
* Building and testing with Bazel is now supported.
* Much faster (builtin) implementation of std.sort.
* Removed some public APIs which should have been internal in the first place. If it broke your code, please open an issue.

Interpreter (C++)
* Added support for top level arguments (TLAs) to C++ bindings.

jsonnetfmt

* `jsonnetfmt -i` no longer modifies timestamps of properly formatted files.

Misc

* Added missing SONAME to shared libraries.
* It is now possible to use system libraries instead of bundled ones.
* Multiple CMake improvements.

0.13.0

jsonnet fmt` is now its own executable called `jsonnetfmt`. This helps if you're using the Go version but you still want to have a formatter in your $PATH. Soon we want to have jsonnetfmt be a binary in the Go version too.

If you've got scripts that run `jsonnet fmt`, you will need to delete the space from them.

Standard library additions:
- std.reverse
- std.encodeUTF8 and std.decodeUTF8

There are some performance improvements in the Go version

There are are also plenty of minor bugfixes.

0.12.1

Identical to v0.12.0 except fixed Pypi package manifest

Page 2 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.