njs-0.4.4

Dmitry Volyntsev xeioex at nginx.com
Tue Sep 29 17:32:36 UTC 2020


Hello,

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

This release proceeds to extend the coverage of ECMAScript
specifications.

Notable new features:
- Buffer object.
: >> var buf = Buffer.from([0x80,206,177,206,178])
: undefined
: >> buf.slice(1).toString()
: 'αβ'
: >> buf.toString('base64')
: 'gM6xzrI='

- DataView object.
: >> (new DataView(buf.buffer)).getUint16()
: 32974

You can learn more about njs:

- Overview and introduction: http://nginx.org/en/docs/njs/
- Presentation: https://youtu.be/Jc_L6UffFOs
- Using node modules with njs: 
http://nginx.org/en/docs/njs/node_modules.html
- Writing njs code using TypeScript definition files:
   http://nginx.org/en/docs/njs/typescript.html

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.4.4                                                 
29 Sep 2020

     nginx modules:

     *) Bugfix: fixed location merge.

     *) Bugfix: fixed r.httpVersion for HTTP/2.

     Core:

     *) Feature: added support for numeric separators (ES12).

     *) Feature: added remaining methods for %TypedArray%.prototype.
        The following methods were added: every(), filter(), find(),
        findIndex(), forEach(), includes(), indexOf(), lastIndexOf(),
        map(), reduce(), reduceRight(), reverse(), some().

     *) Feature: added %TypedArray% remaining methods.
        The following methods were added: from(), of().

     *) Feature: added DataView object.

     *) Feature: added Buffer object implementation.

     *) Feature: added support for ArrayBuffer in
        TextDecoder.prototype.decode().

     *) Feature: added support for Buffer object in "crypto" methods.

     *) Feature: added support for Buffer object in "fs" methods.

     *) Change: Hash.prototype.digest() and Hmac.prototype.digest()
        now return a Buffer instance instead of a byte string when
        encoding is not provided.

     *) Change: fs.readFile() and friends now return a Buffer instance
        instead of a byte string when encoding is not provided.

     *) Bugfix: fixed function "prototype" property handler while
        setting.

     *) Bugfix: fixed function "constructor" property handler while
        setting.

     *) Bugfix: fixed String.prototype.indexOf() for byte strings.

     *) Bugfix: fixed RegExpBuiltinExec() with a global flag and
        byte strings.

     *) Bugfix: fixed RegExp.prototype[Symbol.replace] when the
        replacement value is a function.

     *) Bugfix: fixed TextDecoder.prototype.decode() with non-zero
        TypedArray offset.



More information about the nginx mailing list