[nginx-announce] njs-0.3.4

Dmitry Volyntsev xeioex at nginx.com
Tue Aug 13 16:10:33 UTC 2019


I'm glad to announce a new release of NGINX JavaScript module (njs).

This release proceeds to extend the coverage of ECMAScript
specifications. Apart from specs conformance fuzzing under
Memory-Sanitizer is introduced which allowed to catch new types of bugs.

Notable new features:
- Shorthand method names (ES2015):
: > ({foo(){return 123}}).foo() // ({foo:function(){return 123}})
: 123

- Computed property names (ES2015)
: > ({['b' + 'ar']:123}).bar
: 123

- added getter/setter literal support:
: > ({get foo(){return 123}}).foo
: 123
: > ({get ['f' + 'oo'](){return 123}}).foo
: 123

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.4                                      13 Aug 2019

     *) Feature: added Object shorthand methods and computed property
        names. Thanks to 洪志道 (Hong Zhi Dao) and Artem S. Povalyukhin.

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

     *) Feature: added fs.renameSync().

     *) Feature: added String.prototype.trimStart() and

     *) Improvement: added memory-sanitizer support.

     *) Improvement: Unicode case tables updated to version 12.1.

     *) Improvement: added UTF8 validation for string literals.

     *) Bugfix: fixed reading files with zero size in fs.readFileSync().

     *) Bugfix: extended the list of space separators in

     *) Bugfix: fixed using of uninitialized value in

     *) Bugfix: fixed String.prototype.replace() for '$0' and '$&'
        replacement string.

     *) Bugfix: fixed String.prototype.replace() for byte strings with
        regex argument.

     *) Bugfix: fixed global match in String.prototype.replace()
        with regexp argument.

     *) Bugfix: fixed Array.prototype.slice() for primitive types.

     *) Bugfix: fixed heap-buffer-overflow while importing module.

     *) Bugfix: fixed UTF-8 character escaping.

     *) Bugfix: fixed Object.values() and Object.entries() for shared

     *) Bugfix: fixed uninitialized memory access in

     *) Bugfix: fixed String.prototype.match() for byte strings with
        regex argument.

     *) Bugfix: fixed Array.prototype.lastIndexOf() with undefined

     *) Bugfix: fixed String.prototype.substring() with empty substring.

     *) Bugfix: fixed invalid memory access in

     *) Bugfix: fixed String.fromCharCode() for code points > 65535
        and NaN.

     *) Bugfix: fixed String.prototype.toLowerCase() and

     *) Bugfix: fixed Error() constructor with no arguments.

     *) Bugfix: fixed "in" operator for values with accessor descriptors.

     *) Bugfix: fixed Object.defineProperty() for non-boolean descriptor

     *) Bugfix: fixed Error.prototype.toString() with UTF8 string

     *) Bugfix: fixed Error.prototype.toString() with non-string values
        for "name" and "message".

More information about the nginx-announce mailing list