[nginx-announce] njs-0.3.1

Dmitry Volyntsev xeioex at nginx.com
Tue Apr 16 15:50:45 UTC 2019


Hello,

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

This release proceeds to extend the coverage of ECMAScript
specifications and modules functionality.

- Added ES6 arrow functions support:
: > var materials = ['Hydrogen', 'Helium', 'Lithium']
: undefined
: > materials.map(material => material.length)
: [
:  8,
:  6,
:  7
: ]

: r.subrequest('/foo', rep => r.return(rep.status, rep.responseBody))

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.1                                      16 Apr 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: console.log() improved for outputting large values.

     *) Improvement: console.log() improved for outputting strings in a
        compliant way (without escaping and quotes).

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


More information about the nginx-announce mailing list