W3cubDocs

/nginx

Changes

Changes with 0.3.3

Release Date: 25 June 2019

nginx modules:

  • Improvement: getting of special response headers in r.headersOut{}.

  • Improvement: working with unknown methods in r.subrequest().

  • Improvement: added support for null as a second argument of r.subrequest().

  • Bugfix: fixed processing empty output chain in stream body filter.

Core:

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

  • Feature: added process global object.

  • Feature: writable most of built-in properties and methods.

  • Feature: added generic implementation of Array.prototype.fill().

  • Bugfix: fixed integer-overflow in String.prototype.concat().

  • Bugfix: fixed setting of object properties.

  • Bugfix: fixed Array.prototype.toString().

  • Bugfix: fixed Date.prototype.toJSON().

  • Bugfix: fixed overwriting “constructor” property of built-in prototypes.

  • Bugfix: fixed processing of invalid surrogate pairs in strings.

  • Bugfix: fixed processing of invalid surrogate pairs in JSON strings.

  • Bugfix: fixed heap-buffer-overflow in toUpperCase() and toLowerCase().

  • Bugfix: fixed escaping lone closing square brackets in RegExp() constructor.

  • Bugfix: fixed handling zero byte characters inside RegExp pattern strings.

  • Bugfix: fixed String.prototype.toBytes() for ASCII strings.

  • Bugfix: fixed truth value of JSON numbers in JSON.parse().

  • Bugfix: fixed use-of-uninitialized-value in njs_string_replace_join().

  • Bugfix: fixed parseInt('-0'). Thanks to Artem S. Povalyukhin.

Changes with 0.3.2

Release Date: 21 May 2019

Core:

  • Feature: added support for template literals. Thanks to 洪志道 (Hong Zhi Dao) and Artem S. Povalyukhin.

  • Feature: executing command from command line arguments.

  • Feature: added support for RegExp groups object (ES9).

  • Feature: added block scoped function definitions support.

  • Feature: added support for building with GNU Readline library.

  • Feature: made configurable length, name, and most of built-in methods.

  • Feature: made all constructor properties configurable.

  • Bugfix: fixed Regexp.prototype.exec() for Unicode-only regexps.

  • Bugfix: fixed njs_vm_value_dump() for empty string values.

  • Bugfix: fixed RegExp constructor for regexp value arguments.

  • Bugfix: fixed walking over prototypes chain during iteration over an object.

  • Bugfix: fixed overflow in Array.prototype.concat().

  • Bugfix: fixed length calculation for UTF-8 string with escape characters.

  • Bugfix: fixed parsing surrogate pair presents as UTF-16 escape sequences.

  • Bugfix: fixed processing the “*” quantifier for String.prototype.match().

  • Bugfix: fixed Date() constructor with one argument.

  • Bugfix: fixed arrays expansion.

  • Bugfix: fixed heap-buffer-overflow in String.prototype.replace().

  • Bugfix: fixed heap-buffer-overflow in String.prototype.lastIndexOf().

  • Bugfix: fixed regexp literals parsing with escaped backslash and backslash in square brackets.

  • Bugfix: fixed regexp literals with lone closing brackets.

  • Bugfix: fixed uninitialized-memory-access in Object.defineProperties().

  • Bugfix: fixed processing the “*” quantifier for String.prototype.replace().

  • Bugfix: fixed Array.prototype.slice() for UTF8-invalid byte strings.

  • Bugfix: fixed String.prototype.split() for UTF8-invalid byte strings.

  • Bugfix: fixed handling of empty block statements.

Changes with 0.3.1

Release Date: 16 April 2019

Core:

  • Feature: added arrow functions support. Thanks to 洪志道 (Hong Zhi Dao) and Artem S. Povalyukhin.

  • Feature: added Object.getOwnPropertyNames(). Thanks to Artem S. Povalyukhin.

  • Feature: added Object.getOwnPropertyDescriptors(). Thanks to Artem S. Povalyukhin.

  • Feature: making __proto__ accessor descriptor of Object instances mutable.

  • Feature: added shebang support in CLI.

  • Feature: added support for module mode execution in CLI. In module mode global, this is unavailable.

  • Bugfix: fixed editline detection.

  • Bugfix: fixed Function.prototype.bind(). Thanks to 洪志道 (Hong Zhi Dao).

  • Bugfix: fixed checking of duplication of parameters for functions. Thanks to 洪志道 (Hong Zhi Dao).

  • Bugfix: fixed function declaration with the same name as a variable. Thanks to 洪志道 (Hong Zhi Dao).

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

  • Improvement: large-value output improved in console.log().

  • Improvement: string output improved in console.log() in a compliant way (without escaping and quotes).

  • Improvement: using ES6 version of ToInt32(), ToUint32(), ToLength().

