Mercurial > hg > nginx-site
changeset 2414:3b7223f9aac8
njs-0.3.4
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Tue, 13 Aug 2019 18:09:40 +0300 |
parents | c6581f9aefa3 |
children | f5f0d3fe3608 |
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, 357 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/njs/changes.xml Wed Aug 07 21:04:14 2019 +0300 +++ b/xml/en/docs/njs/changes.xml Tue Aug 13 18:09:40 2019 +0300 @@ -9,9 +9,268 @@ <article name="Changes" link="/en/docs/njs/changes.html" lang="en" - rev="21" + rev="22" toc="no"> +<section id="njs0.3.4" name="Changes with 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="renamesync"><literal>fs.renameSync()</literal></link>. +</para> +</listitem> + +<listitem> +<para> +Feature: +added +<link doc="reference.xml" id="string_trimend"><literal>String.prototype.trimEnd()</literal></link> +and +<link doc="reference.xml" id="string_trimstart"><literal>String.prototype.trimStart()</literal></link>. +</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 +<link doc="reference.xml" id="string_trim"><literal>String.prototype.trim()</literal></link>. +</para> +</listitem> + +<listitem> +<para> +Bugfix: +fixed using of uninitialized value in +<link doc="reference.xml" id="string_padstart"><literal>String.prototype.padStart()</literal></link>. +</para> +</listitem> + +<listitem> +<para> +Bugfix: +fixed +<link doc="reference.xml" id="string_replace"><literal>String.prototype.replace()</literal></link> for <literal>$0</literal> and <literal>$&</literal> replacement string. +</para> +</listitem> + +<listitem> +<para> +Bugfix: +fixed +<link doc="reference.xml" id="string_replace"><literal>String.prototype.replace()</literal></link> +for byte strings with regex argument. +</para> +</listitem> + +<listitem> +<para> +Bugfix: +fixed global match in +<link doc="reference.xml" id="string_replace"><literal>String.prototype.replace()</literal></link> +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 +<link doc="reference.xml" id="object_values"><literal>Object.values()</literal></link> +and +<link doc="reference.xml" id="object_entries"><literal>Object.entries()</literal></link> +for shared objects. +</para> +</listitem> + +<listitem> +<para> +Bugfix: +fixed uninitialized memory access in +<link doc="reference.xml" id="string_match"><literal>String.prototype.match()</literal></link>. +</para> +</listitem> + +<listitem> +<para> +Bugfix: +fixed +<link doc="reference.xml" id="string_match"><literal>String.prototype.match()</literal></link> +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 +<link doc="reference.xml" id="string_substring"><literal>String.prototype.substring()</literal></link> +with empty substring. +</para> +</listitem> + +<listitem> +<para> +Bugfix: +fixed invalid memory access in +<link doc="reference.xml" id="string_substring"><literal>String.prototype.substring()</literal></link>. +</para> +</listitem> + +<listitem> +<para> +Bugfix: +fixed +<link doc="reference.xml" id="string_fromcharcode"><literal>String.fromCharCode()</literal></link> +for code points more than <literal>65535</literal> and <literal>NaN</literal>. +</para> +</listitem> + +<listitem> +<para> +Bugfix: +fixed +<link doc="reference.xml" id="string_tolowercase"><literal>String.prototype.toLowerCase()</literal></link> +and +<link doc="reference.xml" id="string_touppercase"><literal>String.prototype.toUpperCase()</literal></link>. +</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 0.3.3"> <para> @@ -73,7 +332,7 @@ <para> Feature: added -<link doc="reference.xml" id="global_process"><literal>process</literal></link> +<link doc="reference.xml" id="process"><literal>process</literal></link> global object. </para> </listitem> @@ -163,8 +422,6 @@ </para> </listitem> - - <listitem> <para> Bugfix:
--- a/xml/en/docs/njs/compatibility.xml Wed Aug 07 21:04:14 2019 +0300 +++ b/xml/en/docs/njs/compatibility.xml Tue Aug 13 18:09:40 2019 +0300 @@ -9,7 +9,7 @@ <article name="Compatibility" link="/en/docs/njs/compatibility.html" lang="en" - rev="17" + rev="18" toc="no"> <section> @@ -214,6 +214,14 @@ </listitem> <listitem> +ES9: +<link doc="reference.xml" id="string_trimend"><literal>trimEnd</literal></link> +(<link doc="changes.xml" id="njs0.3.4">0.3.4</link>), +<link doc="reference.xml" id="string_trimstart"><literal>trimStart</literal></link> +(<link doc="changes.xml" id="njs0.3.4">0.3.4</link>) +</listitem> + +<listitem> non-standard: <link doc="reference.xml" id="string_bytesfrom"><literal>bytesFrom</literal></link> (0.2.3), <link doc="reference.xml" id="string_frombytes"><literal>fromBytes</literal></link>, @@ -231,8 +239,10 @@ <listitem> ES5.1: <literal>create</literal> (support without properties list), -<literal>defineProperties</literal> (support without accessor descriptors), -<literal>defineProperty</literal> (support without accessor descriptors), +<literal>defineProperties</literal> (accessor descriptors support +since <link doc="changes.xml" id="njs0.3.3">0.3.3</link>), +<literal>defineProperty</literal> (accessor descriptors support +since <link doc="changes.xml" id="njs0.3.3">0.3.3</link>), <literal>freeze</literal>, <literal>getOwnPropertyDescriptor</literal>, <literal>getOwnPropertyDescriptors</literal> @@ -488,7 +498,9 @@ <literal>File system</literal> methods: <link doc="reference.xml" id="appendfilesync"><literal>fs.appendFileSync</literal></link>, <link doc="reference.xml" id="readfilesync"><literal>fs.readFileSync</literal></link>, -<link doc="reference.xml" id="writefilesync"><literal>fs.writeFileSync</literal></link> +<link doc="reference.xml" id="writefilesync"><literal>fs.writeFileSync</literal></link>, +<link doc="reference.xml" id="renamesync"><literal>fs.renameSync</literal></link> +(<link doc="changes.xml" id="njs0.3.4">0.3.4</link>) </listitem> <listitem>
--- a/xml/en/docs/njs/reference.xml Wed Aug 07 21:04:14 2019 +0300 +++ b/xml/en/docs/njs/reference.xml Tue Aug 13 18:09:40 2019 +0300 @@ -9,7 +9,7 @@ <article name="Reference" link="/en/docs/njs/reference.html" lang="en" - rev="29"> + rev="30"> <section id="summary"> @@ -857,6 +857,26 @@ </example> </tag-desc> +<tag-name id="string_trimend"><literal>String.prototype.trimEnd()</literal></tag-name> +<tag-desc> +Removes whitespaces from the end of a string +(<link doc="changes.xml" id="njs0.3.4">0.3.4</link>). +<example> +>> ' abc '.trimEnd() +' abc' +</example> +</tag-desc> + +<tag-name id="string_trimstart"><literal>String.prototype.trimStart()</literal></tag-name> +<tag-desc> +Removes whitespaces from the beginning of a string +(<link doc="changes.xml" id="njs0.3.4">0.3.4</link>). +<example> +>> ' abc '.trimStart() +'abc ' +</example> +</tag-desc> + <tag-name id="encodeuri"><literal>encodeURI(<value>URI</value>)</literal></tag-name> <tag-desc> Encodes a URI by replacing each instance of certain characters @@ -1217,6 +1237,20 @@ </example> </tag-desc> +<tag-name id="renamesync"><literal>renameSync(<value>oldPath</value>, +<value>newPath</value>)</literal></tag-name> +<tag-desc> +Synchronously changes the name or location of a file from +<literal>oldPath</literal> to <literal>newPath</literal> +(<link doc="changes.xml" id="njs0.3.4">0.3.4</link>). +<example> +>> var fs = require('fs') +undefined +>> var file = fs.renameSync('hello.txt', 'HelloWorld.txt') +undefined +</example> +</tag-desc> + </list> </para>
--- a/xml/index.xml Wed Aug 07 21:04:14 2019 +0300 +++ b/xml/index.xml Tue Aug 13 18:09:40 2019 +0300 @@ -7,6 +7,15 @@ <news name="nginx news" link="/" lang="en"> +<event date="2019-07-13"> +<para> +<link doc="en/docs/njs/index.xml">njs-0.3.4</link> +version has been released, featuring +getter/setter literals support +and <link doc="en/docs/njs/changes.xml" id="njs0.3.4">more</link>. +</para> +</event> + <event date="2019-07-23"> <para> <link doc="en/download.xml">nginx-1.17.2</link>
--- a/xml/ru/docs/njs/compatibility.xml Wed Aug 07 21:04:14 2019 +0300 +++ b/xml/ru/docs/njs/compatibility.xml Tue Aug 13 18:09:40 2019 +0300 @@ -9,7 +9,7 @@ <article name="Совместимость" link="/ru/docs/njs/compatibility.html" lang="ru" - rev="17" + rev="18" toc="no"> <section> @@ -192,6 +192,14 @@ </listitem> <listitem> +ES9: +<link doc="reference.xml" id="string_trimend"><literal>trimEnd</literal></link> +(<link doc="changes.xml" id="njs0.3.4">0.3.4</link>), +<link doc="reference.xml" id="string_trimstart"><literal>trimStart</literal></link> +(<link doc="changes.xml" id="njs0.3.4">0.3.4</link>) +</listitem> + +<listitem> нестандартные: <link doc="reference.xml" id="string_bytesfrom"><literal>bytesFrom</literal></link> (0.2.3), <link doc="reference.xml" id="string_frombytes"><literal>fromBytes</literal></link>, @@ -209,8 +217,10 @@ <listitem> ES5.1: <literal>create</literal> (поддержка без списка свойств), -<literal>defineProperties</literal> (поддержка без дескрипторов доступа), -<literal>defineProperty</literal> (поддержка без дескрипторов доступа), +<literal>defineProperties</literal> (поддержка дескрипторов доступа +начиная с версии <link doc="changes.xml" id="njs0.3.3">0.3.3</link>), +<literal>defineProperty</literal> (поддержка дескрипторов доступа +начиная с версии <link doc="changes.xml" id="njs0.3.3">0.3.3</link>), <literal>freeze</literal>, <literal>getOwnPropertyDescriptor</literal>, <literal>getOwnPropertyDescriptors</literal> @@ -466,7 +476,9 @@ Методы <literal>File system</literal>: <link doc="reference.xml" id="appendfilesync"><literal>fs.appendFileSync</literal></link>, <link doc="reference.xml" id="readfilesync"><literal>fs.readFileSync</literal></link>, -<link doc="reference.xml" id="writefilesync"><literal>fs.writeFileSync</literal></link> +<link doc="reference.xml" id="writefilesync"><literal>fs.writeFileSync</literal></link>, +<link doc="reference.xml" id="renamesync"><literal>fs.renameSync</literal></link> +(<link doc="changes.xml" id="njs0.3.4">0.3.4</link>) </listitem> <listitem>
--- a/xml/ru/docs/njs/reference.xml Wed Aug 07 21:04:14 2019 +0300 +++ b/xml/ru/docs/njs/reference.xml Tue Aug 13 18:09:40 2019 +0300 @@ -844,6 +844,26 @@ </example> </tag-desc> +<tag-name id="string_trimend"><literal>String.prototype.trimEnd()</literal></tag-name> +<tag-desc> +Удаляет пробелы в конце строки. +(<link doc="changes.xml" id="njs0.3.4">0.3.4</link>). +<example> +>> ' abc '.trimEnd() +' abc' +</example> +</tag-desc> + +<tag-name id="string_trimstart"><literal>String.prototype.trimStart()</literal></tag-name> +<tag-desc> +Удаляет пробелы в начале строки. +(<link doc="changes.xml" id="njs0.3.4">0.3.4</link>). +<example> +>> ' abc '.trimStart() +'abc ' +</example> +</tag-desc> + <tag-name id="encodeuri"><literal>encodeURI(<value>URI</value>)</literal></tag-name> <tag-desc> Кодирует URI путём замены определённых символов