Learn about Centmin Mod LEMP Stack today
Register Now

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

    39,742
    8,765
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,486
    Local Time:
    5:25 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    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
    [email protected]
    http://mailman.nginx.org/mailman/listinfo/nginx-announce

    Continue reading...
     
..