Jsonnet

Latest version: v0.20.0

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

Scan your dependencies

Page 6 of 7

0.8.0

This release has a few more examples.

The main new feature is the ability to specify multiline strings more easily, i.e. instead of the ugly


{
foo: "!/bin/bash
echo \"Hello world!\"",
}


or the bureaucratic


{
foo: std.lines([
"!/bin/bash"
"echo \"Hello world!\"",
])
}


you can now do the following, which is similar to the YAML "block style" construct.


{
foo: |||
!/bin/bash
echo "Hello world!"
|||,
}


The indentation is stripped.

Note that this is just a string literal, so it can be combined with % to do string templating:


{
foo: |||
!/bin/bash
echo "Hello %(greetable_entity)s!"
||| % {
greetable_entity: "world"
},
}

0.7.9

This release has the following changes since v0.7.6 (intermediate versions exist on PyPy but not Github):
- Add std.setMember
- Various bug fixes related to transitive imports not being correctly resolved
- Addition of import_callback to Python bindings

0.7.6

This release has the following changes:
- Various minor bug fixes.
- Replace garbage collector with one that can handle larger heaps.
- Add tailstrict function call annotation for O(1) memory consumption in tail-recursive functions.
- Added sort, uniq, and set functions to stdlib
- Python extension is now built with setup.py

0.7.5

Some minor fixes to the manifestation of large numbers, as well as new errors when computing NaN/Inf during execution.

0.7.0beta

This release should be backwards-compatible.

New features:
Null field names now omitted from object 10
std.base64 functions 28
Trapping import to implement virtual filesystems 8
Now possible to write Jsonnet libraries, importable via a search path 18
Comments can now start with (as well as the C++ and C styles /**/ and //). This allows !/usr/bin/jsonnet 27

0.6.0beta

Three minor backwards-incompatible changes:
1) std.env is renamed to std.extVar. This is because environment variables are not the only way to get now-called 'external' variables into Jsonnet, you can also pass them explicitly on the command line (or via the library API).

2) The hidden status of fields defined with : is now preserved over inheritance instead of being reset by the base class. This means subobjects overriding fields from superobjects do not have to worry about whether those fields should appear in the output or not.

3) A new keyword tailcall is reserved for future use.

There are a number of enhancements to the standard library and interpreter, including the ability to generate multiple JSON files from a single authoritative Jsonnet configuration.

Page 6 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.