Repository: google/jsonnet (language: python)

Issue:
Add availableSince for std.xor



Discussion / hints:

Fix patch:
diff --git a/doc/_stdlib_gen/stdlib-content.jsonnet b/doc/_stdlib_gen/stdlib-content.jsonnet
index efdb27333..9183ee865 100644
--- a/doc/_stdlib_gen/stdlib-content.jsonnet
+++ b/doc/_stdlib_gen/stdlib-content.jsonnet
@@ -15,6 +15,9 @@ local html = import 'html.libsonnet';
       then the actual code executed would be <code>local std = { ... }; {x: "foo"}</code>. The
       functions in the standard library are all hidden fields of the <code>std</code> object.
     |||,
+    |||
+      Note: Some of these functions marked available since v0.10.0 were actually available earlier.
+    |||,
   ]),
   prefix: 'std',
   groups: [
@@ -25,6 +28,7 @@ local html = import 'html.libsonnet';
         {
           name: 'extVar',
           params: ['x'],
+          availableSince: '0.10.0',
           description: 'If an external variable with the given name was defined, return its string value. Otherwise, raise an error.',
         },
       ],
@@ -35,11 +39,13 @@ local html = import 'html.libsonnet';
       fields: [
         {
           name: 'thisFile',
+          availableSince: '0.10.0',
           description: 'Note that this is a field. It contains the current Jsonnet filename as a string.',
         },
         {
           name: 'type',
           params: ['x'],
+          availableSince: '0.10.0',
           description: html.paragraphs([
             |||
               Return a string that indicates the type of the value. The possible return values are:
@@ -56,6 +62,7 @@ local html = import 'html.libsonnet';
         {
           name: 'length',
           params: ['x'],
+          availableSince: '0.10.0',
           description: |||
             Depending on the type of the value given, either returns the number of elements in the
             array, the number of codepoints in the string, the number of parameters in the function, or
@@ -75,6 +82,7 @@ local html = import 'html.libsonnet';
         {
           name: 'objectHas',
           params: ['o', 'f'],
+          availableSince: '0.10.0',
           description: |||
             Returns <code>true</code> if the given object has the field (given as a string), otherwise
             <code>false</code>. Raises an error if the arguments are not object and string
@@ -84,6 +92,7 @@ local html = import 'html.libsonnet';
         {
           name: 'objectFields',
           params: ['o'],
+          availableSince: '0.10.0',
           description: |||
             Returns an array of strings, each element being a field from the given object. Does not include
             hidden fields.
@@ -109,6 +118,7 @@ local html = import 'html.libsonnet';
         {
           name: 'objectHasAll',
           params: ['o', 'f'],
+          availableSince: '0.10.0',
           description: |||
             As <code>std.objectHas</code> but also includes hidden fields.
           |||,
@@ -116,6 +126,7 @@ local html = import 'html.libsonnet';
         {
           name: 'objectFieldsAll',
           params: ['o'],
+          availableSince: '0.10.0',
           description: |||
             As <code>std.objectFields</code> but also includes hidden fields.
           |||,
@@ -139,6 +150,7 @@ local html = import 'html.libsonnet';
         {
           name: 'prune',
           params: ['a'],
+          availableSince: '0.10.0',
           description: |||
             Recursively remove all "empty" members of <code>a</code>. "Empty" is defined as zero
             length `arrays`, zero length `objects`, or `null` values.
@@ -148,6 +160,7 @@ local html = import 'html.libsonnet';
         {
           name: 'mapWithKey',
           params: ['func', 'obj'],
+          availableSince: '0.10.0',
           description: |||
             Apply the given function to all fields of the given object, also passing
             the field name. The function <code>func</code> is expected to take the
@@ -226,6 +239,7 @@ local html = import 'html.libsonnet';
         {
           name: 'assertEqual',
           params: ['a', 'b'],
+          availableSince: '0.10.0',
           description: 'Ensure that <code>a == b</code>. Returns <code>true</code> or throws an error message.',
         },
       ],
@@ -237,6 +251,7 @@ local html = import 'html.libsonnet';
         {
           name: 'toString',
           params: ['a'],
+          availableSince: '0.10.0',
           description: |||
             Convert the given argument to a string.
           |||,
@@ -244,6 +259,7 @@ local html = import 'html.libsonnet';
         {
           name: 'codepoint',
           params: ['str'],
+          availableSince: '0.10.0',
           description: |||
             Returns the positive integer representing the unicode codepoint of the character in the
             given single-character string. This function is the inverse of <code>std.char(n)</code>.
@@ -252,6 +268,7 @@ local html = import 'html.libsonnet';
         {
           name: 'char',
           params: ['n'],
+          availableSince: '0.10.0',
           description: |||
             Returns a string of length one whose only unicode codepoint has integer id <code>n</code>.
             This function is the inverse of <code>std.codepoint(str)</code>.
@@ -260,6 +277,7 @@ local html = import 'html.libsonnet';
         {
           name: 'substr',
           params: ['str', 'from', 'len'],
+          availableSince: '0.10.0',
           description: |||
             Returns a string that is the part of <code>s</code> that starts at offset <code>from</code>
             and is <code>len</code> codepoints long. If the string <code>s</code> is shorter than
@@ -269,6 +287,7 @@ local html = import 'html.libsonnet';
         {
           name: 'findSubstr',
           params: ['pat', 'str'],
+          availableSince: '0.10.0',
           description: |||
             Returns an array that contains the indexes of all occurrences of <code>pat</code> in
             <code>str</code>.
@@ -277,6 +296,7 @@ local html = import 'html.libsonnet';
         {
           name: 'startsWith',
           params: ['a', 'b'],
+          availableSince: '0.10.0',
           description: |||
             Returns whether the string a is prefixed by the string b.
           |||,
@@ -284,6 +304,7 @@ local html = import 'html.libsonnet';
         {
           name: 'endsWith',
           params: ['a', 'b'],
+          availableSince: '0.10.0',
           description: |||
             Returns whether the string a is suffixed by the string b.
           |||,
@@ -357,6 +378,7 @@ local html = import 'html.libsonnet';
         {
           name: 'split',
           params: ['str', 'c'],
+          availableSince: '0.10.0',
           description: [
             html.p({}, |||
               Split the string <code>str</code> into an array of strings, divided by the string
@@ -380,6 +402,7 @@ local html = import 'html.libsonnet';
         {
           name: 'splitLimit',
           params: ['str', 'c', 'maxsplits'],
+          availableSince: '0.10.0',
           description: [
             html.p({}, |||
               As <code>std.split(str, c)</code> but will stop after <code>maxsplits</code> splits, thereby the largest
@@ -403,7 +426,7 @@ local html = import 'html.libsonnet';
         {
           name: 'splitLimitR',
           params: ['str', 'c', 'maxsplits'],
-          availableSince: 'v0.19.0',
+          availableSince: '0.19.0',
           description: 'As <code>std.splitLimit(str, c, maxsplits)</code> but will split from right to left.',
           examples: [
             {
@@ -415,6 +438,7 @@ local html = import 'html.libsonnet';
         {
           name: 'strReplace',
           params: ['str', 'from', 'to'],
+          availableSince: '0.10.0',
           description: |||
             Returns a copy of the string in which all occurrences of string <code>from</code> have been
             replaced with string <code>to</code>.
@@ -437,6 +461,7 @@ local html = import 'html.libsonnet';
         {
           name: 'asciiUpper',
           params: ['str'],
+          availableSince: '0.10.0',
           description: |||
             Returns a copy of the string in which all ASCII letters are capitalized.
           |||,
@@ -450,6 +475,7 @@ local html = import 'html.libsonnet';
         {
           name: 'asciiLower',
           params: ['str'],
+          availableSince: '0.10.0',
           description: |||
             Returns a copy of the string in which all ASCII letters are lower cased.
           |||,
@@ -463,6 +489,7 @@ local html = import 'html.libsonnet';
         {
           name: 'stringChars',
           params: ['str'],
+          availableSince: '0.10.0',
           description: |||
             Split the string <code>str</code> into an array of strings, each containing a single
             codepoint.
@@ -477,6 +504,7 @@ local html = import 'html.libsonnet';
         {
           name: 'format',
           params: ['str', 'vals'],
+          availableSince: '0.10.0',
           description: |||
             Format the string <code>str</code> using the values in <code>vals</code>. The values can be
             an array, an object, or in other cases are treated as if they were provided in a singleton
@@ -506,6 +534,7 @@ local html = import 'html.libsonnet';
         {
           name: 'escapeStringBash',
           params: ['str'],
+          availableSince: '0.10.0',
           description: |||
             Wrap <code>str</code> in single quotes, and escape any single quotes within <code>str</code>
             by changing them to a sequence <tt>'"'"'</tt>. This allows injection of arbitrary strings
@@ -515,6 +544,7 @@ local html = import 'html.libsonnet';
         {
           name: 'escapeStringDollars',
           params: ['str'],
+          availableSince: '0.10.0',
           description: |||
             Convert $ to $$ in <code>str</code>. This allows injection of arbitrary strings into
             systems that use $ for string interpolation (like Terraform).
@@ -523,6 +553,7 @@ local html = import 'html.libsonnet';
         {
           name: 'escapeStringJson',
           params: ['str'],
+          availableSince: '0.10.0',
           description: |||
             Convert <code>str</code> to allow it to be embedded in a JSON representation, within a
             string. This adds quotes, escapes backslashes, and escapes unprintable characters.
@@ -543,6 +574,7 @@ local html = import 'html.libsonnet';
         {
           name: 'escapeStringPython',
           params: ['str'],
+          availableSince: '0.10.0',
           description: |||
             Convert <code>str</code> to allow it to be embedded in Python. This is an alias for
             <code>std.escapeStringJson</code>.
@@ -551,6 +583,7 @@ local html = import 'html.libsonnet';
         {
           name: 'escapeStringXml',
           params: ['str'],
+          availableSince: '0.10.0',
           description: |||
             Convert <code>str</code> to allow it to be embedded in XML (or HTML). The following replacements are made:
             <pre>
@@ -573,6 +606,7 @@ local html = import 'html.libsonnet';
         {
           name: 'parseInt',
           params: ['str'],
+          availableSince: '0.10.0',
           description: |||
             Parses a signed decimal integer from the input string.
           |||,
@@ -590,6 +624,7 @@ local html = import 'html.libsonnet';
         {
           name: 'parseOctal',
           params: ['str'],
+          availableSince: '0.10.0',
           description: |||
             Parses an unsigned octal integer from the input string. Initial zeroes are tolerated.
           |||,
@@ -603,6 +638,7 @@ local html = import 'html.libsonnet';
         {
           name: 'parseHex',
           params: ['str'],
+          availableSince: '0.10.0',
           description: |||
             Parses an unsigned hexadecimal integer, from the input string. Case insensitive.
           |||,
@@ -615,8 +651,8 @@ local html = import 'html.libsonnet';
         },
         {
           name: 'parseJson',
-          availableSince: '0.13.0',
           params: ['str'],
+          availableSince: '0.13.0',
           description: |||
             Parses a JSON string.
           |||,
@@ -629,8 +665,8 @@ local html = import 'html.libsonnet';
         },
         {
           name: 'parseYaml',
-          availableSince: '0.18.0',
           params: ['str'],
+          availableSince: '0.18.0',
           description: |||
             Parses a YAML string. This is provided as a "best-effort" mechanism and should not be relied on to provide
             a fully standards compliant YAML parser. YAML is a superset of JSON, consequently "downcasting" or
@@ -640,7 +676,7 @@ local html = import 'html.libsonnet';
           |||,
           examples: [
             {
-              input: 'std.parseYaml(\'foo: bar\')',
+              input: "std.parseYaml('foo: bar')",
               output: std.parseYaml('foo: bar'),
             },
           ],
@@ -673,13 +709,14 @@ local html = import 'html.libsonnet';
         {
           name: 'manifestIni',
           params: ['ini'],
+          availableSince: '0.10.0',
           description: [
             html.p({}, |||
-                Convert the given structure to a string in <a href="https://en.wikipedia.org/wiki/INI_file">INI format</a>. This
-                allows using Jsonnet's
-                object model to build a configuration to be consumed by an application expecting an INI
-                file. The data is in the form of a set of sections, each containing a key/value mapping.
-                These examples should make it clear:
+              Convert the given structure to a string in <a href="https://en.wikipedia.org/wiki/INI_file">INI format</a>. This
+              allows using Jsonnet's
+              object model to build a configuration to be consumed by an application expecting an INI
+              file. The data is in the form of a set of sections, each containing a key/value mapping.
+              These examples should make it clear:
             |||),
             html.pre({}, |||
               {
@@ -708,11 +745,12 @@ local html = import 'html.libsonnet';
               p = yes
               q =
             |||),
-          ]
+          ],
         },
         {
           name: 'manifestPython',
           params: ['v'],
+          availableSince: '0.10.0',
           description: [
             html.p({}, |||
               Convert the given value to a JSON-like form that is compatible with Python. The chief
@@ -729,7 +767,7 @@ local html = import 'html.libsonnet';
             |||),
 
             html.p({}, |||
-                Yields a string containing Python code like:
+              Yields a string containing Python code like:
             |||),
 
             html.pre({}, |||
@@ -740,16 +778,17 @@ local html = import 'html.libsonnet';
                   "e": {"f1": False, "f2": 42}
               }
             |||),
-          ]
+          ],
         },
         {
           name: 'manifestPythonVars',
           params: ['conf'],
+          availableSince: '0.10.0',
           description: [
             html.p({}, |||
-                Convert the given object to a JSON-like form that is compatible with Python. The key
-                difference to <code>std.manifestPython</code> is that the top level is represented as a list
-                of Python global variables.
+              Convert the given object to a JSON-like form that is compatible with Python. The key
+              difference to <code>std.manifestPython</code> is that the top level is represented as a list
+              of Python global variables.
             |||),
 
             html.pre({}, |||
@@ -762,7 +801,7 @@ local html = import 'html.libsonnet';
             |||),
 
             html.p({}, |||
-                Yields a string containing this Python code:
+              Yields a string containing this Python code:
             |||),
 
             html.pre({}, |||
@@ -776,13 +815,14 @@ local html = import 'html.libsonnet';
         {
           name: 'manifestJsonEx',
           params: ['value', 'indent', 'newline', 'key_val_sep'],
+          availableSince: '0.10.0',
           description: [
             html.p({}, |||
-                Convert the given object to a JSON form. <code>indent</code> is a string containing
-                one or more whitespaces that are used for indentation. <code>newline</code> is
-                by default <code>\n</code> and is inserted where a newline would normally be used
-                to break long lines. <code>key_val_sep</code> is used to separate the key and value
-                of an object field:
+              Convert the given object to a JSON form. <code>indent</code> is a string containing
+              one or more whitespaces that are used for indentation. <code>newline</code> is
+              by default <code>\n</code> and is inserted where a newline would normally be used
+              to break long lines. <code>key_val_sep</code> is used to separate the key and value
+              of an object field:
             |||),
           ],
           examples: [
@@ -797,11 +837,19 @@ local html = import 'html.libsonnet';
               |||,
               output:
                 std.manifestJsonEx(
-                {
-                    x: [1, 2, 3, true, false, null,
-                        "string\nstring"],
+                  {
+                    x: [
+                      1,
+                      2,
+                      3,
+                      true,
+                      false,
+                      null,
+                      'string\nstring',
+                    ],
                     y: { a: 1, b: 2, c: [1, 2] },
-                }, "    "),
+                  }, '    '
+                ),
             },
             {
               input: |||
@@ -813,21 +861,22 @@ local html = import 'html.libsonnet';
               |||,
               output:
                 std.manifestJsonEx(
-                {
-                  x: [1, 2, "string\nstring"],
-                  y: { a: 1, b: [1, 2] },
-                }, "", " ", " : "),
+                  {
+                    x: [1, 2, 'string\nstring'],
+                    y: { a: 1, b: [1, 2] },
+                  }, '', ' ', ' : '
+                ),
             },
-          ]
+          ],
         },
         {
           name: 'manifestJsonMinified',
           params: ['value'],
           availableSince: '0.18.0',
           description: |||
-                Convert the given object to a minified JSON form. Under the covers,
-                it calls <code>std.manifestJsonEx:')</code>:
-            |||,
+            Convert the given object to a minified JSON form. Under the covers,
+            it calls <code>std.manifestJsonEx:')</code>:
+          |||,
           examples: [
             {
               input: |||
@@ -840,70 +889,80 @@ local html = import 'html.libsonnet';
               |||,
               output:
                 std.manifestJsonMinified(
-                {
-                    x: [1, 2, 3, true, false, null,
-                        "string\nstring"],
+                  {
+                    x: [
+                      1,
+                      2,
+                      3,
+                      true,
+                      false,
+                      null,
+                      'string\nstring',
+                    ],
                     y: { a: 1, b: 2, c: [1, 2] },
-                }),
-            }
-          ]
+                  }
+                ),
+            },
+          ],
         },
         {
           name: 'manifestYamlDoc',
           params: ['value', 'indent_array_in_object=false', 'quote_keys=true'],
+          availableSince: '0.10.0',
           description: [
-              html.p({}, |||
-                  Convert the given value to a YAML form. Note that <code>std.manifestJson</code> could also
-                  be used for this purpose, because any JSON is also valid YAML. But this function will
-                  produce more canonical-looking YAML.
-              |||),
-              html.pre({}, |||
-                std.manifestYamlDoc(
-                  {
-                      x: [1, 2, 3, true, false, null,
-                          "string\nstring\n"],
-                      y: { a: 1, b: 2, c: [1, 2] },
-                  },
-                  indent_array_in_object=false)
-              |||),
-              html.p({}, |||
-                Yields a string containing this YAML:
-              |||),
-              html.pre({}, |||
-                  "x":
+            html.p({}, |||
+              Convert the given value to a YAML form. Note that <code>std.manifestJson</code> could also
+              be used for this purpose, because any JSON is also valid YAML. But this function will
+              produce more canonical-looking YAML.
+            |||),
+            html.pre({}, |||
+              std.manifestYamlDoc(
+                {
+                    x: [1, 2, 3, true, false, null,
+                        "string\nstring\n"],
+                    y: { a: 1, b: 2, c: [1, 2] },
+                },
+                indent_array_in_object=false)
+            |||),
+            html.p({}, |||
+              Yields a string containing this YAML:
+            |||),
+            html.pre({}, |||
+              "x":
+                - 1
+                - 2
+                - 3
+                - true
+                - false
+                - null
+                - |
+                    string
+                    string
+              "y":
+                "a": 1
+                "b": 2
+                "c":
                     - 1
                     - 2
-                    - 3
-                    - true
-                    - false
-                    - null
-                    - |
-                        string
-                        string
-                  "y":
-                    "a": 1
-                    "b": 2
-                    "c":
-                        - 1
-                        - 2
-              |||),
-              html.p({}, |||
-                The <code>indent_array_in_object</code> param adds additional indentation which some people
-                may find easier to read.
-              |||),
-              html.p({}, |||
-                The <code>quote_keys</code> parameter controls whether YAML identifiers are always quoted
-                or only when necessary.
-              |||),
+            |||),
+            html.p({}, |||
+              The <code>indent_array_in_object</code> param adds additional indentation which some people
+              may find easier to read.
+            |||),
+            html.p({}, |||
+              The <code>quote_keys</code> parameter controls whether YAML identifiers are always quoted
+              or only when necessary.
+            |||),
           ],
         },
         {
           name: 'manifestYamlStream',
           params: ['value', 'indent_array_in_object=false', 'c_document_end=false', 'quote_keys=true'],
+          availableSince: '0.10.0',
           description: [
             html.p({}, |||
-                Given an array of values, emit a YAML "stream", which is a sequence of documents separated
-                by <code>---</code> and ending with <code>...</code>.
+              Given an array of values, emit a YAML "stream", which is a sequence of documents separated
+              by <code>---</code> and ending with <code>...</code>.
             |||),
 
             html.pre({}, |||
@@ -939,10 +998,11 @@ local html = import 'html.libsonnet';
         {
           name: 'manifestXmlJsonml',
           params: ['value'],
+          availableSince: '0.10.0',
           description: [
             html.p({}, |||
-                Convert the given <a href="http://www.jsonml.org/">JsonML</a>-encoded value to a string
-                containing the XML.
+              Convert the given <a href="http://www.jsonml.org/">JsonML</a>-encoded value to a string
+              containing the XML.
             |||),
 
             html.pre({}, |||
@@ -959,7 +1019,7 @@ local html = import 'html.libsonnet';
             |||),
 
             html.p({}, |||
-                Yields a string containing this XML (all on one line):
+              Yields a string containing this XML (all on one line):
             |||),
 
             html.pre({}, html.escape(|||
@@ -970,7 +1030,7 @@ local html = import 'html.libsonnet';
             |||)),
 
             html.p({}, |||
-                Which represents the following image:
+              Which represents the following image:
             |||),
 
             |||
@@ -981,10 +1041,10 @@ local html = import 'html.libsonnet';
             |||,
 
             html.p({}, |||
-                JsonML is designed to preserve "mixed-mode content" (i.e., textual data outside of or next
-                to elements). This includes the whitespace needed to avoid having all the XML on one line,
-                which is meaningful in XML. In order to have whitespace in the XML output, it must be
-                present in the JsonML input:
+              JsonML is designed to preserve "mixed-mode content" (i.e., textual data outside of or next
+              to elements). This includes the whitespace needed to avoid having all the XML on one line,
+              which is meaningful in XML. In order to have whitespace in the XML output, it must be
+              present in the JsonML input:
             |||),
 
             html.pre({}, |||
@@ -1035,26 +1095,26 @@ local html = import 'html.libsonnet';
               |||,
               output: (
                 std.manifestTomlEx({
-                  key1: "value",
+                  key1: 'value',
                   key2: 1,
                   section: {
                     a: 1,
-                    b: "str",
+                    b: 'str',
                     c: false,
-                    d: [1, "s", [2, 3]],
+                    d: [1, 's', [2, 3]],
                     subsection: {
-                      k: "v",
+                      k: 'v',
                     },
                   },
                   sectionArray: [
-                    { k: "v1", v: 123 },
-                    { k: "v2", c: "value2" },
+                    { k: 'v1', v: 123 },
+                    { k: 'v2', c: 'value2' },
                   ],
-                }, "  ")
-              )
+                }, '  ')
+              ),
             },
-          ]
-        }
+          ],
+        },
       ],
     },
     {
@@ -1064,6 +1124,7 @@ local html = import 'html.libsonnet';
         {
           name: 'makeArray',
           params: ['sz', 'func'],
+          availableSince: '0.10.0',
           description: |||
             Create a new array of <code>sz</code> elements by calling <code>func(i)</code> to initialize
             each element. Func is expected to be a function that takes a single parameter, the index of
@@ -1088,6 +1149,7 @@ local html = import 'html.libsonnet';
         {
           name: 'count',
           params: ['arr', 'x'],
+          availableSince: '0.10.0',
           description: |||
             Return the number of times that <code>x</code> occurs in <code>arr</code>.
           |||,
@@ -1095,6 +1157,7 @@ local html = import 'html.libsonnet';
         {
           name: 'find',
           params: ['value', 'arr'],
+          availableSince: '0.10.0',
           description: |||
             Returns an array that contains the indexes of all occurrences of <code>value</code> in
             <code>arr</code>.
@@ -1103,6 +1166,7 @@ local html = import 'html.libsonnet';
         {
           name: 'map',
           params: ['func', 'arr'],
+          availableSince: '0.10.0',
           description: |||
             Apply the given function to every element of the array to form a new array.
           |||,
@@ -1110,6 +1174,7 @@ local html = import 'html.libsonnet';
         {
           name: 'mapWithIndex',
           params: ['func', 'arr'],
+          availableSince: '0.10.0',
           description: |||
             Similar to <a href="#map">map</a> above, but it also passes to the function the element's
             index in the array. The function <code>func</code> is expected to take the index as the
@@ -1119,6 +1184,7 @@ local html = import 'html.libsonnet';
         {
           name: 'filterMap',
           params: ['filter_func', 'map_func', 'arr'],
+          availableSince: '0.10.0',
           description: |||
             It first filters, then maps the given array, using the two functions provided.
           |||,
@@ -1126,6 +1192,7 @@ local html = import 'html.libsonnet';
         {
           name: 'flatMap',
           params: ['func', 'arr'],
+          availableSince: '0.10.0',
           description: html.paragraphs([
             |||
               Apply the given function to every element of <code>arr</code> to form a new array then flatten the result.
@@ -1135,7 +1202,7 @@ local html = import 'html.libsonnet';
             |||
               The <code>std.flatMap</code> function can be thought of as a generalized <code>std.map</code>,
               with each element mapped to 0, 1 or more elements.
-            |||
+            |||,
           ]),
           examples: [
             {
@@ -1152,13 +1219,14 @@ local html = import 'html.libsonnet';
             },
             {
               input: 'std.flatMap(function(x) x+x, "foo")',
-              output: std.flatMap(function(x) x+x, "foo")
+              output: std.flatMap(function(x) x + x, 'foo'),
             },
           ],
         },
         {
           name: 'filter',
           params: ['func', 'arr'],
+          availableSince: '0.10.0',
           description: |||
             Return a new array containing all the elements of <code>arr</code> for which the
             <code>func</code> function returns true.
@@ -1167,6 +1235,7 @@ local html = import 'html.libsonnet';
         {
           name: 'foldl',
           params: ['func', 'arr', 'init'],
+          availableSince: '0.10.0',
           description: |||
             Classic foldl function. Calls the function on the result of the previous function call and
             each array element, or <code>init</code> in the case of the initial element. Traverses the
@@ -1176,6 +1245,7 @@ local html = import 'html.libsonnet';
         {
           name: 'foldr',
           params: ['func', 'arr', 'init'],
+          availableSince: '0.10.0',
           description: |||
             Classic foldr function. Calls the function on the result of the previous function call and
             each array element, or <code>init</code> in the case of the initial element. Traverses the
@@ -1185,6 +1255,7 @@ local html = import 'html.libsonnet';
         {
           name: 'range',
           params: ['from', 'to'],
+          availableSince: '0.10.0',
           description: |||
             Return an array of ascending numbers between the two limits, inclusively.
           |||,
@@ -1210,6 +1281,7 @@ local html = import 'html.libsonnet';
         {
           name: 'slice',
           params: ['indexable', 'index', 'end', 'step'],
+          availableSince: '0.10.0',
           description: html.paragraphs([
             |||
               Selects the elements of an array or a string from <code>index</code> to <code>end</code> with <code>step</code> and returns an array or a string respectively.
@@ -1236,6 +1308,7 @@ local html = import 'html.libsonnet';
         {
           name: 'join',
           params: ['sep', 'arr'],
+          availableSince: '0.10.0',
           description: |||
             If <code>sep</code> is a string, then <code>arr</code> must be an array of strings, in which
             case they are concatenated with <code>sep</code> used as a delimiter. If <code>sep</code>
@@ -1256,6 +1329,7 @@ local html = import 'html.libsonnet';
         {
           name: 'lines',
           params: ['arr'],
+          availableSince: '0.10.0',
           description: |||
             Concatenate an array of strings into a text file with newline characters after each string.
             This is suitable for constructing bash scripts and the like.
@@ -1264,6 +1338,7 @@ local html = import 'html.libsonnet';
         {
           name: 'flattenArrays',
           params: ['arr'],
+          availableSince: '0.10.0',
           description: |||
             Concatenate an array of arrays into a single array.
           |||,
@@ -1285,6 +1360,7 @@ local html = import 'html.libsonnet';
         {
           name: 'sort',
           params: ['arr', 'keyF=id'],
+          availableSince: '0.10.0',
           description: html.paragraphs([
             |||
               Sorts the array using the <= operator.
@@ -1298,6 +1374,7 @@ local html = import 'html.libsonnet';
         {
           name: 'uniq',
           params: ['arr', 'keyF=id'],
+          availableSince: '0.10.0',
           description: html.paragraphs([
             |||
               Removes successive duplicates. When given a sorted array, removes all duplicates.
@@ -1311,7 +1388,7 @@ local html = import 'html.libsonnet';
         {
           name: 'all',
           params: ['arr'],
-          availableSince: 'v0.19.0',
+          availableSince: '0.19.0',
           description: html.paragraphs([
             |||
               Return true if all elements of <code>arr</code> is true, false otherwise. <code>all([])</code> evaluates to true.
@@ -1324,7 +1401,7 @@ local html = import 'html.libsonnet';
         {
           name: 'any',
           params: ['arr'],
-          availableSince: 'v0.19.0',
+          availableSince: '0.19.0',
           description: html.paragraphs([
             |||
               Return true if any element of <code>arr</code> is true, false otherwise. <code>any([])</code> evaluates to false.
@@ -1337,7 +1414,7 @@ local html = import 'html.libsonnet';
         {
           name: 'sum',
           params: ['arr'],
-          availableSince: 'v0.19.2',
+          availableSince: 'upcoming',
           description: html.paragraphs([
             |||
               Return sum of all element in <code>arr</code>.
@@ -1368,6 +1445,7 @@ local html = import 'html.libsonnet';
         {
           name: 'set',
           params: ['arr', 'keyF=id'],
+          availableSince: '0.10.0',
           description: |||
             Shortcut for std.uniq(std.sort(arr)).
           |||,
@@ -1375,6 +1453,7 @@ local html = import 'html.libsonnet';
         {
           name: 'setInter',
           params: ['a', 'b', 'keyF=id'],
+          availableSince: '0.10.0',
           description: |||
             Set intersection operation (values in both a and b).
           |||,
@@ -1382,6 +1461,7 @@ local html = import 'html.libsonnet';
         {
           name: 'setUnion',
           params: ['a', 'b', 'keyF=id'],
+          availableSince: '0.10.0',
           description: |||
             Set union operation (values in any of <code>a</code> or <code>b</code>). Note that + on sets will simply
             concatenate
@@ -1402,6 +1482,7 @@ local html = import 'html.libsonnet';
         {
           name: 'setDiff',
           params: ['a', 'b', 'keyF=id'],
+          availableSince: '0.10.0',
           description: |||
             Set difference operation (values in a but not b).
           |||,
@@ -1409,6 +1490,7 @@ local html = import 'html.libsonnet';
         {
           name: 'setMember',
           params: ['x', 'arr', 'keyF=id'],
+          availableSince: '0.10.0',
           description: |||
             Returns <code>true</code> if x is a member of array, otherwise <code>false</code>.
           |||,
@@ -1422,6 +1504,7 @@ local html = import 'html.libsonnet';
         {
           name: 'base64',
           params: ['input'],
+          availableSince: '0.10.0',
           description: |||
             Encodes the given value into a base64 string. The encoding sequence is <code>A-Za-z0-9+/</code> with
             <code>=</code>
@@ -1433,6 +1516,7 @@ local html = import 'html.libsonnet';
         {
           name: 'base64DecodeBytes',
           params: ['str'],
+          availableSince: '0.10.0',
           description: |||
             Decodes the given base64 string into an array of bytes (number values). Currently assumes
             the input string has no linebreaks and is padded to a multiple of 4 (with the = character).
@@ -1442,6 +1526,7 @@ local html = import 'html.libsonnet';
         {
           name: 'base64Decode',
           params: ['str'],
+          availableSince: '0.10.0',
           description: html.paragraphs([
             |||
               <em>Deprecated, use <code>std.base64DecodeBytes</code> and decode the string explicitly (e.g. with <code>std.decodeUTF8</code>) instead.</code></em>
@@ -1454,6 +1539,7 @@ local html = import 'html.libsonnet';
         {
           name: 'md5',
           params: ['s'],
+          availableSince: '0.10.0',
           description: |||
             Encodes the given value into an MD5 string.
           |||,
@@ -1467,6 +1553,7 @@ local html = import 'html.libsonnet';
         {
           name: 'xor',
           params: ['x', 'y'],
+          availableSince: 'upcoming',
           description: |||
             Returns the xor of the two given booleans.
           |||,
@@ -1474,6 +1561,7 @@ local html = import 'html.libsonnet';
         {
           name: 'xnor',
           params: ['x', 'y'],
+          availableSince: 'upcoming',
           description: |||
             Returns the xnor of the two given booleans.
           |||,
@@ -1487,6 +1575,7 @@ local html = import 'html.libsonnet';
         {
           name: 'mergePatch',
           params: ['target', 'patch'],
+          availableSince: '0.10.0',
           description: |||
             Applies <code>patch</code> to <code>target</code>
             according to <a href="https://tools.ietf.org/html/rfc7396">RFC7396</a>
@@ -1504,13 +1593,14 @@ local html = import 'html.libsonnet';
           availableSince: '0.11.0',
           description: [
             html.p({}, |||
-                Outputs the given string <code>str</code> to stderr and
-                returns <code>rest</code> as the result.
+              Outputs the given string <code>str</code> to stderr and
+              returns <code>rest</code> as the result.
             |||),
             html.p({}, |||
               Example:
             |||),
-            html.p({},
+            html.p(
+              {},
               html.pre({}, |||
                 local conditionalReturn(cond, in1, in2) =
                   if (cond) then
@@ -1528,7 +1618,8 @@ local html = import 'html.libsonnet';
             html.p({}, |||
               Prints:
             |||),
-            html.p({},
+            html.p(
+              {},
               html.pre({}, |||
                 TRACE: test.jsonnet:3 cond is true returning {"b": true}
                 {
diff --git a/doc/ref/stdlib.html b/doc/ref/stdlib.html
index a42ec2187..39e3efe09 100644
--- a/doc/ref/stdlib.html
+++ b/doc/ref/stdlib.html
@@ -31,6 +31,9 @@ <h1 id="standard_library">
         then the actual code executed would be <code>local std = { ... }; {x: "foo"}</code>. The
         functions in the standard library are all hidden fields of the <code>std</code> object.
       </p>
+      <p>
+        Note: Some of these functions marked available since v0.10.0 were actually available earlier.
+      </p>
     </div>
     <div style="clear: both"></div>
   </div>
@@ -60,6 +63,11 @@ <h4 id="extVar">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         If an external variable with the given name was defined, return its string value. Otherwise, raise an error.
       </p>
@@ -94,6 +102,11 @@ <h4 id="thisFile">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Note that this is a field. It contains the current Jsonnet filename as a string.
       </p>
@@ -116,6 +129,11 @@ <h4 id="type">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Return a string that indicates the type of the value. The possible return values are:
         "array", "boolean", "function", "null", "number", "object", and "string".
@@ -145,6 +163,11 @@ <h4 id="length">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Depending on the type of the value given, either returns the number of elements in the
         array, the number of codepoints in the string, the number of parameters in the function, or
@@ -198,6 +221,11 @@ <h4 id="objectHas">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Returns <code>true</code> if the given object has the field (given as a string), otherwise
         <code>false</code>. Raises an error if the arguments are not object and string
@@ -222,6 +250,11 @@ <h4 id="objectFields">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Returns an array of strings, each element being a field from the given object. Does not include
         hidden fields.
@@ -300,6 +333,11 @@ <h4 id="objectHasAll">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         As <code>std.objectHas</code> but also includes hidden fields.
       </p>
@@ -322,6 +360,11 @@ <h4 id="objectFieldsAll">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         As <code>std.objectFields</code> but also includes hidden fields.
       </p>
@@ -398,6 +441,11 @@ <h4 id="prune">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Recursively remove all "empty" members of <code>a</code>. "Empty" is defined as zero
         length `arrays`, zero length `objects`, or `null` values.
@@ -422,6 +470,11 @@ <h4 id="mapWithKey">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Apply the given function to all fields of the given object, also passing
         the field name. The function <code>func</code> is expected to take the
@@ -469,6 +522,7 @@ <h3 id="math">
           <ul><code>std.asin(x)</code></ul>
           <ul><code>std.acos(x)</code></ul>
           <ul><code>std.atan(x)</code></ul>
+          <ul><code>std.round(x)</code></ul>
       </ul>
       <p>
           The function <code>std.mod(a, b)</code> is what the % operator is desugared to. It performs
@@ -541,6 +595,11 @@ <h4 id="assertEqual">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Ensure that <code>a == b</code>. Returns <code>true</code> or throws an error message.
       </p>
@@ -575,6 +634,11 @@ <h4 id="toString">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Convert the given argument to a string.
       </p>
@@ -597,6 +661,11 @@ <h4 id="codepoint">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Returns the positive integer representing the unicode codepoint of the character in the
         given single-character string. This function is the inverse of <code>std.char(n)</code>.
@@ -620,6 +689,11 @@ <h4 id="char">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Returns a string of length one whose only unicode codepoint has integer id <code>n</code>.
         This function is the inverse of <code>std.codepoint(str)</code>.
@@ -643,6 +717,11 @@ <h4 id="substr">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Returns a string that is the part of <code>s</code> that starts at offset <code>from</code>
         and is <code>len</code> codepoints long. If the string <code>s</code> is shorter than
@@ -667,6 +746,11 @@ <h4 id="findSubstr">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Returns an array that contains the indexes of all occurrences of <code>pat</code> in
         <code>str</code>.
@@ -690,6 +774,11 @@ <h4 id="startsWith">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Returns whether the string a is prefixed by the string b.
       </p>
@@ -712,6 +801,11 @@ <h4 id="endsWith">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Returns whether the string a is suffixed by the string b.
       </p>
@@ -839,6 +933,11 @@ <h4 id="split">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Split the string <code>str</code> into an array of strings, divided by the string
         <code>c</code>.
@@ -870,6 +969,11 @@ <h4 id="splitLimit">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         As <code>std.split(str, c)</code> but will stop after <code>maxsplits</code> splits, thereby the largest
         array it will return has length <code>maxsplits + 1</code>. A limit of <code>-1</code> means unlimited.
@@ -903,7 +1007,7 @@ <h4 id="splitLimitR">
     <div class="panel">
       <p>
         <em>
-          Available since version v0.19.0.
+          Available since version 0.19.0.
         </em>
       </p>
       <p>
@@ -930,6 +1034,11 @@ <h4 id="strReplace">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Returns a copy of the string in which all occurrences of string <code>from</code> have been
         replaced with string <code>to</code>.
@@ -942,6 +1051,33 @@ <h4 id="strReplace">
   </div>
 </div>
 
+<div class="hgroup">
+  <div class="hgroup-inline">
+    <div class="panel">
+      <h4 id="isEmpty">
+        std.isEmpty(str)
+      </h4>
+    </div>
+    <div style="clear: both"></div>
+  </div>
+</div>
+<div class="hgroup">
+  <div class="hgroup-inline">
+    <div class="panel">
+      <p>
+        <em>
+          Available in upcoming release.
+        </em>
+      </p>
+      <p>
+        Returns true if the the given string is of zero length.
+      </p>
+      
+    </div>
+    <div style="clear: both"></div>
+  </div>
+</div>
+
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
@@ -955,6 +1091,11 @@ <h4 id="asciiUpper">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Returns a copy of the string in which all ASCII letters are capitalized.
       </p>
@@ -979,6 +1120,11 @@ <h4 id="asciiLower">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Returns a copy of the string in which all ASCII letters are lower cased.
       </p>
@@ -1003,6 +1149,11 @@ <h4 id="stringChars">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Split the string <code>str</code> into an array of strings, each containing a single
         codepoint.
@@ -1028,6 +1179,11 @@ <h4 id="format">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Format the string <code>str</code> using the values in <code>vals</code>. The values can be
         an array, an object, or in other cases are treated as if they were provided in a singleton
@@ -1065,6 +1221,11 @@ <h4 id="escapeStringBash">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Wrap <code>str</code> in single quotes, and escape any single quotes within <code>str</code>
         by changing them to a sequence <tt>'"'"'</tt>. This allows injection of arbitrary strings
@@ -1089,6 +1250,11 @@ <h4 id="escapeStringDollars">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Convert $ to $$ in <code>str</code>. This allows injection of arbitrary strings into
         systems that use $ for string interpolation (like Terraform).
@@ -1112,6 +1278,11 @@ <h4 id="escapeStringJson">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Convert <code>str</code> to allow it to be embedded in a JSON representation, within a
         string. This adds quotes, escapes backslashes, and escapes unprintable characters.
@@ -1138,6 +1309,11 @@ <h4 id="escapeStringPython">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Convert <code>str</code> to allow it to be embedded in Python. This is an alias for
         <code>std.escapeStringJson</code>.
@@ -1161,6 +1337,11 @@ <h4 id="escapeStringXml">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Convert <code>str</code> to allow it to be embedded in XML (or HTML). The following replacements are made:
         <pre>
@@ -1204,6 +1385,11 @@ <h4 id="parseInt">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Parses a signed decimal integer from the input string.
       </p>
@@ -1231,6 +1417,11 @@ <h4 id="parseOctal">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Parses an unsigned octal integer from the input string. Initial zeroes are tolerated.
       </p>
@@ -1255,6 +1446,11 @@ <h4 id="parseHex">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Parses an unsigned hexadecimal integer, from the input string. Case insensitive.
       </p>
@@ -1409,6 +1605,11 @@ <h4 id="manifestIni">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Convert the given structure to a string in <a href="https://en.wikipedia.org/wiki/INI_file">INI format</a>. This
         allows using Jsonnet's
@@ -1456,6 +1657,11 @@ <h4 id="manifestPython">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Convert the given value to a JSON-like form that is compatible with Python. The chief
         differences are True / False / None instead of true / false / null.
@@ -1494,6 +1700,11 @@ <h4 id="manifestPythonVars">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Convert the given object to a JSON-like form that is compatible with Python. The key
         difference to <code>std.manifestPython</code> is that the top level is represented as a list
@@ -1531,6 +1742,11 @@ <h4 id="manifestJsonEx">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Convert the given object to a JSON form. <code>indent</code> is a string containing
         one or more whitespaces that are used for indentation. <code>newline</code> is
@@ -1606,6 +1822,11 @@ <h4 id="manifestYamlDoc">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Convert the given value to a YAML form. Note that <code>std.manifestJson</code> could also
         be used for this purpose, because any JSON is also valid YAML. But this function will
@@ -1664,6 +1885,11 @@ <h4 id="manifestYamlStream">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Given an array of values, emit a YAML "stream", which is a sequence of documents separated
         by <code>---</code> and ending with <code>...</code>.
@@ -1708,6 +1934,11 @@ <h4 id="manifestXmlJsonml">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Convert the given <a href="http://www.jsonml.org/">JsonML</a>-encoded value to a string
         containing the XML.
@@ -1832,6 +2063,11 @@ <h4 id="makeArray">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Create a new array of <code>sz</code> elements by calling <code>func(i)</code> to initialize
         each element. Func is expected to be a function that takes a single parameter, the index of
@@ -1886,6 +2122,11 @@ <h4 id="count">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Return the number of times that <code>x</code> occurs in <code>arr</code>.
       </p>
@@ -1908,6 +2149,11 @@ <h4 id="find">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Returns an array that contains the indexes of all occurrences of <code>value</code> in
         <code>arr</code>.
@@ -1931,6 +2177,11 @@ <h4 id="map">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Apply the given function to every element of the array to form a new array.
       </p>
@@ -1953,6 +2204,11 @@ <h4 id="mapWithIndex">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Similar to <a href="#map">map</a> above, but it also passes to the function the element's
         index in the array. The function <code>func</code> is expected to take the index as the
@@ -1977,6 +2233,11 @@ <h4 id="filterMap">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         It first filters, then maps the given array, using the two functions provided.
       </p>
@@ -1999,6 +2260,11 @@ <h4 id="flatMap">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Apply the given function to every element of <code>arr</code> to form a new array then flatten the result.
         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.
@@ -2038,6 +2304,11 @@ <h4 id="filter">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Return a new array containing all the elements of <code>arr</code> for which the
         <code>func</code> function returns true.
@@ -2061,6 +2332,11 @@ <h4 id="foldl">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Classic foldl function. Calls the function on the result of the previous function call and
         each array element, or <code>init</code> in the case of the initial element. Traverses the
@@ -2085,6 +2361,11 @@ <h4 id="foldr">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Classic foldr function. Calls the function on the result of the previous function call and
         each array element, or <code>init</code> in the case of the initial element. Traverses the
@@ -2109,6 +2390,11 @@ <h4 id="range">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Return an array of ascending numbers between the two limits, inclusively.
       </p>
@@ -2163,6 +2449,11 @@ <h4 id="slice">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Selects the elements of an array or a string from <code>index</code> to <code>end</code> with <code>step</code> and returns an array or a string respectively.
       </p>
@@ -2196,6 +2487,11 @@ <h4 id="join">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         If <code>sep</code> is a string, then <code>arr</code> must be an array of strings, in which
         case they are concatenated with <code>sep</code> used as a delimiter. If <code>sep</code>
@@ -2226,6 +2522,11 @@ <h4 id="lines">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Concatenate an array of strings into a text file with newline characters after each string.
         This is suitable for constructing bash scripts and the like.
@@ -2249,6 +2550,11 @@ <h4 id="flattenArrays">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Concatenate an array of arrays into a single array.
       </p>
@@ -2300,6 +2606,11 @@ <h4 id="sort">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Sorts the array using the <= operator.
       </p>
@@ -2326,6 +2637,11 @@ <h4 id="uniq">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Removes successive duplicates. When given a sorted array, removes all duplicates.
       </p>
@@ -2354,7 +2670,7 @@ <h4 id="all">
     <div class="panel">
       <p>
         <em>
-          Available since version v0.19.0.
+          Available since version 0.19.0.
         </em>
       </p>
       <p>
@@ -2384,7 +2700,7 @@ <h4 id="any">
     <div class="panel">
       <p>
         <em>
-          Available since version v0.19.0.
+          Available since version 0.19.0.
         </em>
       </p>
       <p>
@@ -2414,7 +2730,7 @@ <h4 id="sum">
     <div class="panel">
       <p>
         <em>
-          Available since version v0.19.2.
+          Available in upcoming release.
         </em>
       </p>
       <p>
@@ -2471,6 +2787,11 @@ <h4 id="set">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Shortcut for std.uniq(std.sort(arr)).
       </p>
@@ -2493,6 +2814,11 @@ <h4 id="setInter">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Set intersection operation (values in both a and b).
       </p>
@@ -2515,6 +2841,11 @@ <h4 id="setUnion">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Set union operation (values in any of <code>a</code> or <code>b</code>). Note that + on sets will simply
         concatenate
@@ -2545,6 +2876,11 @@ <h4 id="setDiff">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Set difference operation (values in a but not b).
       </p>
@@ -2567,6 +2903,11 @@ <h4 id="setMember">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Returns <code>true</code> if x is a member of array, otherwise <code>false</code>.
       </p>
@@ -2601,6 +2942,11 @@ <h4 id="base64">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Encodes the given value into a base64 string. The encoding sequence is <code>A-Za-z0-9+/</code> with
         <code>=</code>
@@ -2627,6 +2973,11 @@ <h4 id="base64DecodeBytes">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Decodes the given base64 string into an array of bytes (number values). Currently assumes
         the input string has no linebreaks and is padded to a multiple of 4 (with the = character).
@@ -2651,6 +3002,11 @@ <h4 id="base64Decode">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         <em>Deprecated, use <code>std.base64DecodeBytes</code> and decode the string explicitly (e.g. with <code>std.decodeUTF8</code>) instead.</code></em>
       </p>
@@ -2676,6 +3032,11 @@ <h4 id="md5">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Encodes the given value into an MD5 string.
       </p>
@@ -2710,6 +3071,11 @@ <h4 id="xor">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available in upcoming release.
+        </em>
+      </p>
       <p>
         Returns the xor of the two given booleans.
       </p>
@@ -2719,6 +3085,33 @@ <h4 id="xor">
   </div>
 </div>
 
+<div class="hgroup">
+  <div class="hgroup-inline">
+    <div class="panel">
+      <h4 id="xnor">
+        std.xnor(x, y)
+      </h4>
+    </div>
+    <div style="clear: both"></div>
+  </div>
+</div>
+<div class="hgroup">
+  <div class="hgroup-inline">
+    <div class="panel">
+      <p>
+        <em>
+          Available in upcoming release.
+        </em>
+      </p>
+      <p>
+        Returns the xnor of the two given booleans.
+      </p>
+      
+    </div>
+    <div style="clear: both"></div>
+  </div>
+</div>
+
 
 <div class="hgroup">
   <div class="hgroup-inline">
@@ -2744,6 +3137,11 @@ <h4 id="mergePatch">
 <div class="hgroup">
   <div class="hgroup-inline">
     <div class="panel">
+      <p>
+        <em>
+          Available since version 0.10.0.
+        </em>
+      </p>
       <p>
         Applies <code>patch</code> to <code>target</code>
         according to <a href="https://tools.ietf.org/html/rfc7396">RFC7396</a>
diff --git a/release_checklist.md b/release_checklist.md
index dfd725b33..968b38ea7 100644
--- a/release_checklist.md
+++ b/release_checklist.md
@@ -69,7 +69,7 @@ in one sitting and fix any unexpected problems.
 ```
 ./tools/scripts/replace_test_cmd_version.sh <NEW_VERSION>
 ```
-* In stdlib documentation replace any "Available in upcoming release." with "Available since NEW_VERSION_GOES_HERE".
+* In `doc/_stdlib_gen/stdlib-content.jsonnet` replace any `availableSince: "upcoming"` with NEW_VERSION".
 * Send a PR and wait for CI to be green before merging.
 * Create a release on Github. Put the previously prepared release notes there.
 * Upload the Python package.


Test patch:
diff --git a/doc/_stdlib_gen/run_tests.sh b/doc/_stdlib_gen/run_tests.sh
new file mode 100755
index 000000000..44fe281a2
--- /dev/null
+++ b/doc/_stdlib_gen/run_tests.sh
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+
+# Copyright 2015 Google Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+TEST_SUITE_NAME="${TEST_SUITE_NAME:-$0}"
+
+cd $(dirname $0)
+
+JSONNET_BIN="${JSONNET_BIN:-../../jsonnet}"
+
+source ../../test_suite/tests.source
+
+init
+
+shopt -s nullglob
+
+FAILED=0
+SUCCESS=0
+
+test_eval "$JSONNET_BIN" "stdlib-content-test.jsonnet" 0 "true" "PLAIN"
+
+deinit
+
+if [ "$FAILED" -eq 0 ] ; then
+    echo "$TEST_SUITE_NAME: All $EXECUTED tests executed correctly."
+else
+    echo "$TEST_SUITE_NAME: $FAILED / $EXECUTED tests failed."
+    exit 1
+fi
+
+
diff --git a/doc/_stdlib_gen/stdlib-content-test.jsonnet b/doc/_stdlib_gen/stdlib-content-test.jsonnet
new file mode 100644
index 000000000..04f9b4c72
--- /dev/null
+++ b/doc/_stdlib_gen/stdlib-content-test.jsonnet
@@ -0,0 +1,13 @@
+local stdlib_content = import 'stdlib-content.jsonnet';
+
+std.all([
+  if !std.objectHas(field, 'availableSince') then
+    error 'No availableSince field for std.%s' % field.name
+  else if field.availableSince[0] == 'v' then
+    error 'availableSince field for std.%s should not begin with a "v" (got %s)'
+          % [field.name, field.availableSince]
+  else
+    true
+  for group in stdlib_content.groups
+  for field in group.fields
+])
diff --git a/tests.sh b/tests.sh
index c53ca0f63..235e9ef39 100755
--- a/tests.sh
+++ b/tests.sh
@@ -16,6 +16,7 @@ examples/check.sh || FAIL=TRUE
 examples/terraform/check.sh || FAIL=TRUE
 test_cmd/run_cmd_tests.sh || FAIL=TRUE
 test_suite/run_tests.sh || FAIL=TRUE
+doc/_stdlib_gen/run_tests.sh || FAIL=TRUE
 if [ -z "$DISABLE_FMT_TESTS" ]; then
     test_suite/run_fmt_tests.sh || FAIL=TRUE
     test_suite/run_fmt_idempotence_tests.sh || FAIL=TRUE