Commit Graph

526 Commits

Author SHA1 Message Date
Rohit Jangid
4bb6e388b7
feat: implement std.equalsIgnoreCase (#692) 2023-05-25 13:32:39 +01:00
Rohit Jangid
25d3372c98
feat: implement std.remove and std.removeAt (#689)
* feat: implement std.remove and std.removeAt

* Update builtins.go

---------

Co-authored-by: Dave Cunningham <sparkprime@gmail.com>
2023-05-25 13:32:21 +01:00
Rohit Jangid
3c7c0cbac8
feat: implement objectRemoveKey (#686) 2023-05-25 12:55:30 +01:00
Yuki Yugui Sonoda
868d9c6f11
Resolves a false-positive detection of multi-doc YAML streams (#693)
Fixes #673.
2023-05-03 19:37:04 +01:00
Deep Goel
9c0b362ba7
feat: implement std.minArray (#685)
* feat: implement std.minArray
2023-05-03 19:13:56 +01:00
Rohit Jangid
76e4fc2221
feat: implement std.contains (#691) 2023-05-03 19:06:07 +01:00
Dave Cunningham
7903819abf
Bump version to 0.20.0 (#688) 2023-04-17 20:44:57 +01:00
Dave Cunningham
0e07fcda92
Update cpp version (#687) 2023-04-17 18:29:20 +01:00
Dave Cunningham
c484aec526 increase go rules version to fix bazel build 2023-04-14 16:34:55 +01:00
Dave Cunningham
5afe130669 fix newline issue breaking test 2023-04-13 15:33:24 +01:00
Rohit Jangid
18377e6f9f
Add std.round function in standard library. (#683)
Co-authored-by: Dave Cunningham <sparkprime@gmail.com>
2023-04-13 15:32:54 +01:00
Dave Cunningham
b0ff20a87c fix tests 2023-04-13 15:28:29 +01:00
Tejesh Raut
c63eb61eb3
Implement std.isEmpty for string (#678)
* Implement std.isEmpty for string
2023-04-13 15:24:47 +01:00
Saloni Juneja
ff691b0f18 Fixing test cases 2023-04-13 15:14:10 +01:00
Saloni Juneja
91ebf4b09e Add std.xor for 2 booleans 2023-04-13 15:14:10 +01:00
Rohit Jangid
772ebba669 Add support to return int based value from native functions golang implementations 2023-04-13 14:51:53 +01:00
Saloni Juneja
4df8c17aa3 Updated test cases 2023-03-28 17:13:31 +01:00
Saloni Juneja
4c83cff898 Fixed test cases 2023-03-28 17:13:31 +01:00
Saloni Juneja
67c8bf4a53 Implement std.xor for booleans 2023-03-28 17:13:31 +01:00
Rohit Jangid
83b9f8341f feat: implement std.sum 2023-02-17 13:19:50 +00:00
Jordan Cohen
b38dfbb86e
adding jsonnet-deps to release (#667)
Co-authored-by: Jordan Cohen <jordan.cohen@digitalasset.com>
2023-02-02 19:29:28 +00:00
Sheridan C Rawlins
a39e181c51
[661] Update stdlib to get std.escapeStringXml (#662)
See
- https://github.com/google/jsonnet/issues/1037
- https://github.com/google/jsonnet/pull/1038
2023-01-29 17:54:54 +00:00
Iain Lane
506b37365e
fix: Make lstripChars and rStripChars work with multibyte characters (#663)
We're currently working with the length of the string itself, which is
the number of bytes. That's wrong in these functions which operate at
the level of characters. When applied to a string with a multibyte
character they can return the wrong result. For example, evaluating
`std.rstripChars('• foo\n', '\n')` results in `"• f"`.

What we need to do instead is get the number of runes, and remove one
rune at a time.
2023-01-29 17:44:20 +00:00
Jonathan Regehr
123396675b
Adds jsonnet-lint to the releases (#664) 2023-01-16 20:12:40 +00:00
Jack
353caa131c
docs: explicit addition for installing other tools (#658) 2022-11-28 22:54:29 +00:00
Salva Corts
0504998e1e
Fix std.member matching sub strings (#657)
* Fix std.member for strings

* Add test case for matching substr in std.member
2022-11-23 20:42:49 +00:00
August Karlstedt
b4633b66f8 Update deps.bzl 2022-10-31 14:49:09 +00:00
Aaron Jheng
f30e2329be Bump go to 1.17 2022-10-31 14:46:30 +00:00
Dave Cunningham
c298238534 Bump version to v0.19.1 2022-10-27 20:58:41 +01:00
Dave Cunningham
1b99719599 Update python to match cpp version 2022-10-27 20:41:44 +01:00
Dave Cunningham
ec039600bc Update version to v0.19.0 2022-10-26 20:56:31 +01:00
Dave Cunningham
c1825dc54d Update to latest CPP version 2022-10-26 16:13:21 +01:00
Angus Lees
3f664d81b3 Add a CI test that exercises bazel builds
If it's not tested, then it doesn't work.  Add a CI test that
executes `bazel build //...` and `bazel test //...`, in addition to
the non-bazel build system.
2022-10-26 13:51:42 +01:00
Angus Lees
0a32b8c327 Fix //c-bindings bazel build
Add missing bazel dependency so `bazel build //c-bindings` works again.
2022-10-26 13:03:12 +01:00
Angus Lees
e33730a31e Fix jsonnet-lint bazel build
Update BUILD.bazel files so `bazel build //cmd/jsonnet-lint` works
again.
2022-10-26 13:02:57 +01:00
Angus Lees
aa9d35a814 Fix bazel builds on recent macOS
Update `golang.org/x/sys` package to address golang/go#51706

Update bazel `rules_go` to address bazelbuild/rules_go#3199
2022-10-26 13:02:42 +01:00
Angus Lees
eaf78af502 Update cpp-jsonnet reference to match git submodule version
Unlike naive `go build`, bazel builds generate `astgen/stdast.go` on
the fly from cpp_jsonnet's stdlib.  Cool.

Previously however, the cpp_jsonnet versions in git submodule (used by
naive `go build`) and bazel `http_archive` declarations were not in
sync.  Not so cool.

This meant `bazel test //:go_default_test` failed on
`TestEval/testdata/stdlib_smoke_test`, since the stale bazel
cpp_jsonnet version lacked `std.get`.

This PR updates cpp-jsonnet to match git submodule version.
2022-10-26 11:26:50 +01:00
Angus Lees
69137c91b6 Update bazel cpp_jsonnet reference from update_cpp_jsonnet.sh
Teach `update_cpp_jsonnet.sh` to update the cpp_jsonnet reference in
`bazel/repositories.bzl` too.
2022-10-26 11:26:50 +01:00
Jayme Bird
3aab052ecc fix: use rune for length over string 2022-10-25 19:30:01 +01:00
Dave Cunningham
03df4dc6e9 Revert "Don't pass version to go_register_toolchains() by default"
This reverts commit c17729a921.
2022-10-25 19:29:45 +01:00
Jayme Bird
62dbb64d72 feat: add builtin implementation test coverage 2022-10-25 16:22:34 +01:00
Jayme Bird
c7dc1bac16 feat: add benchmark data for builtin implementations 2022-10-25 16:22:34 +01:00
Jayme Bird
59e5a7be3f feat: add builtin stripChars go impl 2022-10-25 16:22:34 +01:00
Jayme Bird
dbe6fa55d8 feat: add builtin rStripChars go impl 2022-10-25 16:22:34 +01:00
Jayme Bird
bb0d8a9d2a feat: add builtin lStripChars go impl 2022-10-25 16:22:34 +01:00
Jayme Bird
c8492297df feat: add builtin member go impl 2022-10-25 16:22:34 +01:00
zuiwuchang
b835910677 fix FileImporter not work on windows 2022-10-25 16:21:22 +01:00
Gustaf Lindstedt
c17729a921 Don't pass version to go_register_toolchains() by default
It is disallowed to pass the version parameter if a toolchain has
already been registered.
2022-10-25 14:16:05 +01:00
mikehoyle
eac7db4471 c-bindings: Add jsonnet_realloc export
This adds the realloc function as an export in c-bindings.go so
that it is included in the generated header and can be used by
dependent libraries.
2022-10-21 17:55:35 +01:00
jaymebrd
635d04f264
feat: add support linter std get (#627)
* feat: add missing linter metadata for std.get

* feat: add tests cases for std.get linter with default and optional parameters
2022-10-19 06:19:49 +01:00