Mercurial > hg > nginx-site
changeset 2446:32b945768dea
njs-0.3.6
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 22 Oct 2019 18:29:36 +0300 |
parents | 192d136633b5 |
children | 6d1fb7062460 |
files | xml/en/docs/njs/changes.xml xml/en/docs/njs/compatibility.xml xml/en/docs/njs/reference.xml xml/index.xml xml/ru/docs/njs/compatibility.xml xml/ru/docs/njs/reference.xml |
diffstat | 6 files changed, 337 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/njs/changes.xml Tue Oct 22 18:24:04 2019 +0300 +++ b/xml/en/docs/njs/changes.xml Tue Oct 22 18:29:36 2019 +0300 @@ -9,9 +9,255 @@ <article name="Changes" link="/en/docs/njs/changes.html" lang="en" - rev="22" + rev="23" toc="no"> +<section id="njs0.3.6" name="Changes with 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 +<link doc="reference.xml" id="string_replace"><literal>String.prototype.replace()</literal></link> +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 0.3.5"> <para>
--- a/xml/en/docs/njs/compatibility.xml Tue Oct 22 18:24:04 2019 +0300 +++ b/xml/en/docs/njs/compatibility.xml Tue Oct 22 18:29:36 2019 +0300 @@ -9,7 +9,7 @@ <article name="Compatibility" link="/en/docs/njs/compatibility.html" lang="en" - rev="18" + rev="19" toc="no"> <section> @@ -33,7 +33,9 @@ <listitem> Boolean values, numbers, strings, objects, arrays, -functions, and regular expressions +functions, function constructors +(<link doc="changes.xml" id="njs0.3.6">0.3.6</link>), +and regular expressions </listitem> <listitem> @@ -160,6 +162,23 @@ </listitem> <listitem> +<literal>Number</literal> instance methods: +<list type="bullet"> + +<listitem> +ES6: +<literal>toExponential</literal> +(<link doc="changes.xml" id="njs0.3.6">0.3.6</link>), +<literal>toFixed</literal> +(<link doc="changes.xml" id="njs0.3.6">0.3.6</link>), +<literal>toPrecision</literal> +(<link doc="changes.xml" id="njs0.3.6">0.3.6</link>) +</listitem> +</list> + +</listitem> + +<listitem> <literal>String</literal> methods: <list type="bullet">
--- a/xml/en/docs/njs/reference.xml Tue Oct 22 18:24:04 2019 +0300 +++ b/xml/en/docs/njs/reference.xml Tue Oct 22 18:29:36 2019 +0300 @@ -9,7 +9,7 @@ <article name="Reference" link="/en/docs/njs/reference.html" lang="en" - rev="31"> + rev="32"> <section id="summary"> @@ -57,9 +57,10 @@ can be accessed with the syntax <literal>headersIn.foo</literal> or <literal>headersIn['Foo']</literal> <note> -For headers that can appear multiple times such as +Before version <link doc="changes.xml" id="njs0.3.6">0.3.6</link>, +for headers that could appear multiple times such as <header>Cookie</header> or <header>X-Forwarded-For</header>, -only the first value will be returned. +only the first value was returned. To get all cookies, <literal>r.variables.http_cookie</literal> should be used.
--- a/xml/index.xml Tue Oct 22 18:24:04 2019 +0300 +++ b/xml/index.xml Tue Oct 22 18:29:36 2019 +0300 @@ -14,6 +14,15 @@ </para> </event> +<event date="2019-10-22"> +<para> +<link doc="en/docs/njs/index.xml">njs-0.3.6</link> +version has been released, featuring +function constructors +and <link doc="en/docs/njs/changes.xml" id="njs0.3.6">more</link>. +</para> +</event> + <event date="2019-10-03"> <para> <link url="https://unit.nginx.org/">unit-1.12.0</link>
--- a/xml/ru/docs/njs/compatibility.xml Tue Oct 22 18:24:04 2019 +0300 +++ b/xml/ru/docs/njs/compatibility.xml Tue Oct 22 18:29:36 2019 +0300 @@ -9,7 +9,7 @@ <article name="Совместимость" link="/ru/docs/njs/compatibility.html" lang="ru" - rev="18" + rev="19" toc="no"> <section> @@ -33,7 +33,9 @@ <listitem> Логические значения, числа, строки, объекты, массивы, -функции и регулярные выражения +функции, конструкторы функций +(<link doc="changes.xml" id="njs0.3.6">0.3.6</link>) +и регулярные выражения </listitem> <listitem> @@ -61,7 +63,11 @@ </listitem> <listitem> -ES6 методы и свойства <literal>Math</literal>: +Свойства <literal>Math</literal>: +<list type="bullet"> + +<listitem> +ES6: <literal>E</literal>, <literal>LN10</literal>, <literal>LN2</literal>, @@ -69,8 +75,17 @@ <literal>LOG2E</literal>, <literal>PI</literal>, <literal>SQRT1_2</literal>, -<literal>SQRT2</literal>, -<literal>__proto__</literal>, +<literal>SQRT2</literal> +</listitem> +</list> +</listitem> + +<listitem> +Методы <literal>Math</literal>: +<list type="bullet"> + +<listitem> +ES6: <literal>abs</literal>, <literal>acos</literal>, <literal>acosh</literal>, @@ -107,9 +122,15 @@ <literal>tanh</literal>, <literal>trunc</literal> </listitem> +</list> +</listitem> <listitem> -ES6 методы и свойства <literal>Number</literal>: +Свойства <literal>Number</literal>: +<list type="bullet"> + +<listitem> +ES6: <literal>EPSILON</literal>, <literal>MAX_SAFE_INTEGER</literal>, <literal>MAX_VALUE</literal>, @@ -119,14 +140,16 @@ <literal>NaN</literal>, <literal>POSITIVE_INFINITY</literal> </listitem> - -<listitem> -ES6 методы <literal>Number</literal>: +</list> </listitem> <listitem> -ES6 методы и свойства <literal>Number</literal>: +Методы <literal>Number</literal>: +<list type="bullet"> + +<listitem> +ES6: <literal>isFinite</literal>, <literal>isInteger</literal>, <literal>isNaN</literal>, @@ -134,6 +157,26 @@ <literal>parseFloat</literal>, <literal>parseInt</literal> </listitem> +</list> + +</listitem> + +<listitem> +Методы экземпляра класса <literal>Number</literal>: +<list type="bullet"> + +<listitem> +ES6: +<literal>toExponential</literal> +(<link doc="changes.xml" id="njs0.3.6">0.3.6</link>), +<literal>toFixed</literal> +(<link doc="changes.xml" id="njs0.3.6">0.3.6</link>), +<literal>toPrecision</literal> +(<link doc="changes.xml" id="njs0.3.6">0.3.6</link>) +</listitem> +</list> + +</listitem> <listitem>
--- a/xml/ru/docs/njs/reference.xml Tue Oct 22 18:24:04 2019 +0300 +++ b/xml/ru/docs/njs/reference.xml Tue Oct 22 18:29:36 2019 +0300 @@ -58,9 +58,10 @@ можно получить при помощи синтаксиса <literal>headersIn.foo</literal> или <literal>headersIn['Foo']</literal> <note> -Если заголовок может быть указан несколько раз, например +До версии <link doc="changes.xml" id="njs0.3.6">0.3.6</link> +если заголовок был указан несколько раз, например <header>Cookie</header> или <header>X-Forwarded-For</header>, -будет возвращено только первое значение. +то возвращалось только первое значение. Чтобы получить все cookie необходимо использовать <literal>r.variables.http_cookie</literal>.