- A new enum variant has been added to
LexError.
- New language features from Jsonnet 0.22:
- Allow underscores between digits in numbers.
- New standard library elements from Jsonnet 0.22:
std.isNull
std.parseYamlnow returnsnullfor empty documents.
- Performing bitwise operations with integers that cannot be safely represented
by a
f64will fail.
- New language features from Jsonnet 0.21:
- Slices now accept negative indexes.
- Chomped multi-line text blocks (which start with
|||-).
- New standard library elements from Jsonnet 0.21:
std.pi(constant)std.log2(x)std.log10(x)std.atan2(y, x)std.deg2rad(x)std.rad2deg(x)std.hypot(a, b)std.isEven(x)std.isOdd(x)std.isInteger(x)std.isDecimal(x)std.trim(str)std.equalsIgnoreCase(str1, str2)std.flattenDeepArray(value)std.minArray(arr, keyF, onEmpty)std.maxArray(arr, keyF, onEmpty)std.contains(arr, elem)std.avg(arr)std.remove(arr, elem)std.removeAt(arr, idx)std.objectRemoveKey(obj, key)std.sha1(s)std.sha256(s)std.sha512(s)std.sha3(s)
- Minimum Supported Rust Version (MSRV) has been bumped to 1.75.
EvalErrorKind::InvalidBuiltInFuncArgTypehas been renamed toEvalErrorKind::InvalidStdFuncArgType.- New variants have been added to
EvalErrorKind. - New variants have been added to
EvalStackTraceItem. ExpectedThinghas been renamed toExpectedToken.ParseError::Expectednow usesActualTokeninstead ofTokenKind.- Arena allocation is now used for interned strings, AST and some internal data
of
Program. - String interner cannot be garbage-collected anymore.
- Reject tags in object keys in
std.parseYaml. - Avoid some panics in
std.parseYamlwith some inputs found with fuzzing. - Avoid stack overflow when dropping expressions with too much nesting.
- Improved error message when passing a value of invalid type to a built-in function.
- Stack trace improvements.
- Performance improvements.
- Some semantics of
std.parseYamlhave changed:- Empty YAML documents are now parsed as
nullinstead of an empty string. - Anchors and aliases are now supported.
Null,NULLand~are now parsed asnull.TrueandTRUEare now parsed astrue.FalseandFALSEare now parsed asfalse.- Leading or trailing dot (e.g.,
.5or1.) is now allowed in floating point numbers. - Explicit
+is now allowed in floating point numbers. - Leading zeros are now allowed in floating point numbers.
- Octal and hexadecimal intergers are now parsed as numbers.
- Empty YAML documents are now parsed as
- Detect stack overflow while comparing arrays and objects.
- Detect stack overflow while converting arrays and objects to string.
- Avoid panic when encountering an array or object as object key in
std.parseYaml. - Avoid panic when encountering a YAML alias in
std.parseYaml. - Return character indices instead of UTF-8 byte indices in
std.findSubstr. - Avoid panic when the first character of the pattern passed to
std.findSubstris not ASCII.
- Avoid panic if the array passed to
std.formatdoes not have enough items.
- When a stack trace is larger than the specified maximum, hide items in the middle instead of the end.
- Documentation improvements.
- Do not use
f64::log2to implementstd.exponentandstd.mantissa, which can be too inaccurate in some platforms. - Errors will not show
<000D>at the end of each source line when source has CRLF line endings.
- Initial release