view xml/en/docs/njs/changes.xml @ 3039:e6b785b7e308

Minor fixes in njs documentation.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 06 Feb 2024 08:52:52 +0000
parents 00c220310f53
children b55264db8d9f
line wrap: on
line source

<?xml version="1.0"?>

<!--
  Copyright (C) Nginx, Inc.
  -->

<!DOCTYPE article SYSTEM "../../../../dtd/article.dtd">

<article name="Changes"
        link="/en/docs/njs/changes.html"
        lang="en"
        rev="67"
        toc="no">

<section id="njs0.8.2" name="Changes with njs 0.8.2">

<para>
Release Date:
24 October 2023
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
introduced
<link doc="reference.xml" id="console">console</link> object.
The following methods were introduced:
<link doc="reference.xml" id="console_error"><literal>error()</literal></link>,
<link doc="reference.xml" id="console_info"><literal>info()</literal></link>,
<link doc="reference.xml" id="console_log"><literal>log()</literal></link>,
<link doc="reference.xml" id="console_time"><literal>time()</literal></link>,
<link doc="reference.xml" id="console_time_end"><literal>timeEnd()</literal></link>,
<link doc="reference.xml" id="console_warn"><literal>warn()</literal></link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>HEAD</literal> response handling with large Content-Length in
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<link doc="reference.xml" id="dict_items"><literal>items()</literal></link>
method for a shared dictionary.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<link doc="reference.xml" id="dict_delete"><literal>delete()</literal></link>
method for a shared dictionary.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
extended
<link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link> module.
Added
<link doc="reference.xml" id="fs_existssync"><literal>fs.existsSync()</literal></link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<link doc="reference.xml" id="xml"><literal>xml</literal></link> module.
Broken XML exception handling in
<link doc="reference.xml" id="xml_parse"><literal>xml.parse()</literal></link>
method was fixed.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Regexp.prototype.exec()</literal> with global regexp and Unicode input.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.8.1" name="Changes with njs 0.8.1">

<para>
Release Date:
12 September 2023
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
introduced the <literal>js_periodic</literal> directive for
<link doc="../http/ngx_http_js_module.xml" id="js_periodic">http</link>
and
<link doc="../stream/ngx_stream_js_module.xml" id="js_periodic">stream</link>
that allows specifying a JS handler to run at regular intervals.
</para>
</listitem>

<listitem>
<para>
Feature:
implemented
<link doc="reference.xml" id="dict_items"><literal>items()</literal></link>
method of a
<link doc="reference.xml" id="ngx_shared">shared dictionary</link>.
The method returns all the non-expired key-value pairs.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<link doc="reference.xml" id="dict_size"><literal>size()</literal></link>
and
<link doc="reference.xml" id="dict_keys"><literal>keys()</literal></link>
methods of a
<link doc="reference.xml" id="ngx_shared">shared dictionary</link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed erroneous exception in
<link doc="reference.xml" id="r_internal_redirect"><literal>r.internalRedirect()</literal></link>
introduced in <link id="njs0.8.0">0.8.0</link>.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Bugfix:
fixed incorrect order of keys in
<literal>Object.getOwnPropertyNames()</literal>.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.8.0" name="Changes with njs 0.8.0">

<para>
Release Date:
06 July 2023
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Change:
removed special treatment of forbidden headers in
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>
introduced in <link id="njs0.7.10">0.7.10</link>.
</para>
</listitem>

<listitem>
<para>
Change:
removed deprecated since <link id="njs0.5.0">0.5.0</link>
<link doc="reference.xml" id="r_request_body"><literal>r.requestBody</literal></link>
and
<link doc="reference.xml" id="r_response_body"><literal>r.responseBody</literal></link>
in
<link doc="../http/ngx_http_js_module.xml"><literal>http</literal></link>
module.
</para>
</listitem>

<listitem>
<para>
Change:
throwing an exception in
<link doc="reference.xml" id="r_internal_redirect"><literal>r.internalRedirect()</literal></link>
while filtering in
<link doc="../http/ngx_http_js_module.xml"><literal>http</literal></link>
module.
</para>
</listitem>

<listitem>
<para>
Feature:
introduced more global
<link doc="reference.xml" id="ngx"><literal>nginx</literal></link> properties:
<link doc="reference.xml" id="ngx_build"><literal>ngx.build</literal></link>,
<link doc="reference.xml" id="ngx_conf_file_path"><literal>ngx.conf_file_path</literal></link>,
<link doc="reference.xml" id="ngx_error_log_path"><literal>ngx.error_log_path</literal></link>,
<link doc="reference.xml" id="ngx_prefix"><literal>ngx.prefix</literal></link>,
<link doc="reference.xml" id="ngx_version"><literal>ngx.version</literal></link>,
<link doc="reference.xml" id="ngx_version_number"><literal>ngx.version_number</literal></link>,
and
<link doc="reference.xml" id="ngx_worker_id"><literal>ngx.worker_id</literal></link>.
</para>
</listitem>

<listitem>
<para>
Feature:
introduced the <literal>js_shared_dict_zone</literal> directive for
<link doc="../http/ngx_http_js_module.xml" id="js_shared_dict_zone">http</link>
and
<link doc="../stream/ngx_stream_js_module.xml" id="js_shared_dict_zone">stream</link>
that allows declaring a dictionary shared between worker processes.
</para>
</listitem>

<listitem>
<para>
Feature:
introduced global
<link doc="reference.xml" id="ngx_shared"><literal>nginx.shared</literal></link>
methods and properties for working with shared dictionaries.
</para>
</listitem>

<listitem>
<para>
Improvement:
added compile-time options to disable njs modules.
For example, to disable libxslt-related code:
<example>
NJS_LIBXSLT=NO ./configure  .. --add-module=/path/to/njs/module
</example>
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<link doc="reference.xml" id="r_status"><literal>r.status</literal></link>
setter when filtering in
<link doc="../http/ngx_http_js_module.xml"><literal>http</literal></link>
module.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed setting of Location header in
<link doc="../http/ngx_http_js_module.xml"><literal>http</literal></link>
module.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Change:
native methods are provided with <literal>retval</literal> argument.
This change breaks compatibility with C extension for njs
requiring the modification of the code.
</para>
</listitem>

<listitem>
<para>
Change:
non-compliant deprecated String methods were removed.
The following methods were removed:
<link doc="reference.xml" id="string_bytesfrom"><literal>String.bytesFrom()</literal></link>,
<link doc="reference.xml" id="string_frombytes"><literal>String.prototype.fromBytes()</literal></link>,
<link doc="reference.xml" id="string_fromutf8"><literal>String.prototype.fromUTF8()</literal></link>,
<link doc="reference.xml" id="string_tobytes"><literal>String.prototype.toBytes()</literal></link>,
<link doc="reference.xml" id="string_toutf8"><literal>String.prototype.toUTF8()</literal></link>,
<link doc="reference.xml" id="string_toutf8"><literal>String.prototype.toString(<value>encoding</value>)</literal></link>.
</para>
</listitem>

<listitem>
<para>
Change:
removed support for building with GNU readline.
</para>
</listitem>

<listitem>
<para>
Feature:
added ES13-compliant <literal>Array</literal> methods:
<literal>Array.from()</literal>,
<literal>Array.prototype.toSorted()</literal>,
<literal>Array.prototype.toSpliced()</literal>,
<literal>Array.prototype.toReversed()</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
added ES13-compliant <literal>TypedArray</literal> methods:
<literal>%TypedArray%.prototype.toSorted()</literal>,
<literal>%TypedArray%.prototype.toSpliced()</literal>,
<literal>%TypedArray%.prototype.toReversed()</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="cryptokey"><literal>CryptoKey</literal></link>
properties in
<link doc="reference.xml" id="builtin_crypto">WebCrypto API</link>.
The following properties were added:
<link doc="reference.xml" id="cryptokey_alg"><literal>algorithm</literal></link>,
<link doc="reference.xml" id="cryptokey_extractable"><literal>extractable</literal></link>,
<link doc="reference.xml" id="cryptokey_type"><literal>type</literal></link>,
<link doc="reference.xml" id="cryptokey_usages"><literal>usages</literal></link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>retval</literal> of
<link doc="reference.xml" id="crypto_get_random_values"><literal>сrypto.getRandomValues()</literal></link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed evaluation of computed property names with function expressions.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed implicit name for a function expression declared in arrays.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed parsing of <literal>for-in</literal> loops.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Date.parse()</literal> with ISO-8601 format and UTC time offset.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.7.12" name="Changes with njs 0.7.12">

<para>
Release Date:
10 April 2023
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Bugfix:
fixed <literal>Headers()</literal> constructor in
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="crypto_hash_copy"><literal>Hash.copy()</literal></link>
method in
<link doc="reference.xml" id="crypto">crypto</link> module.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="zlib">zlib</link>
module.
</para>
</listitem>

<listitem>
<para>
Improvement:
added support for
<literal>export {name as default}</literal> statement.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Number</literal> constructor according to the spec.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.7.11" name="Changes with njs 0.7.11">

<para>
Release Date:
09 March 2023
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Bugfix:
added missed linking with
<link url="https://gitlab.gnome.org/GNOME/libxml2">libxml2</link>
for the dynamic module.
The bug was introduced in <link id="njs0.7.10">0.7.10</link>.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="xml_node">XMLNode API</link>
to modify XML documents.
</para>
</listitem>

<listitem>
<para>
Change:
removed <literal>XML_PARSE_DTDVALID</literal> during parsing of an XML document
due to security implications.
The issue was introduced in <link id="njs0.7.10">0.7.10</link>.
When <literal>XML_PARSE_DTDVALID</literal> is enabled,
<link url="https://gitlab.gnome.org/GNOME/libxml2">libxml2</link>
parses and executes external entities present inside an XML document.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed the detection of <literal>await</literal> in arguments.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Error()</literal> instance dumping
when “<literal>name</literal>” prop is not primitive.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed array instance with a <literal>getter</literal> property dumping.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>njs_object_property()</literal> with
<literal>NJS_WHITEOUT</literal> properties.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>func</literal> instance dumping
with “<literal>name</literal>” as getter.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed attaching of a stack to an error object.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>String.prototype.replace()</literal> with replacement
containing “<literal>$'</literal>”, “<literal>$`</literal>”.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.7.10" name="Changes with njs 0.7.10">