Changes with 0.3.0

Release Date: 26 March 2019

nginx modules:

Core:

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

  • Feature: added Object.prototype.propertyIsEnumerable().

  • Feature: reporting file name and function name in disassembler output.

  • Bugfix: fixed function redeclarations in interactive shell. Thanks to 洪志道 (Hong Zhi Dao).

  • Bugfix: fixed RegExp literals parsing.

  • Bugfix: fixed setting length of UTF8 string in fs.readFileSync().

  • Bugfix: fixed nxt_file_dirname() for paths with no dir component.

Changes with 0.2.8

Release Date: 26 February 2019

nginx modules:

  • Change: properties of HTTP request deprecated in 0.2.2 are removed.

  • Feature: added support for delete operation in r.headersOut{}.

  • Feature: added support for setting nginx variables.

  • Bugfix: fixed r.subrequest() for empty body value.

  • Improvement: setting special response headers in r.headersOut{}.

Core:

  • Feature: added labels support.

  • Feature: added setImmediate() method.

  • Feature: added support for shorthand property names for Object literals.

  • Bugfix: fixed Function.prototype.bind().

  • Bugfix: fixed parsing of string literals containing newline characters.

  • Bugfix: fixed line number in reporting variable reference errors.

  • Bugfix: fixed creation of long UTF8 strings.

  • Bugfix: fixed setting special response headers in String.prototype.split() for Unicode strings.

  • Bugfix: fixed heap-buffer-overflow in String.prototype.split().

  • Bugfix: fixed Array.prototype.fill(). Thanks to Artem S. Povalyukhin.

  • Improvement: code related to function invocation is refactored. Thanks to 洪志道 (Hong Zhi Dao).

  • Improvement: code related to variables is refactored. Thanks to 洪志道 (Hong Zhi Dao).

  • Improvement: parser is refactored. Thanks to 洪志道 (Hong Zhi Dao).

  • Improvement: reporting filenames in exceptions.

Changes with 0.2.7

Release Date: 25 December 2018

Core:

  • Feature: rest parameters syntax (destructuring is not supported). Thanks to Alexander Pyshchev.

  • Feature: added Object.entries() method.

  • Feature: added Object.values() method.

  • Improvement: code generator refactored and simplified.

  • Bugfix: fixed automatic semicolon insertion.

  • Bugfix: fixed assignment expression from compound assignment.

  • Bugfix: fixed comparison of Byte and UTF8 strings.

  • Bugfix: fixed type of iteration variable in for-in with array values.

  • Bugfix: fixed building on platforms without librt.

  • Bugfix: miscellaneous bugs have been fixed.

Changes with 0.2.6

Release Date: 27 November 2018

Core:

  • Feature: making built-in prototypes mutable.

  • Feature: making global object mutable.

  • Feature: console.time() and console.timeEnd() methods.

  • Feature: allowing variables and functions to be redeclared.

  • Feature: extending Object.defineProperty() spec conformance.

  • Feature: introduced quiet mode for CLI to handle simple expressions from stdin.

  • Feature: introduced compact form of backtraces to handle stack overflows.

  • Improvement: improved wording for various exceptions.

  • Bugfix: fixed closure values handling.

  • Bugfix: fixed equality operator for various value types.

  • Bugfix: fixed handling of “this” keyword in various scopes.

  • Bugfix: fixed handling non-object values in Object.keys().

  • Bugfix: fixed parsing of throw statement inside if statement.

  • Bugfix: fixed parsing of newline after throw statement.

  • Bugfix: fixed parsing of statements in if statement without newline.

  • Bugfix: fixed size uint32_t overflow in njs_array_expand().

  • Bugfix: fixed typeof operator for object_value type.

  • Bugfix: miscellaneous bugs have been fixed.

Changes with 0.2.5

Release Date: 30 October 2018

nginx modules:

  • Bugfix: fixed counting pending events in stream module.

  • Bugfix: fixed s.off() in stream module.

  • Bugfix: fixed processing of data chunks in js_filter in stream module.

  • Bugfix: fixed http status and contentType getter in http module.

  • Bugfix: fixed http response and parent getters in http module.

