Want to subscribe to topics you're interested in?
Become a Member

Nginx [nginx-announce] njs-0.3.0

Discussion in 'Nginx and PHP-FPM news & discussions' started by eva2000, Mar 27, 2019.

  1. eva2000

    eva2000 Administrator Staff Member

    May 24, 2014
    Brisbane, Australia
    Local Time:
    3:59 PM
    Nginx 1.21.x
    MariaDB 10.x

    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 initial ES6 modules support:
    : // module.js
    : function sum(a, b) {return a + b}
    : export default {sum};
    : // shell
    : > import m from 'module.js'
    : undefined
    : > m.sum(3, 4)
    : 7

    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.0 26 Mar 2019

    nginx modules:

    *) Feature: added js_path directive.

    *) Change: returning undefined value instead of empty strings
    for absent properties in the following objects: r.args,
    r.headersIn, r.headersOut, r.variables, s.variables.

    *) Change: returning undefined value instead of throwing an
    exception for r.requestBody when request body is unavailable.

    *) Bugfix: fixed crash while iterating over r.args when a value is
    absent in a key-value pair.


    *) 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

    *) 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.
    nginx-announce mailing list

    Continue reading...