<para>
Release Date:
07 February 2023
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="request"><literal>Request</literal></link>,
<link doc="reference.xml" id="response"><literal>Response</literal></link>,
and
<link doc="reference.xml" id="headers"><literal>Headers</literal></link>
ctors in
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed nginx logger callback for calls in the master process.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added signal support in CLI.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="xml"><literal>xml</literal></link>
module for working with XML documents.
</para>
</listitem>

<listitem>
<para>
Feature:
extended support for symmetric and asymmetric keys in WebCrypto.
Most notably <literal>JWK</literal> format for
<link doc="reference.xml" id="crypto_subtle_import_key"><literal>importKey()</literal></link>
was added.
</para>
</listitem>

<listitem>
<para>
Feature:
extended support for symmetric and asymmetric keys in
<link doc="reference.xml" id="builtin_crypto">WebCrypto API</link>.
Most notably <literal>JWK</literal> format for
<link doc="reference.xml" id="crypto_subtle_import_key"><literal>importKey()</literal></link>
was added.
<link doc="reference.xml" id="crypto_subtle_generate_key"><literal>generateKey()</literal></link>
and
<link doc="reference.xml" id="crypto_subtle_export_key"><literal>exportKey()</literal></link>
were also implemented.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<literal>String.prototype.replaceAll()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>for(expr1;</literal> conditional syntax error handling.
</para>
</listitem>

<listitem>
<para>
Bugfix:
<literal>Object.values()</literal>
and
<literal>Object.entries()</literal>
with external objects.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>RegExp.prototype[@@replace]()</literal>.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.7.9" name="Changes with njs 0.7.9">

<para>
Release Date:
17 November 2022
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Bugfix:
fixed
<link doc="reference.xml" id="ngx_fetch"><literal>Fetch</literal></link>
Response prototype reinitialization.
When at least one <literal>js_import</literal> directive was declared in both
<link doc="../http/ngx_http_js_module.xml" id="js_import">HTTP</link>
and
<link doc="../stream/ngx_stream_js_module.xml" id="js_import">Stream</link>,
<link doc="reference.xml" id="ngx_fetch"><literal>ngx.fetch()</literal></link>
returned inapproriate response in Stream.
The bug was introduced in <link id="njs0.7.7">0.7.7</link>.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Bugfix:
fixed <literal>String.prototype.replace(re)</literal>
if <literal>re.exec()</literal> returns non-flat array.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Array.prototype.fill()</literal>
when <literal>start</literal> object changes <literal>this</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed description for
<link doc="reference.xml" id="fs_mkdirsync"><literal>fs.mkdir()</literal></link>
and
<link doc="reference.xml" id="fs_rmdirsync"><literal>fs.rmdir()</literal></link>
methods.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>%TypedArray%.prototype.set(s)</literal>
when <literal>s</literal> element changes <literal>this</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Array.prototype.splice(s,d)</literal>
when <literal>d</literal> resizes <literal>this</literal> during eval.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>for-in</literal> loop with left and right hand side expressions.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.7.8" name="Changes with njs 0.7.8">

<para>
Release Date:
25 October 2022
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
added
<link doc="../http/ngx_http_js_module.xml" id="js_preload_object"/> directive.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="ngx_conf_prefix"><literal>ngx.conf_prefix</literal></link><literal></literal>
property.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="s_send_upstream"><literal>s.sendUpstream()</literal></link>
and
<link doc="reference.xml" id="s_send_downstream"><literal>s.sendDownstream()</literal></link>
in
<link doc="../stream/ngx_stream_js_module.xml">stream</link> module.
</para>
</listitem>

<listitem>
<para>
Feature:
added support for <literal>HEAD</literal> method in
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
</para>
</listitem>

<listitem>
<para>
Improvement:
improved <literal>async</literal> callback support for
<link doc="reference.xml" id="s_send"><literal>s.send()</literal></link>
in
<link doc="../stream/ngx_stream_js_module.xml">stream</link> module.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added <literal>name</literal> instance property for a function object.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="njs_memory_stats"><literal>njs.memoryStats</literal></link>
object.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>String.prototype.trimEnd()</literal>
with unicode string.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Object.freeze()</literal> with fast arrays.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Object.defineProperty()</literal> with fast arrays.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>async</literal> token as a property name of an object.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed property set instruction when key modifies base binding.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed complex assignments.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed handling of unhandled promise rejection.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed process.env
when duplicate environ variables are present.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed double declaration detection in modules.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed bound function calls according to the spec.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed break label for <literal>if</literal> statement.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed labeled empty statements.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.7.7" name="Changes with njs 0.7.7">

<para>
Release Date:
30 August 2022
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
the number of nginx configuration contexts where
js directives can be specified is extended.

<list type="bullet">

<listitem id="contexts">
<para>
HTTP:
the <link doc="../http/ngx_http_js_module.xml" id="js_import"/>,
<link doc="../http/ngx_http_js_module.xml" id="js_path"/>,
<link doc="../http/ngx_http_js_module.xml" id="js_set"/>, and
<link doc="../http/ngx_http_js_module.xml" id="js_var"/> directives
are allowed in
<literal>server</literal> and <literal>location</literal> contexts.
The <link doc="../http/ngx_http_js_module.xml" id="js_content"/>,
<link doc="../http/ngx_http_js_module.xml" id="js_body_filter"/> and
<link doc="../http/ngx_http_js_module.xml" id="js_header_filter"/>
are allowed in
<link doc="../http/ngx_http_rewrite_module.xml" id="if"/> context.
</para>
</listitem>

<listitem>
<para>
Stream:
the <link doc="../http/ngx_http_js_module.xml" id="js_import"/>,
<link doc="../http/ngx_http_js_module.xml" id="js_path"/>,
<link doc="../http/ngx_http_js_module.xml" id="js_set"/>, and
<link doc="../http/ngx_http_js_module.xml" id="js_var"/>
are allowed in
<literal>server</literal> context.
</para>
</listitem>

</list>

</para>
</listitem>

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="r_internal"><literal>r.internal</literal></link>
property.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed reading response body in
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<link doc="../stream/ngx_stream_js_module.xml" id="js_fetch_timeout"/>
in <link doc="../stream/ngx_stream_js_module.xml">stream</link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed socket leak with <literal>0</literal> fetch timeout.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
extended
<link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link> module.
Added
<link doc="reference.xml" id="fs_opensync"><literal>fs.openSync()</literal></link>,
<link doc="reference.xml" id="fs_promises_open"><literal>fs.promises.open()</literal></link>,
<link doc="reference.xml" id="fs_fstatsync"><literal>fs.fstatSync()</literal></link>,
<link doc="reference.xml" id="fs_readsync"><literal>fs.readSync()</literal></link>,
<link doc="reference.xml" id="fs_writesync_buf"><literal>fs.writeSync()</literal></link>.
</para>

<para>
The following properties of
<link doc="reference.xml" id="fs_filehandle"><literal>FileHandle</literal></link>
are implemented:
<literal>fd</literal>,
<literal>read()</literal>,
<literal>stat()</literal>,
<literal>write()</literal>,
<literal>close()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>parseInt()</literal>,
<literal>parseFloat()</literal>,
<literal>Symbol.for()</literal>
with no arguments.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.7.6" name="Changes with njs 0.7.6">

<para>
Release Date:
19 July 2022
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
improved
<link doc="reference.xml" id="r_args"><literal>r.args{}</literal></link> object.
Added support for multiple arguments with the same key.
Added case sensitivity for keys.
Keys and values are percent-decoded now.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>
setter for special headers.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added <literal>Symbol.for()</literal> and <literal>Symbol.keyfor()</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="atob"><literal>atob()</literal></link>
and
<link doc="reference.xml" id="btoa"><literal>btoa()</literal></link>
from
<link url="https://html.spec.whatwg.org">WHATWG</link> spec.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed large non-decimal literals.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed Unicode argument trimming in <literal>parseInt()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>break</literal> instruction
in <literal>try-catch</literal> block.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>async</literal> function declaration in CLI.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.7.5" name="Changes with njs 0.7.5">

<para>
Release Date:
21 June 2022
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Change:
adapting to changes in nginx header structures.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>
special getters when value is absent.
</para>
</listitem>

<listitem>
<para>
Change:
returning undefined value instead of an empty string for
<literal>Content-Type</literal> when the header is absent.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Bugfix:
fixed catching of the exception thrown from an awaited function.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed function value initialization.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed interpreter when await fails.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed typed-array constructor when source array is changed while iterating.
</para>
</listitem>

<listitem>
<para>
Bugfix:fixed
<literal>String.prototype.replace()</literal>
with byte strings.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed template literal from producing byte-strings.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed array iterator with sparse arrays.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed memory free while converting a flat array to a slow array.
</para>
</listitem>

<listitem>
<para>
Bugfix:
properly handling <literal>NJS_DECLINE</literal> in
<literal>promise</literal> native functions.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed working with an array-like object in
<literal>Promise.all()</literal>
and friends.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.7.4" name="Changes with njs 0.7.4">

<para>
Release Date:
24 May 2022
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
added extended directives for configuring
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
The following directives were added for
<link doc="../http/ngx_http_js_module.xml">http</link> and
<link doc="../stream/ngx_stream_js_module.xml">stream</link>:
<list type="bullet">

<listitem>
<para>
<link doc="../http/ngx_http_js_module.xml" id="js_fetch_timeout"/>,
</para>
</listitem>

<listitem>
<para>
<link doc="../http/ngx_http_js_module.xml" id="js_fetch_verify"/>,
</para>
</listitem>

<listitem>
<para>
<link doc="../http/ngx_http_js_module.xml" id="js_fetch_buffer_size"/>,
</para>
</listitem>

<listitem>
<para>
<link doc="../http/ngx_http_js_module.xml" id="js_fetch_max_response_buffer_size"/>.
</para>
</listitem>

</list>

</para>
</listitem>

<listitem>
<para>
Change:
<link doc="reference.xml" id="r_internal_redirect"><literal>r.internalRedirect()</literal></link> now accepts escaped URIs.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<link doc="reference.xml" id="response">Response</link> parsing
with more than 8 headers in
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="njs_version_number"><literal>njs.version_number</literal></link> property.
</para>
</listitem>

<listitem>
<para>
Feature:
added compatibility with BoringSSL for
<link doc="reference.xml" id="builtin_crypto">WebCrypto API</link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.sort()</literal>
when arr size is changed in a comparator.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.slice()</literal>
with slow <literal>this</literal> argument.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed aggregation methods of <literal>Promise</literal> ctor
with array-like object.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>String.prototype.lastIndexOf()</literal>
with Unicode string as <literal>this</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>JSON.parse()</literal>
when <literal>reviver</literal> function is provided.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Object.defineProperty()</literal>
when a recursive descriptor is provided.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Array.prototype.fill()</literal> for typed-arrays.
</para>
</listitem>

<listitem>
<para>
Bugfix:
making function expression binding immutable according to the specs.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed redefinition of special props in
<literal>Object.defineProperty()</literal>.
</para>
</listitem>

</list>
</para>

</section>



<section id="njs0.7.3" name="Changes with njs 0.7.3">

<para>
Release Date:
12 April 2022
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added support of module resolution callback.
This feature allows the host environment to control
how imported modules are loaded.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed backtraces while traversing imported user modules.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.concat()</literal>
when <literal>this</literal> is a slow array.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed frame allocation from an awaited frame.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed allocation of large array literals.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed interpreter when <literal>toString</literal> conversion fails.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.7.2" name="Changes with njs 0.7.2">

<para>
Release Date:
25 January 2022
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.join()</literal>
when array is changed while iterating.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.slice()</literal>
when array is changed while iterating.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.concat()</literal>
when array is changed while iterating.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.reverse()</literal>
when array is changed while iterating.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Buffer.concat()</literal>
with subarrays.
Thanks to Sylvain Etienne.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
type confusion bug while resolving promises.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Function.prototype.apply()</literal>
with large array arguments.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed recursive <literal>async</literal> function calls.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed function redeclaration.
The bug was introduced in
<link id="njs0.7.0">0.7.0</link>.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.7.1" name="Changes with njs 0.7.1">

<para>
Release Date:
28 December 2021
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Change:
the <link doc="../http/ngx_http_js_module.xml" id="js_include"/> directive
deprecated since <link id="njs0.4.0">0.4.0</link> was removed.
</para>
</listitem>

<listitem>
<para>
Change:
PCRE/PCRE2-specific code was moved to the modules.
This ensures that njs uses the same RegExp library as nginx.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Bugfix:
fixed
<literal>decodeURI()</literal> and
<literal>decodeURIComponent()</literal>
with invalid byte strings.
The bug was introduced in
<link id="njs0.4.3">0.4.3</link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed heap-use-after-free in <literal>await</literal> frame.
The bug was introduced in
<link id="njs0.7.0">0.7.0</link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed WebCrypto <literal>sign()</literal> and
<literal>verify()</literal> methods with OpenSSL 3.0.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed exception throwing when RegExp match fails.
The bug was introduced in
<link id="njs0.1.15">0.1.15</link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed catching of exception thrown in <literal>try</literal> block
of <literal>async</literal> function.
The bug was introduced in
<link id="njs0.7.0">0.7.0</link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed execution of <literal>async</literal> function in synchronous context.
The bug was introduced in
<link id="njs0.7.0">0.7.0</link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed function redeclaration in CLI when interactive mode is on.
The bug was introduced in
<link id="njs0.6.2">0.6.2</link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>typeof</literal> operator with
<literal>DataView</literal> object.
</para>
</listitem>

<listitem>
<para>
Bugfix: eliminated information leak in <literal>Buffer.from()</literal>.
</para>
</listitem>

</list>

</para>

</section>


<section id="njs0.7.0" name="Changes with njs 0.7.0">

<para>
Release Date:
19 October 2021
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
Added
<link doc="../http/ngx_http_js_module.xml" id="js_fetch_protocols">HTTPS</link>
support for
<link doc="reference.xml" id="ngx_fetch">Fetch API</link>.
</para>
</listitem>

<listitem>
<para>
Feature:
Added
<literal>setReturnValue()</literal> method for
<link doc="reference.xml" id="r_set_return_value">http</link> and
<link doc="reference.xml" id="s_set_return_value">stream</link>.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
introduced <literal>Async/Await</literal> implementation.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="builtin_crypto">WebCrypto API</link>
implementation.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed copying of closures for declared functions.
The bug was introduced in
<link id="njs0.6.0">0.6.0</link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed unhandled <literal>promise</literal> rejection in handle events.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed Response.headers getter in Fetch API.
</para>
</listitem>

</list>

</para>

</section>


<section id="njs0.6.2" name="Changes with njs 0.6.2">

<para>
Release Date:
31 August 2021
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Bugfix:
fixed CPU hog when
<literal>js_filter</literal> is registered in both directions.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
introduced <literal>AggregateError</literal> implementation.
</para>
</listitem>

<listitem>
<para>
Feature:
added remaining <literal>Promise</literal> constructor methods.
The following methods were added:
<literal>Promise.all()</literal>,
<literal>Promise.allSettled()</literal>,
<literal>Promise.any()</literal>,
<literal>Promise.race()</literal>.
</para>
</listitem>

<listitem>
<para>
Improvement:
removed recursion from code generator.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed rest parameter parsing without binding identifier.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed resolve/reject callback for
<literal>Promise.prototype.finally()</literal> .
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>%TypedArray%.prototype.join()</literal>
with detached buffer.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed memory leak in interactive shell.
</para>
</listitem>
</list>

</para>

</section>


<section id="njs0.6.1" name="Changes with njs 0.6.1">

<para>
Release Date:
29 June 2021
</para>

<para>
<list type="bullet">

<listitem>
<para>
Bugfix:
fixed <literal>RegExpBuiltinExec()</literal> with UTF-8 only regexps.
The bug was introduced in <link id="njs0.4.2">0.4.2</link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed parsing of export default declaration with non-assignment expressions.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.6.0" name="Changes with njs 0.6.0">

<para>
Release Date:
15 June 2021
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added
<literal>let</literal> and
<literal>const</literal> declaration support.
</para>
</listitem>

<listitem>
<para>
Feature:
added <literal>RegExp.prototype[Symbol.split]</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
added sticky flag support for RegExp.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed heap-buffer-overflow in
<literal>String.prototype.lastIndexOf()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>RegExp.prototype.test()</literal>
according to the specification.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>String.prototype.split()</literal>
according to the specification.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed use-of-uninitialized-value while tracking rejected promises.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>njs.dump()</literal> for objects with circular references.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.5.3" name="Changes with njs 0.5.3">

<para>
Release Date:
30 March 2021
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
added the <literal>js_var</literal> directive for
<link doc="../http/ngx_http_js_module.xml" id="js_var">http</link> and
<link doc="../stream/ngx_stream_js_module.xml" id="js_var">stream</link>.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.5.2" name="Changes with njs 0.5.2">

<para>
Release Date:
09 March 2021
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
added the
<link doc="../http/ngx_http_js_module.xml" id="js_body_filter"><literal>js_body_filter</literal></link>
directive.
</para>
</listitem>

<listitem>
<para>
Feature:
introduced the
<link doc="reference.xml" id="s_status"><literal>s.status</literal></link>
property for
<link doc="reference.xml" id="stream">Stream Session</link>
object.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="njs_on"><literal>njs.on</literal></link>
(<literal>exit</literal>) callback support.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed property descriptor reuse for not extensible objects.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Object.freeze()</literal> and friends
according to the specification.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Function()</literal> in CLI mode.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>for-in</literal> iteration of typed array values.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.5.1" name="Changes with njs 0.5.1">

<para>
Release Date:
16 February 2021
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
introduced
<link doc="reference.xml" id="ngx_fetch"><literal>ngx.fetch()</literal></link>
method implementing Fetch API.
</para>

<para>
The following properties and methods of
<link doc="reference.xml" id="response"><literal>Response</literal></link>
object are implemented:
<link doc="reference.xml" id="response_arraybuffer"><literal>arrayBuffer()</literal></link>,
<link doc="reference.xml" id="response_bodyused"><literal>bodyUsed</literal></link>,
<link doc="reference.xml" id="response_json"><literal>json()</literal></link>,
<link doc="reference.xml" id="response_headers"><literal>headers</literal></link>,
<link doc="reference.xml" id="response_ok"><literal>ok</literal></link>,
<link doc="reference.xml" id="response_redirect"><literal>redirect</literal></link>,
<link doc="reference.xml" id="response_status"><literal>status</literal></link>,
<link doc="reference.xml" id="response_statustext"><literal>statusText</literal></link>,
<link doc="reference.xml" id="response_text"><literal>text()</literal></link>,
<link doc="reference.xml" id="response_type"><literal>type</literal></link>,
<link doc="reference.xml" id="response_url"><literal>url</literal></link>.
</para>

<para>
Notable limitations:
only the <literal>http://</literal> scheme is supported,
redirects are not handled.
</para>

<para>
In collaboration with 洪志道 (Hong Zhi Dao).
</para>
</listitem>

<listitem>
<para>
Feature:
added the
<link doc="../http/ngx_http_js_module.xml" id="js_header_filter"><literal>js_header_filter</literal></link>
directive.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed processing buffered data in body filter in
<link doc="../stream/ngx_stream_js_module.xml">stream</link> module.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Bugfix:
fixed safe mode bypass in <literal>Function</literal> constructor.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Date.prototype.toISOString()</literal> with invalid date values.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.5.0" name="Changes with njs 0.5.0">

<para>
Release Date:
01 December 2020
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
introduced global
<link doc="reference.xml" id="ngx"><literal>ngx</literal></link> object.
</para>

<para>
The following methods were added:
<list type="bullet">

<listitem>
<para>
<link doc="reference.xml" id="ngx_log"><literal>ngx.log(level,
message)</literal></link>
</para>
</listitem>

</list>
</para>

<para>
The following properties were added:
<list type="bullet">

<listitem>
<para>
<literal>ngx.INFO</literal>,
<literal>ngx.WARN</literal>,
<literal>ngx.ERR</literal>.
</para>
</listitem>

</list>
</para>

</listitem>

<listitem>
<para>
Feature:
added support for
<literal>Buffer</literal> object where string is expected.
</para>
</listitem>

<listitem>
<para>
Feature:
added Buffer version of existing properties.
</para>

<para>
The following properties were added:
<list type="bullet">

<listitem>
<para>
<link doc="reference.xml" id="r_request_buffer"><literal>r.requestBuffer</literal></link>
(<link doc="reference.xml" id="r_request_body"><literal>r.requestBody</literal></link>),
<link doc="reference.xml" id="r_response_buffer"><literal>r.responseBuffer</literal></link>
(<link doc="reference.xml" id="r_response_body"><literal>r.responseBody</literal></link>),
<link doc="reference.xml" id="r_raw_variables"><literal>r.rawVariables</literal></link>
(<link doc="reference.xml" id="r_variables"><literal>r.variables</literal></link>),
<link doc="reference.xml" id="s_raw_variables"><literal>s.rawVariables</literal></link>
(<link doc="reference.xml" id="s_variables"><literal>s.variables</literal></link>).
</para>
</listitem>

</list>
</para>

<para>
The following events were added in the stream module:
<list type="bullet">

<listitem>
<para>
<link doc="reference.xml" id="s_on"><literal>upstream</literal></link>
(upload),
<link doc="reference.xml" id="s_on"><literal>downstream</literal></link>
(download).
</para>
</listitem>

</list>
</para>

</listitem>

<listitem>
<para>
Improvement:
added aliases to existing properties.
</para>

<para>
The following properties were added:
<list type="bullet">

<listitem>
<para>
<link doc="reference.xml" id="r_request_text"><literal>r.requestText</literal></link>
(<link doc="reference.xml" id="r_request_body"><literal>r.requestBody</literal></link>),
<link doc="reference.xml" id="r_response_text"><literal>r.responseText</literal></link>
(<link doc="reference.xml" id="r_response_body"><literal>r.responseBody</literal></link>).
</para>
</listitem>

</list>
</para>

</listitem>

<listitem>
<para>
Improvement:
throwing an exception in
<link doc="reference.xml" id="r_internal_redirect"><literal>r.internalRedirect()</literal></link>
for a subrequest.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed promise
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>
with
<link doc="../http/ngx_http_core_module.xml" id="error_page"><literal>error_page</literal></link>
redirect.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>promise</literal> events handling.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added
<literal>TypeScript</literal> definitions for built-in modules.
Thanks to Jakub Jirutka.
</para>
</listitem>

<listitem>
<para>
Feature:
tracking unhandled <literal>promise</literal> rejection.
</para>
</listitem>

<listitem>
<para>
Feature:
added initial iterator support.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Improvement:
<literal>TypeScript</literal> definitions are refactored.
Thanks to Jakub Jirutka.
</para>
</listitem>

<listitem>
<para>
Improvement:
added forgotten support for
<literal>Object.prototype.valueOf()</literal>
in
<literal>Buffer.from()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed heap-use-after-free in
<literal>JSON.parse()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed heap-use-after-free in
<literal>JSON.stringify()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>JSON.stringify()</literal> for arrays resizable via getters.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed heap-buffer-overflow for
<literal>RegExp.prototype[Symbol.replace]</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed returned value for
<literal>Buffer.prototype.write*</literal>
functions.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<link doc="reference.xml" id="querystring_stringify"><literal>querystring.stringify()</literal></link>.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed the catch handler for
<literal>Promise.prototype.finally()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<link doc="reference.xml" id="querystring_parse"><literal>querystring.parse()</literal></link>.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.4.4" name="Changes with njs 0.4.4">

<para>
Release Date:
29 September 2020
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Bugfix:
fixed location merge.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<link doc="reference.xml" id="r_http_version"><literal>r.httpVersion</literal></link>
for HTTP/2.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added support for numeric separators (ES12).
</para>
</listitem>

<listitem>
<para>
Feature:
added remaining methods for
<literal>%TypedArray%.prototype</literal>.
The following methods were added:
<literal>every()</literal>,
<literal>filter()</literal>,
<literal>find()</literal>,
<literal>findIndex()</literal>,
<literal>forEach()</literal>,
<literal>includes()</literal>,
<literal>indexOf()</literal>,
<literal>lastIndexOf()</literal>,
<literal>map()</literal>,
<literal>reduce()</literal>,
<literal>reduceRight()</literal>,
<literal>reverse()</literal>,
<literal>some()</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
added <literal>%TypedArray%</literal> remaining methods.
The following methods were added:
<literal>from()</literal>,
<literal>of()</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
added <literal>DataView</literal> object.
</para>
</listitem>
<listitem>
<para>
Feature:
added <literal>Buffer</literal> object implementation.
</para>
</listitem>

<listitem>
<para>
Feature:
added support for <literal>ArrayBuffer</literal> in
<link doc="reference.xml" id="textdecoder_decode"><literal>TextDecoder.prototype.decode()</literal></link>
</para>
</listitem>

<listitem>
<para>
Feature:
added support for <literal>Buffer</literal> object in
<link doc="reference.xml" id="crypto"><literal>crypto</literal></link>
methods.
</para>
</listitem>

<listitem>
<para>
Feature:
added support for <literal>Buffer</literal> object in
<link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link>
methods.
</para>
</listitem>

<listitem>
<para>
Change:
<link doc="reference.xml" id="crypto_hash_digest"><literal>Hash.prototype.digest()</literal></link>
and
<link doc="reference.xml" id="crypto_hmac_digest"><literal>Hmac.prototype.digest()</literal></link>
now return a <literal>Buffer</literal> instance instead of a byte string when
encoding is not provided.
</para>
</listitem>

<listitem>
<para>
Change:
<link doc="reference.xml" id="readfilesync"><literal>fs.readFile()</literal></link>
and friends now return a <literal>Buffer</literal> instance
instead of a byte string when encoding is not provided.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed function <literal>prototype</literal> property handler while setting.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed function <literal>constructor</literal> property handler while setting.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>String.prototype.indexOf()</literal>
for byte strings.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>RegExpBuiltinExec()</literal>
with a global flag and byte strings.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>RegExp.prototype[Symbol.replace]</literal>
the when replacement value is a function.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<link doc="reference.xml" id="textdecoder_decode"><literal>TextDecoder.prototype.decode()</literal></link>
with non-zero <literal>TypedArray</literal> offset.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.4.3" name="Changes with njs 0.4.3">

<para>
Release Date:
11 August 2020
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="querystring"><literal>Query String</literal></link>
module.
</para>
</listitem>

<listitem>
<para>
Feature:
improved
<link doc="reference.xml" id="fs_mkdirsync"><literal>fs.mkdir()</literal></link>
to support recursive directory creation.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Feature:
improved
<link doc="reference.xml" id="fs_rmdirsync"><literal>fs.rmdir()</literal></link>
to support recursive directory removal.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Feature:
introduced UTF-8 decoder according to
<link url="https://encoding.spec.whatwg.org/">WHATWG</link> encoding spec.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="textdecoder"><literal>TextDecoder()</literal></link>
and
<link doc="reference.xml" id="textencoder"><literal>TextEncoder()</literal></link>
implementation.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed parsing return statement without semicolon.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>njs_number_to_int32()</literal> for big-endian platforms.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed unit test on big-endian platforms.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed regexp-literals parsing with “<literal>=</literal>” characters.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed pre/post increment/decrement in assignment operations.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.4.2" name="Changes with njs 0.4.2">

<para>
Release Date:
07 July 2020
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added <literal>RegExp.prototype[Symbol.replace]</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
introduced line level backtrace.
</para>
</listitem>

<listitem>
<para>
Feature:
added <literal>%TypedArray%.prototype.sort()</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
extended
<link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link> module.
Added
<link doc="reference.xml" id="fs_mkdirsync"><literal>mkdir()</literal></link>,
<link doc="reference.xml" id="fs_readdirsync"><literal>readdir()</literal></link>,
<link doc="reference.xml" id="fs_rmdirsync"><literal>rmdir()</literal></link>,
and friends.
</para>
</listitem>

<listitem>
<para>
Improvement:
parser refactoring.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed TypedScript API description for HTTP headers.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed TypedScript API description for <literal>NjsByteString</literal> type.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>String.prototype.repeat()</literal>
according to the specification.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>String.prototype.replace()</literal>
according to the specification.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed parsing of flags for regexp literals.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed index generation for global objects in generator.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>%TypedArray%.prototype.copyWithin()</literal>
with nonzero byte offset.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Array.prototype.splice()</literal>
for sparse arrays.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Array.prototype.reverse()</literal>
for sparse arrays.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Array.prototype.sort()</literal>
for sparse arrays.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.4.1" name="Changes with njs 0.4.1">

<para>
Release Date:
19 May 2020
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
added support for multi-value headers in
<link doc="reference.xml" id="r_headers_in"><literal>r.headersIn{}</literal></link>.
</para>
</listitem>

<listitem>
<para>
Feature:
introduced <literal>raw headers</literal> API:
<link doc="reference.xml" id="r_raw_headers_in"><literal>r.rawHeadersIn[]</literal></link>
and
<link doc="reference.xml" id="r_raw_headers_out"><literal>r.rawHeadersOut[]</literal></link>.
</para>
</listitem>

<listitem>
<para>
Feature:
added <link doc="typescript.xml">TypeScript</link> API description.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Bugfix:
fixed <literal>Array.prototype.slice()</literal> for sparse arrays.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.4.0" name="Changes with njs 0.4.0">

<para>
Release Date:
23 April 2020
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
added support for multi-value headers in
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>.
</para>
</listitem>

<listitem>
<para>
Feature:
added <literal>js_import</literal> directive for
<link doc="../http/ngx_http_js_module.xml" id="js_import">http</link> and
<link doc="../stream/ngx_stream_js_module.xml" id="js_import">stream</link>.
</para>
</listitem>

<listitem>
<para>
Improvement:
improved iteration over
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>
with special headers.
</para>
</listitem>

<listitem>
<para>
Improvement:
improved iteration over
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>
with duplicates.
</para>
</listitem>

<listitem>
<para>
Change:
<link doc="reference.xml" id="r_response_body"><literal>r.responseBody</literal></link>
property handler now returns
<literal>undefined</literal>
instead of throwing an exception if the response body is not available.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added script arguments support in CLI.
</para>
</listitem>

<listitem>
<para>
Feature:
converting externals values to native js objects.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed NULL-pointer dereference
in <literal>__proto__</literal> property handler.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed handling of no-newline at the end of the script.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>RegExp()</literal> constructor
with empty pattern and non-empty flags.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>String.prototype.replace()</literal>
when function returns non-string.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed reading of pseudofiles in
<link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link>.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.3.9" name="Changes with njs 0.3.9">

<para>
Release Date:
03 March 2020
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
added detached mode for
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>.
Responses to detached subrequests are ignored.
Unlike ordinary subrequests,
a detached subrequest can be created inside a variable handler.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added <literal>promises</literal> API for
<link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link> module.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Feature:
extended <link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link>
module.
Added
<link doc="reference.xml" id="fs_accesssync"><literal>access()</literal></link>,
<link doc="reference.xml" id="fs_symlinksync"><literal>symlink()</literal></link>,
<link doc="reference.xml" id="fs_unlinksync"><literal>unlink()</literal></link>,
<link doc="reference.xml" id="fs_realpathsync"><literal>realpath()</literal></link>,
and friends.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Improvement:
introduced memory-efficient ordinary arrays.
</para>
</listitem>

<listitem>
<para>
Improvement:
lexer refactoring.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed matching of native functions in backtraces.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed callback invocations in
<link doc="reference.xml" id="njs_api_fs"><literal>fs</literal></link> module.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Object.getOwnPropertySymbols()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed heap-buffer-overflow in
<literal>njs_json_append_string()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>encodeURI()</literal>
and
<literal>decodeURI()</literal>
according to the specification.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Number.prototype.toPrecision()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed handling of space argument in
<literal>JSON.stringify()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>JSON.stringify()</literal>
with
<literal>Number()</literal> and
<literal>String()</literal>
objects.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed Unicode Escaping in
<literal>JSON.stringify()</literal>
according to specification.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed non-native module importing.
Thanks to 洪志道 (Hong Zhi Dao).
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>njs.dump()</literal> with the
<literal>Date()</literal>
instance in a container.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.3.8" name="Changes with njs 0.3.8">

<para>
Release Date:
21 January 2020
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
added <literal>Promise</literal> support for
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>.
If a callback is not provided,
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>
returns an ordinary
<literal>Promise</literal> object
that resolves to a subrequest response object.
</para>
</listitem>

<listitem>
<para>
Change:
<link doc="reference.xml" id="r_parent"><literal>r.parent</literal></link>
property handler now returns
<literal>undefined</literal>
instead of throwing an exception if a parent object is not available.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added <literal>Promise</literal> support.
Implemented according to the specification without:
<literal>Promise.all()</literal>,
<literal>Promise.allSettled()</literal>,
<literal>Promise.race()</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
added initial Typed-arrays support.
Thanks to Tiago Natel de Moura.
</para>
</listitem>

<listitem>
<para>
Feature:
added <literal>ArrayBuffer</literal> support.
Thanks to Tiago Natel de Moura.
</para>
</listitem>

<listitem>
<para>
Feature:
added initial <literal>Symbol</literal> support.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Feature:
added externals support for
<literal>JSON.stringify()</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
added <literal>Object.is()</literal>.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Feature:
added <literal>Object.setPrototypeOf()</literal>.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Feature:
introduced nullish coalescing operator.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Object.getPrototypeOf()</literal>
according to the specification.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Object.prototype.valueOf()</literal>
according to the specification.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>JSON.stringify()</literal>
with unprintable values and replacer function.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed operator <literal>in</literal>
according to the specification.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Object.defineProperties()</literal>
according to the specification.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Object.create()</literal>
according to the specification.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Number.prototype.toString(radix)</literal>
when fast-math is enabled.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>RegExp()</literal> instance properties.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed import segfault.
Thanks to 洪志道 (Hong Zhi Dao).
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.3.7" name="Changes with njs 0.3.7">

<para>
Release Date:
19 November 2019
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Improvement:
refactored iteration over external objects.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added <literal>Object.assign()</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
added <literal>Array.prototype.copyWithin()</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
added support for labels in <literal>console.time()</literal>.
</para>
</listitem>

<listitem>
<para>
Change:
removed <literal>console.help()</literal> from CLI.
</para>
</listitem>

<listitem>
<para>
Improvement:
moved constructors and top-level objects to global object.
</para>
</listitem>

<listitem>
<para>
Improvement:
arguments validation for configure script.
</para>
</listitem>

<listitem>
<para>
Improvement:
refactored JSON methods.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed heap-buffer-overflow in
<literal>njs_array_reverse_iterator()</literal> function.
The following functions were affected:
<literal>Array.prototype.lastIndexOf()</literal>,
<literal>Array.prototype.reduceRight()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>[[Prototype]]</literal> slot of <literal>NativeErrors</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>NativeError.prototype.message</literal> properties.
</para>
</listitem>

<listitem>
<para>
Bugfix:
added conversion of
<literal>this</literal> value to object in
<literal>Array.prototype functions</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed iterator for
<literal>Array.prototype.find()</literal> and
<literal>Array.prototype.findIndex()</literal>
functions.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.includes()</literal> and
<literal>Array.prototype.join()</literal> with
<literal>undefined</literal> argument.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>constructor</literal> property of
<literal>Hash</literal> and
<literal>Hmac</literal>
objects.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>__proto__</literal> property of getters and setters.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Date</literal> object string formatting.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed handling of
<literal>NaN</literal> and <literal>-0</literal> arguments in
<literal>Math.min()</literal> and
<literal>Math.max()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Math.round()</literal>
according to the specification.
</para>
</listitem>

<listitem>
<para>
Bugfix:
reimplemented <literal>bound</literal> functions
according to the specification.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.3.6" name="Changes with njs 0.3.6">

<para>
Release Date:
22 October 2019
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Improvement:
getting special headers from
<link doc="reference.xml" id="r_headers_in"><literal>r.headersIn{}</literal></link>.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added new <literal>Function()</literal> support.
</para>
</listitem>

<listitem>
<para>
Feature:
added <literal>Number.prototype.toFixed()</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
added <literal>Number.prototype.toPrecision()</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
added <literal>Number.prototype.toExponential()</literal>.
</para>
</listitem>

<listitem>
<para>
Improvement:
making <literal>prototype</literal> property of function instances writable.
</para>
</listitem>

<listitem>
<para>
Improvement:
limiting recursion depth while compiling.
</para>
</listitem>

<listitem>
<para>
Improvement:
moving global functions to the global object.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed prototype mutation for object literals.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed heap-buffer-overflow while parsing regexp literals.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed integer-overflow while parsing exponent of number literals.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>parseFloat()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>Array.prototype</literal> functions
according to the specification.
The following functions were fixed:
<literal>every</literal>,
<literal>includes</literal>,
<literal>indexOf</literal>,
<literal>filter</literal>,
<literal>find</literal>,
<literal>findIndex</literal>,
<literal>forEach</literal>,
<literal>lastIndexOf</literal>,
<literal>map</literal>,
<literal>pop</literal>,
<literal>push</literal>,
<literal>reduce</literal>,
<literal>reduceRight</literal>,
<literal>shift</literal>,
<literal>some</literal>,
<literal>unshift</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed handing of accessor descriptors in <literal>Object.freeze()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>String.prototype.replace()</literal>
when first argument is not a string.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed stack-use-after-scope in <literal>Array.prototype.map()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
<literal>Date.prototype.toUTCString()</literal>
format was aligned to ES9.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed buffer overflow in
<literal>Number.prototype.toString(radix)</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Regexp.prototype.test()</literal>
for regexps with backreferences.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.map()</literal>
for objects with nonexistent values.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.pop()</literal> and
<literal>shift()</literal> for sparse objects.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Date.UTC()</literal>
according to the specification.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Date()</literal> constructor
according to the specification.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed type of
<literal>Date.prototype</literal>.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Date.prototype.setTime()</literal>.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed default number of arguments expected by built-in functions.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>caller</literal> and
<literal>arguments</literal>
properties of a function instance.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.3.5" name="Changes with njs 0.3.5">

<para>
Release Date:
15 August 2019
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Bugfix:
fixed module importing using <literal>require()</literal>.
The bug was introduced in <link id="0.3.4"/>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>[[SetPrototypeOf]]</literal>.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.3.4" name="Changes with njs 0.3.4">

<para>
Release Date:
13 August 2019
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added
<literal>Object</literal>
shorthand methods and computed property names.
Thanks to 洪志道 (Hong Zhi Dao) and Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Feature:
added getter/setter literal support.
Thanks to 洪志道 (Hong Zhi Dao) and Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="fs_renamesync"><literal>fs.renameSync()</literal></link>.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<literal>String.prototype.trimEnd()</literal>
and
<literal>String.prototype.trimStart()</literal>.
</para>
</listitem>

<listitem>
<para>
Improvement:
added memory-sanitizer support.
</para>
</listitem>

<listitem>
<para>
Improvement:
Unicode case tables updated to version 12.1.
</para>
</listitem>

<listitem>
<para>
Improvement:
added UTF8 validation for string literals.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed reading files with zero size in
<link doc="reference.xml" id="readfilesync"><literal>fs.readFileSync()</literal></link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
extended the list of space separators in
<literal>String.prototype.trim()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed using of uninitialized value in
<literal>String.prototype.padStart()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>String.prototype.replace()</literal>
for <literal>$0</literal> and <literal>$&amp;</literal> replacement string.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>String.prototype.replace()</literal>
for byte strings with regex argument.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed global match in
<literal>String.prototype.replace()</literal>
with regexp argument.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.slice()</literal>
for primitive types.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed heap-buffer-overflow while importing module.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed UTF-8 character escaping.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Object.values()</literal>
and
<literal>Object.entries()</literal>
for shared objects.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed uninitialized memory access in
<literal>String.prototype.match()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>String.prototype.match()</literal>
for byte strings with regex argument.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.lastIndexOf()</literal>
with undefined arguments.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>String.prototype.substring()</literal>
with empty substring.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed invalid memory access in
<literal>String.prototype.substring()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>String.fromCharCode()</literal>
for code points more than <literal>65535</literal> and <literal>NaN</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>String.prototype.toLowerCase()</literal>
and
<literal>String.prototype.toUpperCase()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Error()</literal>
constructor with no arguments.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>in</literal>
operator for values with accessor descriptors.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Object.defineProperty()</literal>
for non-boolean descriptor props.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Error.prototype.toString()</literal>
with UTF8 string properties.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Error.prototype.toString()</literal>
with non-string values for <literal>name</literal> and <literal>message</literal>.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.3.3" name="Changes with njs 0.3.3">

<para>
Release Date:
25 June 2019
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Improvement:
getting of special response headers in
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>.
</para>
</listitem>

<listitem>
<para>
Improvement:
working with unknown methods in
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>.
</para>
</listitem>

<listitem>
<para>
Improvement:
added support for null as a second argument of
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed processing empty output chain in stream body filter.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added runtime support for property getter/setter.
Thanks to 洪志道 (Hong Zhi Dao) and Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<link doc="reference.xml" id="process"><literal>process</literal></link>
global object.
</para>
</listitem>

<listitem>
<para>
Feature:
writable most of built-in properties and methods.
</para>
</listitem>

<listitem>
<para>
Feature:
added generic implementation of
<literal>Array.prototype.fill()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed integer-overflow in
<literal>String.prototype.concat()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed setting of object properties.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.toString()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Date.prototype.toJSON()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed overwriting “constructor” property of built-in prototypes.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed processing of invalid surrogate pairs in strings.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed processing of invalid surrogate pairs in JSON strings.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed heap-buffer-overflow in
<literal>toUpperCase()</literal>
and
<literal>toLowerCase()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed escaping lone closing square brackets in
<literal>RegExp()</literal> constructor.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed handling zero byte characters inside RegExp pattern strings.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>String.prototype.toBytes()</literal>
for ASCII strings.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed truth value of JSON numbers in
<literal>JSON.parse()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed use-of-uninitialized-value in
<literal>njs_string_replace_join()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>parseInt('-0')</literal>.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.3.2" name="Changes with njs 0.3.2">

<para>
Release Date:
21 May 2019
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added support for template literals.
Thanks to 洪志道 (Hong Zhi Dao) and Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Feature:
executing command from command line arguments.
</para>
</listitem>

<listitem>
<para>
Feature:
added support for RegExp <literal>groups</literal> object (ES9).
</para>
</listitem>

<listitem>
<para>
Feature:
added block scoped function definitions support.
</para>
</listitem>

<listitem>
<para>
Feature:
added support for building with GNU Readline library.
</para>
</listitem>

<listitem>
<para>
Feature:
made configurable
<literal>length</literal>,
<literal>name</literal>,
and most of built-in methods.
</para>
</listitem>

<listitem>
<para>
Feature:
made all constructor properties configurable.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Regexp.prototype.exec()</literal>
for Unicode-only regexps.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>njs_vm_value_dump()</literal>
for empty string values.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed RegExp constructor for regexp value arguments.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed walking over prototypes chain during iteration over an object.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed overflow in
<literal>Array.prototype.concat()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed length calculation for UTF-8 string with escape characters.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed parsing surrogate pair presents as UTF-16 escape sequences.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed processing the “*” quantifier for
<literal>String.prototype.match()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Date()</literal>
constructor with one argument.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed arrays expansion.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed heap-buffer-overflow in
<literal>String.prototype.replace()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed heap-buffer-overflow in
<literal>String.prototype.lastIndexOf()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed regexp literals parsing with escaped backslash
and backslash in square brackets.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed regexp literals with lone closing brackets.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed uninitialized-memory-access in
<literal>Object.defineProperties()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed processing the “*” quantifier for
<literal>String.prototype.replace()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.slice()</literal>
for UTF8-invalid byte strings.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>String.prototype.split()</literal>
for UTF8-invalid byte strings.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed handling of empty block statements.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.3.1" name="Changes with njs 0.3.1">

<para>
Release Date:
16 April 2019
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added arrow functions support.
Thanks to 洪志道 (Hong Zhi Dao) and Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<literal>Object.getOwnPropertyNames()</literal>.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<literal>Object.getOwnPropertyDescriptors()</literal>.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Feature:
making <literal>__proto__</literal> accessor descriptor
of <literal>Object</literal> instances mutable.
</para>
</listitem>

<listitem>
<para>
Feature:
added shebang support in CLI.
</para>
</listitem>

<listitem>
<para>
Feature:
added support for module mode execution in CLI.
In module mode global, this is unavailable.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed editline detection.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Function.prototype.bind()</literal>.
Thanks to 洪志道 (Hong Zhi Dao).
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed checking of duplication of parameters for functions.
Thanks to 洪志道 (Hong Zhi Dao).
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed function declaration with the same name as a variable.
Thanks to 洪志道 (Hong Zhi Dao).
</para>
</listitem>

<listitem>
<para>
Improvement:
code related to parsing of objects, variables and
functions is refactored.
Thanks to 洪志道 (Hong Zhi Dao).
</para>
</listitem>

<listitem>
<para>
Improvement:
large-value output improved in <literal>console.log()</literal>.
</para>
</listitem>

<listitem>
<para>
Improvement:
string output improved in <literal>console.log()</literal>
in a compliant way (without escaping and quotes).
</para>
</listitem>

<listitem>
<para>
Improvement:
using ES6 version of
<literal>ToInt32()</literal>,
<literal>ToUint32()</literal>,
<literal>ToLength()</literal>.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.3.0" name="Changes with njs 0.3.0">

<para>
Release Date:
26 March 2019
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
added the <literal>js_path</literal> directive for
<link doc="../http/ngx_http_js_module.xml" id="js_path">http</link> and
<link doc="../stream/ngx_stream_js_module.xml" id="js_path">stream</link>.
</para>
</listitem>

<listitem>
<para>
Change:
returning undefined value instead of empty strings
for absent properties in the following objects:
<link doc="reference.xml" id="r_args"><literal>r.args{}</literal></link>,
<link doc="reference.xml" id="r_headers_in"><literal>r.headersIn{}</literal></link>,
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>,
<link doc="reference.xml" id="r_variables"><literal>r.variables{}</literal></link>,
<link doc="reference.xml" id="s_variables"><literal>s.variables{}</literal></link>.
</para>
</listitem>

<listitem>
<para>
Change:
returning undefined value instead of throwing an exception for
<link doc="reference.xml" id="r_request_body"><literal>r.requestBody</literal></link>
when request body is unavailable.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed crash while iterating over
<link doc="reference.xml" id="r_args"><literal>r.args{}</literal></link>
when a value is absent in a key-value pair.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added initial ES6 modules support.
Default import and default export statements are supported.
Thanks to 洪志道 (Hong Zhi Dao).
</para>
</listitem>

<listitem>
<para>
Feature:
added
<literal>Object.prototype.propertyIsEnumerable()</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
reporting file name and function name in disassembler output.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed function redeclarations in interactive shell.
Thanks to 洪志道 (Hong Zhi Dao).
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed RegExp literals parsing.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed setting length of UTF8 string in
<link doc="reference.xml" id="readfilesync"><literal>fs.readFileSync()</literal></link>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>nxt_file_dirname()</literal> for paths with no dir component.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.2.8" name="Changes with njs 0.2.8">

<para>
Release Date:
26 February 2019
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Change:
properties of HTTP request deprecated in <link id="njs0.2.2">0.2.2</link>
are removed.
</para>
</listitem>

<listitem>
<para>
Feature:
added support for delete operation in
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>.
</para>
</listitem>

<listitem>
<para>
Feature:
added support for setting nginx variables.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<link doc="reference.xml" id="r_subrequest"><literal>r.subrequest()</literal></link>
for empty body value.
</para>
</listitem>

<listitem>
<para>
Improvement:
setting special response headers in
<link doc="reference.xml" id="r_headers_out"><literal>r.headersOut{}</literal></link>.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added labels support.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<literal>setImmediate()</literal> method.
</para>
</listitem>

<listitem>
<para>
Feature:
added support for shorthand property names for Object literals.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Function.prototype.bind()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed parsing of string literals containing newline characters.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed line number in reporting variable reference errors.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed creation of long UTF8 strings.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
setting special response headers in
<literal>String.prototype.split()</literal>
for Unicode strings.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed heap-buffer-overflow in
<literal>String.prototype.split()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.fill()</literal>.
Thanks to Artem S. Povalyukhin.
</para>
</listitem>

<listitem>
<para>
Improvement:
code related to function invocation is refactored.
Thanks to 洪志道 (Hong Zhi Dao).
</para>
</listitem>

<listitem>
<para>
Improvement:
code related to variables is refactored.
Thanks to 洪志道 (Hong Zhi Dao).
</para>
</listitem>

<listitem>
<para>
Improvement: parser is refactored.
Thanks to 洪志道 (Hong Zhi Dao).
</para>
</listitem>

<listitem>
<para>
Improvement:
reporting filenames in exceptions.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.2.7" name="Changes with njs 0.2.7">

<para>
Release Date:
25 December 2018
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
rest parameters syntax (destructuring is not supported).
Thanks to Alexander Pyshchev.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<literal>Object.entries()</literal>
method.
</para>
</listitem>

<listitem>
<para>
Feature:
added
<literal>Object.values()</literal>
method.
</para>
</listitem>

<listitem>
<para>
Improvement:
code generator refactored and simplified.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed automatic semicolon insertion.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed assignment expression from compound assignment.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed comparison of Byte and UTF8 strings.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed type of iteration variable in <literal>for-in</literal> with array values.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed building on platforms without librt.
</para>
</listitem>

<listitem>
<para>
Bugfix:
miscellaneous bugs have been fixed.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.2.6" name="Changes with njs 0.2.6">

<para>
Release Date:
27 November 2018
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
making built-in prototypes mutable.
</para>
</listitem>

<listitem>
<para>
Feature:
making global object mutable.
</para>
</listitem>

<listitem>
<para>
Feature:
<link doc="reference.xml" id="console_time"><literal>console.time()</literal></link>
and
<link doc="reference.xml" id="console_time_end"><literal>console.timeEnd()</literal></link>
methods.
</para>
</listitem>

<listitem>
<para>
Feature:
allowing variables and functions to be redeclared.
</para>
</listitem>

<listitem>
<para>
Feature:
extending <literal>Object.defineProperty()</literal> spec conformance.
</para>
</listitem>

<listitem>
<para>
Feature:
introduced quiet mode for CLI to handle simple expressions from stdin.
</para>
</listitem>

<listitem>
<para>
Feature:
introduced compact form of backtraces to handle stack overflows.
</para>
</listitem>

<listitem>
<para>
Improvement:
improved wording for various exceptions.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed closure values handling.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed equality operator for various value types.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed handling of <literal>this</literal> keyword in various scopes.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed handling non-object values in
<literal>Object.keys()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed parsing of throw statement inside
<literal>if</literal> statement.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed parsing of newline after throw statement.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed parsing of statements in if statement without newline.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed size <literal>uint32_t</literal> overflow
in <literal>njs_array_expand()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>typeof</literal> operator
for <literal>object_value</literal> type.
</para>
</listitem>

<listitem>
<para>
Bugfix:
miscellaneous bugs have been fixed.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.2.5" name="Changes with njs 0.2.5">

<para>
Release Date:
30 October 2018
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Bugfix:
fixed counting pending events in stream module.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>s.off()</literal> in stream module.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed processing of data chunks in
<literal>js_filter</literal> in stream module.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed http
<literal>status</literal> and
<literal>contentType</literal>
getter in http module.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed http response and parent getters in http module.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
arguments object support.
</para>
</listitem>

<listitem>
<para>
Feature:
non-integer fractions support.
</para>
</listitem>

<listitem>
<para>
Improvement:
handling non-array values in
<literal>Array.prototype.slice()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Array.prototype.length</literal> setter
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>njs_array_alloc()</literal> for length > 2**31.
</para>
</listitem>

<listitem>
<para>
Bugfix:
handling int overflow in
<literal>njs_array_alloc()</literal> on 32bit archs.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed code size mismatch error message.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed delete operator in a loop.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Object.getOwnPropertyDescriptor()</literal>
for complex object (inherited from
<literal>Array</literal> and
<literal>string</literal> values).
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Object.prototype.hasOwnProperty()</literal>
for non-object properties
</para>
</listitem>

<listitem>
<para>
Bugfix:
miscellaneous bugs have been fixed.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.2.4" name="Changes with njs 0.2.4">

<para>
Release Date:
18 September 2018
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Change:
stream module handlers refactored.
</para>

<para>
New methods and properties:
<link doc="reference.xml" id="s_on"><literal>s.on()</literal></link>,
<link doc="reference.xml" id="s_off"><literal>s.off()</literal></link>,
<link doc="reference.xml" id="s_allow"><literal>s.allow()</literal></link>,
<link doc="reference.xml" id="s_done"><literal>s.done()</literal></link>,
<link doc="reference.xml" id="s_decline"><literal>s.decline()</literal></link>,
<link doc="reference.xml" id="s_deny"><literal>s.deny()</literal></link>.
</para>

<para>
Removed properties of the
<link doc="reference.xml" id="stream">Stream</link> object:
<literal>s.OK</literal>,
<literal>s.ABORT</literal>,
<literal>s.AGAIN</literal>,
<literal>s.DECLINED</literal>,
<literal>s.ERROR</literal>
(replaced with
<link doc="reference.xml" id="s_allow"><literal>s.allow()</literal></link>,
<link doc="reference.xml" id="s_done"><literal>s.done()</literal></link>,
<link doc="reference.xml" id="s_deny"><literal>s.deny()</literal></link>).
</para>

<para>
<literal>s.buffer</literal>
(for reading replaced with data argument of
the corresponding callback, for writing use
<link doc="reference.xml" id="s_send"><literal>s.send()</literal></link>).
</para>

<para>
<literal>s.fromUpstream</literal>
(replaced with a callback for a corresponding event).
</para>

<para>
<literal>s.eof</literal>
(replaced with <literal></literal>
<link doc="reference.xml" id="s_on_callback_last"><literal>flags.last</literal></link>).
</para>

</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added
<literal>Function.prototype.length</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
introduced sandboxing mode.
</para>
</listitem>

<listitem>
<para>
Improvement:
added exception strings where appropriate.
</para>
</listitem>

<listitem>
<para>
Improvement:
improved wording for primitive type conversion exception.
</para>
</listitem>

<listitem>
<para>
Bugfix:
throwing <literal>TypeError</literal>
for attempts to change frozen properties.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Object.defineProperty()</literal> for existing properties.
</para>
</listitem>

<listitem>
<para>
Bugfix:
respecting the enumerable attribute while iterating by for in.
</para>
</listitem>

<listitem>
<para>
Bugfix:
respecting writable attribute for property handlers.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed exception handling in arguments of a function.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Object.prototype.toString</literal>
for different value types.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Object()</literal>
constructor for object types arguments.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed comparison of objects and strings.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>String.slice()</literal>
for undefined arguments.
</para>
</listitem>

<listitem>
<para>
Bugfix:
miscellaneous bugs have been fixed.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.2.3" name="Changes with njs 0.2.3">

<para>
Release Date:
31 July 2018
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Bugfix:
making a subrequest from a
<literal>Reply</literal>
object caused a segmentation fault.
</para>
</listitem>

<listitem>
<para>
Bugfix:
getting the parent property of the main
<link doc="reference.xml" id="http">HTTP Request</link>
object caused a segmentation fault.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added the pretty string representation for values.
</para>
</listitem>

<listitem>
<para>
Feature:
correctly printing floating point numbers.
</para>
</listitem>

<listitem>
<para>
Feature:
correctly parsing floating point numbers.
</para>
</listitem>

<listitem>
<para>
Feature:
<link doc="reference.xml" id="string_bytesfrom"><literal>String.bytesFrom()</literal></link> method
(decoding <literal>hex</literal>,
<literal>base64</literal>,
<literal>base64url</literal> into a byte string).
</para>
</listitem>

<listitem>
<para>
Feature:
<literal>String.padStart()</literal> and
<literal>String.padEnd()</literal>
methods.
</para>
</listitem>

<listitem>
<para>
Feature:
added support of binary literals.
</para>
</listitem>

<listitem>
<para>
Improvement:
added information about illegal token in number parsing.
</para>
</listitem>

<listitem>
<para>
Improvement:
allowed uppercased <literal>O</literal> in octal literal values.
</para>
</listitem>

<listitem>
<para>
Improvement:
added support for multiple arguments in <literal>console.log()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed applying <literal>call()</literal> to methods of external values.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed addition operator applied to an object.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed exception handling in
<literal>njs_vm_value_to_ext_string()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed
<literal>Number()</literal> with boolean, null and undefined arguments.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed error handling of setting non-numeric <literal>Array.length</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed autocompletion for global objects.
</para>
</listitem>

<listitem>
<para>
Bugfix:
miscellaneous bugs have been fixed.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.2.2" name="Changes with njs 0.2.2">

<para>
Release Date:
19 June 2018
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Change:
merged HTTP <literal>Response</literal> and <literal>Reply</literal>
into <link doc="reference.xml" id="http">HTTP Request</link>.
New members of <literal>Request</literal>:

<list type="bullet">

<listitem>
<para>
<literal>req.status</literal> (<literal>res.status</literal>)
</para>
</listitem>

<listitem>
<para>
<literal>req.parent</literal> (<literal>reply.parent</literal>)
</para>
</listitem>

<listitem>
<para>
<literal>req.requestBody</literal> (<literal>req.body</literal>)
</para>
</listitem>

<listitem>
<para>
<literal>req.responseBody</literal> (<literal>reply.body</literal>)
</para>
</listitem>

<listitem>
<para>
<literal>req.headersIn</literal> (<literal>req.headers</literal>)
</para>
</listitem>

<listitem>
<para>
<literal>req.headersOut</literal> (<literal>res.headers</literal>)
</para>
</listitem>

<listitem>
<para>
<literal>req.sendHeader()</literal> (<literal>res.sendHeader()</literal>)
</para>
</listitem>

<listitem>
<para>
<literal>req.send()</literal> (<literal>res.send()</literal>)
</para>
</listitem>

<listitem>
<para>
<literal>req.finish()</literal> (<literal>res.finish()</literal>)
</para>
</listitem>

<listitem>
<para>
<literal>req.return()</literal> (<literal>res.return()</literal>)
</para>
</listitem>

</list>
Deprecated members of <literal>Request</literal>:

<list type="bullet">

<listitem>
<para>
<literal>req.body</literal> (use <literal>req.requestBody</literal>
or <literal>req.responseBody</literal>)
</para>
</listitem>

<listitem>
<para>
<literal>req.headers</literal> (use <literal>req.headersIn</literal>
or <literal>req.headersOut</literal>)
</para>
</listitem>

<listitem>
<para>
<literal>req.response</literal>
</para>
</listitem>

</list>
Deprecated members of <literal>Response</literal>:

<list type="bullet">

<listitem>
<para>
<literal>res.contentLength</literal> (use
<link doc="reference.xml" id="r_headers_out"><literal>req.headersOut</literal></link><literal>['Content-Length']</literal>)
</para>
</listitem>

<listitem>
<para>
<literal>res.contentType</literal> (use <link doc="reference.xml" id="r_headers_out"><literal>req.headersOut</literal></link><literal>['Content-Type']</literal>)
</para>
</listitem>

</list>
The deprecated properties will be removed in
<link id="njs0.2.8">next</link> releases.
</para>
</listitem>

<listitem>
<para>
Feature:
HTTP <link doc="reference.xml" id="r_internal_redirect">internalRedirect()</link>
method.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Bugfix:
fixed heap-buffer-overflow in
<literal>crypto.createHmac()</literal>.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.2.1" name="Changes with njs 0.2.1">

<para>
Release Date:
31 May 2018
</para>

<para>
nginx modules:
<list type="bullet">

<listitem>
<para>
Feature:
HTTP request body getter.
</para>
</listitem>

<listitem>
<para>
Improvement:
moved njs vm to the <literal>main</literal> configuration.
</para>
</listitem>

<listitem>
<para>
Improvement:
improved logging for
<link doc="../http/ngx_http_js_module.xml" id="js_set"/> and
<link doc="../http/ngx_http_js_module.xml" id="js_content"/> directives.
</para>
</listitem>

<listitem>
<para>
Improvement:
setting status code to 500 by default in the
<link doc="../http/ngx_http_js_module.xml" id="js_content"/> handler
</para>
</listitem>

<listitem>
<para>
Improvement:
added the debug for the returned status code in
<link doc="../http/ngx_http_js_module.xml" id="js_content"/> handler
</para>
</listitem>

<listitem>
<para>
Bugfix: fixed error logging in
<link doc="../http/ngx_http_js_module.xml" id="js_include"/>.
</para>
</listitem>

</list>
</para>

<para>
Core:
<list type="bullet">

<listitem>
<para>
Feature:
added array length setter.
</para>
</listitem>

<listitem>
<para>
Improvement:
public header <literal>cleanup. njscript.h</literal> is renamed to
<literal>njs.h</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed crypto <literal>update()</literal> method after
<literal>digest()</literal> is called.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>crypto.createHmac()</literal> for keys with size &lt;= alg size
and &gt; 64.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>JSON.stringify()</literal> for arrays with empty cells.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed exception type for unsupported types in
<literal>JSON.stringify()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed handling of undefined arguments of functions.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed handling of missing <literal>arg</literal> of
<literal>Object.getOwnPropertyDescriptor()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed handling of properties in
<literal>Object.getOwnPropertyDescriptor()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed the writeable flag of <literal>Array.length</literal> property.
</para>
</listitem>

<listitem>
<para>
Bugfix: fixed return value type of <literal>clearTimeout()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
fixed <literal>njs_vm_external_bind()</literal>.
</para>
</listitem>

<listitem>
<para>
Bugfix:
miscellaneous bugs have been fixed.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.2.0" name="Changes with njs 0.2.0">

<para>
Release Date:
03 April 2018
</para>

<para>
<list type="bullet">

<listitem>
<para>
Feature:
reporting njs version by CLI.
</para>
</listitem>

<listitem>
<para>
Feature:
textual description for type converting exceptions.
</para>
</listitem>

<listitem>
Feature:
<literal>setTimeout()</literal> and
<literal>clearTimeout()</literal> methods.
</listitem>

<listitem>
<para>
Feature:
Byte string to
<literal>hex</literal>,
<literal>base64</literal>,
<literal>base64url</literal> encodings.
</para>
</listitem>

<listitem>
<para>
Feature:
<link url="https://nodejs.org/api/crypto.html#crypto_class_hash">Node.js style</link>
<literal>Crypto</literal> methods.
</para>
</listitem>

<listitem>
<para>
Feature:
HTTP and stream
<literal>warn()</literal> and
<literal>error()</literal> methods.
</para>
</listitem>

<listitem>
<para>
Feature:
HTTP <literal>subrequest()</literal> method.
</para>
</listitem>

<listitem>
<para>
Feature:
HTTP <literal>return()</literal> method.
</para>
</listitem>

<listitem>
<para>
Bugfix:
miscellaneous bugs have been fixed in the core and
interactive shell.
</para>
</listitem>

</list>
</para>

</section>

<section id="njs0.1.15" name="Changes with njs 0.1.15">

<para>
Release Date:
20 November 2017
</para>

<para>
<list type="bullet">

<listitem>
<para>
Feature:
<literal>Error</literal>,
<literal>EvalError</literal>,
<literal>InternalError</literal>,
<literal>RangeError</literal>,
<literal>ReferenceError</literal>,
<literal>SyntaxError</literal>,
<literal>TypeError</literal>,
<literal>URIError</literal> objects.
</para>
</listitem>

<listitem>
<para>
Feature:
octal literals support.
</para>
</listitem>

<listitem>
<para>
Feature:
<link url="https://nodejs.org/api/fs.html#fs_file_system">Node.js style</link>
<literal>File system</literal> access methods:
<literal>fs.readFile()</literal>,
<literal>fs.readFileSync()</literal>,
<literal>fs.appendFile()</literal>,
<literal>fs.appendFileSync()</literal>,
<literal>fs.writeFile()</literal>,
<literal>fs.writeFileSync()</literal>.
</para>
</listitem>

<listitem>
<para>
Feature:
nginx modules print backtrace on exception.
</para>
</listitem>

<listitem>
<para>
Bugfix:
miscellaneous bugs have been fixed.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.1.14" name="Changes with njs 0.1.14">

<para>
Release Date:
09 October 2017
</para>

<para>
<list type="bullet">

<listitem>
<para>
Feature:
JSON object.
</para>
</listitem>

<listitem>
<para>
Feature:
object level completions in interactive shell.
</para>
</listitem>

<listitem>
<para>
Feature:
various configure improvements.
</para>
</listitem>

<listitem>
<para>
Bugfix:
miscellaneous bugs have been fixed in the core and
interactive shell.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.1.13" name="Changes with njs 0.1.13">

<para>
Release Date:
31 August 2017
</para>

<para>
<list type="bullet">

<listitem>
<para>
Feature:
<literal>console.log()</literal> and
<literal>console.help()</literal>
methods in interactive shell.
</para>
</listitem>

<listitem>
<para>
Feature:
interactive shell prints backtrace on exception.
</para>
</listitem>

<listitem>
<para>
Feature:
interactive shell by default
if <literal>libedit</literal> is available.
</para>
</listitem>

<listitem>
<para>
Bugfix:
processing of large files from
<literal>stdin</literal> in command line mode.
</para>
</listitem>

<listitem>
<para>
Bugfix:
improved <literal>editline</literal> detection.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.1.12" name="Changes with njs 0.1.12">

<para>
Release Date:
08 August 2017
</para>

<para>
<list type="bullet">

<listitem>
<para>
Feature:
Interactive shell.
</para>
</listitem>

<listitem>
<para>
Bugfix:
in <literal>Object.isSealed()</literal>.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.1.11" name="Changes with njs 0.1.11">

<para>
Release Date:
27 June 2017
</para>

<para>
<list type="bullet">

<listitem>
<para>
Feature:
<literal>Object.keys()</literal>,
<literal>Object.prototype.hasOwnProperty()</literal>
methods.
</para>
</listitem>

<listitem>
<para>
Feature:
<literal>Object.defineProperty()</literal>,
<literal>Object.defineProperties()</literal>,
<literal>Object.getOwnPropertyDescriptor()</literal>
methods.
</para>
</listitem>

<listitem>
<para>
Feature:
<literal>Object.getPrototypeOf()</literal>,
<literal>Object.prototype.isPrototypeOf()</literal>
methods.
</para>
</listitem>

<listitem>
<para>
Feature:
<literal>Object.preventExtensions()</literal>,
<literal>Object.isExtensible()</literal>,
<literal>Object.freeze()</literal>,
<literal>Object.isFrozen()</literal>,
<literal>Object.seal()</literal>,
<literal>Object.isSealed()</literal>
methods.
</para>
</listitem>

<listitem>
<para>
Feature:
scientific notation (<literal>3.35e10</literal>) literals support.
</para>
</listitem>

<listitem>
<para>
Feature:
hexadecimal (<literal>0x1123</literal>) literals support.
</para>
</listitem>

<listitem>
<para>
Bugfix:
processing of large array indexes.
</para>
</listitem>

<listitem>
<para>
Bugfix:
in <literal>parseInt()</literal> and
<literal>Date.parse()</literal>.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.1.10" name="Changes with njs 0.1.10">

<para>
Release Date:
04 April 2017
</para>

<para>
<list type="bullet">

<listitem>
<para>
Feature:
nested functions and function closures.
</para>
</listitem>

<listitem>
<para>
Feature:
<literal>Array.of()</literal>,
<literal>Array.prototype.fill()</literal>,
<literal>Array.prototype.find()</literal>,
<literal>Array.prototype.findIndex()</literal>
methods.
</para>
</listitem>

<listitem>
<para>
Bugfix:
miscellaneous bugs and segmentation faults have been fixed.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.1.9" name="Changes with njs 0.1.9">

<para>
Release Date:
01 February 2017
</para>

<para>
<list type="bullet">

<listitem>
<para>
Bugfix:
global variables were not initialized when njs was used
in nginx.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.1.8" name="Changes with njs 0.1.8">

<para>
Release Date:
24 January 2017
</para>

<para>
<list type="bullet">

<listitem>
<para>
Change:
the <literal>strict</literal> mode is enforced,
variables must be explicitly declared.
</para>
</listitem>


<listitem>
<para>
Feature:
<literal>for</literal> and
<literal>for-in</literal> loops support variable declaration.
</para>
</listitem>

<listitem>
<para>
Bugfix:
global and function scopes have been fixed.
</para>
</listitem>

<listitem>
<para>
Bugfix:
now <literal>for-in</literal> loop does not discard the last value
of property variable.
</para>
</listitem>

<listitem>
<para>
Bugfix:
miscellaneous bugs and segmentation faults have been fixed.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.1.7" name="Changes with njs 0.1.7">

<para>
Release Date:
27 December 2016
</para>

<para>
<list type="bullet">

<listitem>
<para>
Change:
the <link doc="../http/ngx_http_js_module.xml" id="js_include"/> directive
has been disabled at server and location levels.
</para>
</listitem>

<listitem>
<para>
Feature:
exponentiation operators.
</para>
</listitem>

<listitem>
<para>
Bugfix:
miscellaneous bugs and segmentation faults have been fixed.
</para>
</listitem>

</list>
</para>

</section>


<section id="njs0.1.6" name="Changes with njs 0.1.6">

<para>
Release Date:
13 December 2016
</para>

<para>
<list type="bullet">

<listitem>
<para>
Change:
the <link doc="../http/ngx_http_js_module.xml" id="js_set"/> directive
has been disabled at server and location levels.
</para>
</listitem>

<listitem>
<para>
Feature:
ES6 <literal>Math</literal> methods.
</para>
</listitem>

<listitem>
<para>
Bugfix:
miscellaneous bugs and segmentation faults have been fixed.
</para>
</listitem>

</list>
</para>

</section>

</article>