Core:

  • Feature: arguments object support.

  • Feature: non-integer fractions support.

  • Improvement: handling non-array values in Array.prototype.slice().

  • Bugfix: fixed Array.prototype.length setter

  • Bugfix: fixed njs_array_alloc() for length > 2**31.

  • Bugfix: handling int overflow in njs_array_alloc() on 32bit archs.

  • Bugfix: fixed code size mismatch error message.

  • Bugfix: fixed delete operator in a loop.

  • Bugfix: fixed Object.getOwnPropertyDescriptor() for complex object (inherited from Array and string values).

  • Bugfix: fixed Object.prototype.hasOwnProperty() for non-object properties

  • Bugfix: miscellaneous bugs have been fixed.

Changes with 0.2.4

Release Date: 18 September 2018

nginx modules:

Core:

  • Feature: added Function.prototype.length.

  • Feature: introduced sandboxing mode.

  • Improvement: added exception strings where appropriate.

  • Improvement: improved wording for primitive type conversion exception.

  • Bugfix: throwing TypeError for attempts to change frozen properties.

  • Bugfix: fixed Object.defineProperty() for existing properties.

  • Bugfix: respecting the enumerable attribute while iterating by for in.

  • Bugfix: respecting writable attribute for property handlers.

  • Bugfix: fixed exception handling in arguments of a function.

  • Bugfix: fixed Object.prototype.toString for different value types.

  • Bugfix: fixed Object() constructor for object types arguments.

  • Bugfix: fixed comparison of objects and strings.

  • Bugfix: fixed String.slice() for undefined arguments.

  • Bugfix: miscellaneous bugs have been fixed.

Changes with 0.2.3

Release Date: 31 July 2018

nginx modules:

  • Bugfix: making a subrequest from a Reply object caused a segmentation fault.

  • Bugfix: getting the parent property of the main HTTP Request object caused a segmentation fault.

Core:

  • Feature: added the pretty string representation for values.

  • Feature: correctly printing floating point numbers.

  • Feature: correctly parsing floating point numbers.

  • Feature: String.bytesFrom() method (decoding hex, base64, base64url into a byte string).

  • Feature: String.padStart() and String.padEnd() methods.

  • Feature: added support of binary literals.

  • Improvement: added information about illegal token in number parsing.

  • Improvement: allowed uppercased O in octal literal values.

  • Improvement: added support for multiple arguments in console.log().

  • Bugfix: fixed applying call() to methods of external values.

  • Bugfix: fixed addition operator applied to an object.

  • Bugfix: fixed exception handling in njs_vm_value_to_ext_string().

  • Bugfix: fixed Number() with boolean, null and undefined arguments.

  • Bugfix: fixed error handling of setting non-numeric Array.length.

  • Bugfix: fixed autocompletion for global objects.

  • Bugfix: miscellaneous bugs have been fixed.

Changes with 0.2.2

Release Date: 19 June 2018

nginx modules:

  • Change: merged HTTP Response and Reply into HTTP Request. New members of Request:

    • req.status (res.status)

    • req.parent (reply.parent)

    • req.requestBody (req.body)

    • req.responseBody (reply.body)

    • req.headersIn (req.headers)

    • req.headersOut (res.headers)

    • req.sendHeader() (res.sendHeader())

    • req.send() (res.send())

    • req.finish() (res.finish())

    • req.return() (res.return())

    Deprecated members of Request:

    • req.body (use req.requestBody or req.responseBody)

    • req.headers (use req.headersIn or req.headersOut)

    • req.response

    Deprecated members of Response:

    The deprecated properties will be removed in next releases.

  • Feature: HTTP internalRedirect() method.

Core:

  • Bugfix: fixed heap-buffer-overflow in crypto.createHmac().

Changes with 0.2.1

Release Date: 31 May 2018

nginx modules:

  • Feature: HTTP request body getter.

  • Improvement: moved njs vm to the main configuration.

  • Improvement: improved logging for js_set and js_content directives.

  • Improvement: setting status code to 500 by default in the js_content handler

  • Improvement: added the debug for the returned status code in js_content handler

  • Bugfix: fixed error logging in js_include.

