Learn about Centmin Mod LEMP Stack today
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

    54,896
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    9:23 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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 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.

    Core:

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

    *) 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
    nginx-announce@nginx.org
    http://mailman.nginx.org/mailman/listinfo/nginx-announce

    Continue reading...