Commit Graph

160 Commits

Author SHA1 Message Date
Rohit Jangid
ae9a67d6e5 Add argument in parseXmlJsonml function 2023-06-27 13:35:59 +05:30
Rohit Jangid
a2105c2532 feat: Implement std.parseXmlJsonml 2023-06-27 13:09:11 +05:30
zephyros-dev
fed90cd9cd
fix: add std.objectKeysValues to jsonnet-lint (#706) 2023-06-26 20:40:39 +01:00
Jayme Bird
5fb0b0b578
feat: add std reverse linter (#709)
* feat: add std.reverse to linter

* feat: add linter test case

* feat: fix linter golden test data
2023-06-13 20:15:23 +01:00
Rohit Jangid
2a7260d60c
feat: Add more math functions (#702)
Co-authored-by: Dave Cunningham <sparkprime@gmail.com>
2023-06-13 20:14:26 +01:00
Deep Goel
572c054137
feat: implement std.avg (#700)
* feat: implement std.avg
2023-06-13 17:42:05 +01:00
Rohit Jangid
aece6e9b90
feat: add more crypto functions (#699)
* feat: add more crypto functions
2023-06-13 17:18:02 +01:00
Tejesh Raut
fae841124f
Implement std.trim for string (#684)
* Implement std.trim for string
2023-06-13 13:05:28 +01:00
Deep Goel
7edd5d373b
feat: implement std.maxArray (#696) 2023-05-25 13:45:24 +01:00
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
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
91ebf4b09e Add std.xor for 2 booleans 2023-04-13 15:14:10 +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
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
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
Dave Cunningham
c298238534 Bump version to v0.19.1 2022-10-27 20:58:41 +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
Jayme Bird
3aab052ecc fix: use rune for length over string 2022-10-25 19:30:01 +01:00
Jayme Bird
62dbb64d72 feat: add builtin implementation test coverage 2022-10-25 16:22:34 +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
Jayme Bird
8abb4aa639 feat: implementation of manifestTomlEx in Go
Co-authored-by: Wojciech Kocjan <wojciech@kocjan.org>
2022-10-19 04:50:41 +01:00
Jesse-Cameron
02194a7f8c chore: update golden tests for fold 2022-09-27 21:46:37 +01:00
Jayme Bird
cb3a759621 feat: add linter testdata 2022-09-04 15:59:03 +01:00
Jayme Bird
5440cc833f feat: add test data 2022-09-04 15:59:03 +01:00
Jayme Bird
a5ddc1c5a4 feat: add support to the jsonnet linter for std.manifestJsonMinified 2022-08-18 22:23:43 +01:00
Rudo Thomas
b42132a7a3 feat: Report native function panics as runtime errors.
Previously, you'd get an "INTERNAL ERROR: (CRASH)" with a full backtrace
and a link to file a bug against go-jsonnet.
2022-07-03 21:39:29 +01:00
Jayme Bird
f0a060e259 feat: Add missing linter metadata for std.manifestTomlEx function 2022-03-18 02:05:38 +00:00
Angus Lees
856bd58872 Add 'importbin' statement
Add `importbin` statement.  Similar to `importstr` but the result is
an array of numbers (all integers 0-255).
2022-03-03 22:49:02 +00:00
Dave Cunningham
fb6c700f29 Prepare for v0.18.0 2021-12-21 18:34:50 +00:00
Stanisław Barzowski
b00b56c335 Avoid depending on stdlib variable for desugaring.
The fix is easy – we just use "$std" which the user cannot access,
because it's not a valid identifier.
2021-08-09 19:25:33 +01:00
Stanisław Barzowski
7373f5b606 Add test output overrides for jsonnetfmt. 2021-05-20 14:23:06 +02:00
Greg Roodt
e6a9581713
Adds std.parseYaml (#339)
Add support for std.parseYaml.

Co-authored-by: Stanisław Barzowski <stanislaw.barzowski@gmail.com>
2021-05-20 14:16:23 +02:00
Yiannis
ce76155e09
Fix strip definition
Co-authored-by: Tom Fenech <tomjwfenech@gmail.com>
2021-05-19 13:57:47 +02:00
Stanisław Barzowski
74b3a1b669 [Linter] Support std.member and std.repeat. 2021-03-25 18:35:13 +01:00
Lucas Servén Marín
9b6cbef4ca testdata: std.manifestJsonEx text cases more types
This commit adds test cases for more types to ensure that
std.manifestJsonEx continues to work with all types that may be given
as the `value` parameter.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-02-15 14:44:08 +01:00
Lucas Servén Marín
9bba8deca0 testdata: add manifestJsonEx array test case
This commit adds a test case to prevent regressions in
std.manifestJsonEx accepting arrays as values.

Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
2021-02-15 14:44:08 +01:00
Hanyu Cui
cd59751527
Distinguish go-jsonnet from cpp-jsonnet in version message (#497)
Distinguish the Go implementation in the version message
2021-01-13 20:46:15 +01:00