Core:

  • Feature: added array length setter.

  • Improvement: public header cleanup. njscript.h is renamed to njs.h.

  • Bugfix: fixed crypto update() method after digest() is called.

  • Bugfix: fixed crypto.createHmac() for keys with size <= alg size and > 64.

  • Bugfix: fixed JSON.stringify() for arrays with empty cells.

  • Bugfix: fixed exception type for unsupported types in JSON.stringify().

  • Bugfix: fixed handling of undefined arguments of functions.

  • Bugfix: fixed handling of missing arg of Object.getOwnPropertyDescriptor().

  • Bugfix: fixed handling of properties in Object.getOwnPropertyDescriptor().

  • Bugfix: fixed the writeable flag of Array.length property.

  • Bugfix: fixed return value type of clearTimeout().

  • Bugfix: fixed njs_vm_external_bind().

  • Bugfix: miscellaneous bugs have been fixed.

Changes with 0.2.0

Release Date: 3 Apr 2018

  • Feature: reporting njs version by CLI.

  • Feature: textual description for type converting exceptions.

  • Feature: setTimeout() and clearTimeout() methods.
  • Feature: Byte string to hex, base64, base64url encodings.

  • Feature: Node.js style Crypto methods.

  • Feature: HTTP and stream warn() and error() methods.

  • Feature: HTTP subrequest() method.

  • Feature: HTTP return() method.

  • Bugfix: miscellaneous bugs have been fixed in the core and interactive shell.

Changes with 0.1.15

Release Date: 20 Nov 2017

  • Feature: Error, EvalError, InternalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError objects.

  • Feature: octal literals support.

  • Feature: Node.js style File system access methods: fs.readFile(), fs.readFileSync(), fs.appendFile(), fs.appendFileSync(), fs.writeFile(), fs.writeFileSync().

  • Feature: nginx modules print backtrace on exception.

  • Bugfix: miscellaneous bugs have been fixed.

Changes with 0.1.14

Release Date: 09 Oct 2017

  • Feature: JSON object.

  • Feature: object level completions in interactive shell.

  • Feature: various configure improvements.

  • Bugfix: miscellaneous bugs have been fixed in the core and interactive shell.

Changes with 0.1.13

Release Date: 31 Aug 2017

  • Feature: console.log() and console.help() methods in interactive shell.

  • Feature: interactive shell prints backtrace on exception.

  • Feature: interactive shell by default if libedit is available.

  • Bugfix: processing of large files from stdin in command line mode.

  • Bugfix: improved editline detection.

Changes with 0.1.12

Release Date: 08 Aug 2017

  • Feature: Interactive shell.

  • Bugfix: in Object.isSealed().

Changes with 0.1.11

Release Date: 27 Jun 2017

  • Feature: Object.keys(), Object.prototype.hasOwnProperty() methods.

  • Feature: Object.defineProperty(), Object.defineProperties(), Object.getOwnPropertyDescriptor() methods.

  • Feature: Object.getPrototypeOf(), Object.prototype.isPrototypeOf() methods.

  • Feature: Object.preventExtensions(), Object.isExtensible(), Object.freeze(), Object.isFrozen(), Object.seal(), Object.isSealed() methods.

  • Feature: scientific notation (3.35e10) literals support.

  • Feature: hexadecimal (0x1123) literals support.

  • Bugfix: processing of large array indexes.

  • Bugfix: in parseInt() and Date.parse().

Changes with 0.1.10

Release Date: 04 Apr 2017

  • Feature: nested functions and function closures.

  • Feature: Array.of(), Array.prototype.fill(), Array.prototype.find(), Array.prototype.findIndex() methods.

  • Bugfix: miscellaneous bugs and segmentation faults have been fixed.

Changes with 0.1.9

Release Date: 01 Feb 2017

  • Bugfix: global variables were not initialized when njs was used in nginx.

Changes with 0.1.8

Release Date: 24 Jan 2017

  • Change: the strict mode is enforced, variables must be explicitly declared.

  • Feature: for and for-in loops support variable declaration.

  • Bugfix: global and function scopes have been fixed.

  • Bugfix: now for-in loop does not discard the last value of property variable.

  • Bugfix: miscellaneous bugs and segmentation faults have been fixed.

Changes with 0.1.7

Release Date: 27 Dec 2016

  • Change: the js_include directive has been disabled at server and location levels.

  • Feature: exponentiation operators.

  • Bugfix: miscellaneous bugs and segmentation faults have been fixed.

Changes with 0.1.6

Release Date: 13 Dec 2016

  • Change: the js_set directive has been disabled at server and location levels.

  • Feature: ES6 Math methods.

  • Bugfix: miscellaneous bugs and segmentation faults have been fixed.

© 2002-2019 Igor Sysoev
© 2011-2019 Nginx, Inc.
Licensed under the BSD License.
https://nginx.org/en/docs/njs/changes.html