Skip to content

Commit ed11b01

Browse files
committed
Release 0.17.0
1 parent 2e3df82 commit ed11b01

16 files changed

+51
-20
lines changed

Diff for: cpp/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ add_dependencies(libjsonnet++ jsonnet)
1515
# CMake prepends CMAKE_SHARED_LIBRARY_PREFIX to shared libraries, so without
1616
# this step the output would be |liblibjsonnet|.
1717
set_target_properties(libjsonnet++ PROPERTIES OUTPUT_NAME jsonnet++
18-
VERSION "0.16.0"
18+
VERSION "0.17.0"
1919
SOVERSION "0"
2020
PUBLIC_HEADER "${LIB_HEADER}")
2121
install(TARGETS libjsonnet++

Diff for: doc/_stdlib_gen/stdlib-content.jsonnet

+17-4
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ local html = import 'html.libsonnet';
8383
{
8484
name: 'objectValues',
8585
params: ['o'],
86+
availableSince: '0.17.0',
8687
description: |||
8788
Returns an array of the values in the given object. Does not include hidden fields.
8889
|||,
@@ -104,6 +105,7 @@ local html = import 'html.libsonnet';
104105
{
105106
name: 'objectValuesAll',
106107
params: ['o'],
108+
availableSince: '0.17.0',
107109
description: |||
108110
As <code>std.objectValues</code> but also includes hidden fields.
109111
|||,
@@ -944,10 +946,17 @@ local html = import 'html.libsonnet';
944946
{
945947
name: 'flatMap',
946948
params: ['func', 'arr'],
947-
description: |||
948-
Apply the given function to every element of the array to form a new array then flatten the result.
949-
It can be thought of as a generalized map, where each element can get mapped to 0, 1 or more elements.
950-
|||,
949+
description: html.paragraphs([
950+
|||
951+
Apply the given function to every element of <code>arr</code> to form a new array then flatten the result.
952+
The argument <code>arr</code> must be an array or a string. If <code>arr</code> is an array, function <code>func</code> must return an array.
953+
If <code>arr</code> is a string, function <code>func</code> must return an string.
954+
|||,
955+
|||
956+
The <code>std.flatMap</code> function can be thought of as a generalized <code>std.map</code>,
957+
with each element mapped to 0, 1 or more elements.
958+
|||
959+
]),
951960
examples: [
952961
{
953962
input: 'std.flatMap(function(x) [x, x], [1, 2, 3])',
@@ -961,6 +970,10 @@ local html = import 'html.libsonnet';
961970
input: 'std.flatMap(function(x) if x == 2 then [] else [x * 3, x * 2], [1, 2, 3])',
962971
output: std.flatMap(function(x) if x == 2 then [] else [x * 3, x * 2], [1, 2, 3]),
963972
},
973+
{
974+
input: 'std.flatMap(function(x) x+x, "foo")',
975+
output: std.flatMap(function(x) x+x, "foo")
976+
},
964977
],
965978
},
966979
{

Diff for: doc/ref/stdlib.html

+20-2
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,11 @@ <h4 id="objectValues">
217217
<div class="hgroup">
218218
<div class="hgroup-inline">
219219
<div class="panel">
220+
<p>
221+
<em>
222+
Available since version 0.17.0.
223+
</em>
224+
</p>
220225
<p>
221226
Returns an array of the values in the given object. Does not include hidden fields.
222227
</p>
@@ -283,6 +288,11 @@ <h4 id="objectValuesAll">
283288
<div class="hgroup">
284289
<div class="hgroup-inline">
285290
<div class="panel">
291+
<p>
292+
<em>
293+
Available since version 0.17.0.
294+
</em>
295+
</p>
286296
<p>
287297
As <code>std.objectValues</code> but also includes hidden fields.
288298
</p>
@@ -1733,8 +1743,13 @@ <h4 id="flatMap">
17331743
<div class="hgroup-inline">
17341744
<div class="panel">
17351745
<p>
1736-
Apply the given function to every element of the array to form a new array then flatten the result.
1737-
It can be thought of as a generalized map, where each element can get mapped to 0, 1 or more elements.
1746+
Apply the given function to every element of <code>arr</code> to form a new array then flatten the result.
1747+
The argument <code>arr</code> must be an array or a string. If <code>arr</code> is an array, function <code>func</code> must return an array.
1748+
If <code>arr</code> is a string, function <code>func</code> must return an string.
1749+
</p>
1750+
<p>
1751+
The <code>std.flatMap</code> function can be thought of as generalized map,
1752+
where each element is mapped to 0, 1 or more elements.
17381753
</p>
17391754
<p>
17401755
Example: <code>std.flatMap(function(x) [x, x], [1, 2, 3])</code> yields <code>[ 1, 1, 2, 2, 3, 3 ]</code>.
@@ -1745,6 +1760,9 @@ <h4 id="flatMap">
17451760
<p>
17461761
Example: <code>std.flatMap(function(x) if x == 2 then [] else [x * 3, x * 2], [1, 2, 3])</code> yields <code>[ 3, 2, 9, 6 ]</code>.
17471762
</p>
1763+
<p>
1764+
Example: <code>std.flatMap(function(x) x+x, "foo")</code> yields <code>"ffoooo"</code>.
1765+
</p>
17481766
</div>
17491767
<div style="clear: both"></div>
17501768
</div>

Diff for: include/libjsonnet.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ limitations under the License.
3131
*
3232
* If this isn't the sae as jsonnet_version() then you've got a mismatched binary / header.
3333
*/
34-
#define LIB_JSONNET_VERSION "v0.16.0"
34+
#define LIB_JSONNET_VERSION "v0.17.0"
3535

3636
/** Return the version string of the Jsonnet interpreter. Conforms to semantic versioning
3737
* http://semver.org/ If this does not match LIB_JSONNET_VERSION then there is a mismatch between

Diff for: test_cmd/fmt_help.golden.stdout

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Jsonnet reformatter v0.16.0
1+
Jsonnet reformatter v0.17.0
22

33
jsonnetfmt {<option>} { <filename> }
44

Diff for: test_cmd/fmt_help.golden.stdout.golang

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Jsonnet reformatter v0.16.0
1+
Jsonnet reformatter v0.17.0
22

33
jsonnetfmt {<option>} { <filename> }
44

Diff for: test_cmd/fmt_no_args.golden.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ERROR: must give filename
22

3-
Jsonnet reformatter v0.16.0
3+
Jsonnet reformatter v0.17.0
44

55
jsonnetfmt {<option>} { <filename> }
66

Diff for: test_cmd/fmt_no_args.golden.stderr.golang

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ERROR: must give filename
22

3-
Jsonnet reformatter v0.16.0
3+
Jsonnet reformatter v0.17.0
44

55
jsonnetfmt {<option>} { <filename> }
66

Diff for: test_cmd/fmt_version1.golden.stdout

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Jsonnet reformatter v0.16.0
1+
Jsonnet reformatter v0.17.0

Diff for: test_cmd/fmt_version2.golden.stdout

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Jsonnet reformatter v0.16.0
1+
Jsonnet reformatter v0.17.0

Diff for: test_cmd/help.golden.stdout.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Jsonnet commandline interpreter v0.16.0
1+
Jsonnet commandline interpreter v0.17.0
22

33
jsonnet {<option>} <filename>
44

Diff for: test_cmd/help.golden.stdout.golang

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Jsonnet commandline interpreter v0.16.0
1+
Jsonnet commandline interpreter v0.17.0
22

33
jsonnet {<option>} <filename>
44

Diff for: test_cmd/no_args.golden.stderr.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ERROR: must give filename
22

3-
Jsonnet commandline interpreter v0.16.0
3+
Jsonnet commandline interpreter v0.17.0
44

55
jsonnet {<option>} <filename>
66

Diff for: test_cmd/no_args.golden.stderr.golang

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ERROR: must give filename
22

3-
Jsonnet commandline interpreter v0.16.0
3+
Jsonnet commandline interpreter v0.17.0
44

55
jsonnet {<option>} <filename>
66

Diff for: test_cmd/version1.golden.stdout

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Jsonnet commandline interpreter v0.16.0
1+
Jsonnet commandline interpreter v0.17.0

Diff for: test_cmd/version2.golden.stdout

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Jsonnet commandline interpreter v0.16.0
1+
Jsonnet commandline interpreter v0.17.0

0 commit comments

Comments
 (0)