njs-0.3.2
Dmitry Volyntsev
xeioex at nginx.com
Tue May 21 16:18:41 UTC 2019
Hello,
I'm glad to announce a new release of NGINX JavaScript module (njs).
This release mostly focuses on stability issues in njs core after regular
fuzzing tests were introduced.
Notable new features:
- Added ES6 template literals support:
: > var a = "Template", b = "literals"
: undefined
: > `${a} ${b.toUpperCase()}!`
: 'Template LITERALS!'
- Added ES9 RegExp "groups" object support:
: > /(?<r>(?<no>no)?(?<yes>yes)?)/.exec('yes').groups
{
no: undefined,
r: 'yes',
yes: 'yes'
}
You can learn more about njs:
- Overview and introduction: http://nginx.org/en/docs/njs/
- Presentation: https://youtu.be/Jc_L6UffFOs
Feel free to try it and give us feedback on:
- Github: https://github.com/nginx/njs/issues
- Mailing list: http://mailman.nginx.org/mailman/listinfo/nginx-devel
Changes with njs 0.3.2 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 asterisk 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 "*" 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.
More information about the nginx
mailing list