[nginx-announce] njs-0.8.2

Dmitry Volyntsev xeioex at nginx.com
Tue Oct 24 19:59:10 UTC 2023


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

Notable new features:
- console object in nginx modules:
Console object is a global object that provides access to the environment's
console. It can be used to log information to the console, using
console.log(), console.info(), console.warn(), console.error() methods.

This feature unifies logging in nginx modules and njs CLI.

Learn more about njs:

- Overview and introduction:
- NGINX JavaScript in Your Web Server Configuration:
- Extending NGINX with Custom Code:
- Using node modules with njs:
- Writing njs code using TypeScript definition files:

Feel free to try it and give us feedback on:

- Github:
- Mailing list:

Additional examples and howtos can be found here:

- Github:

Changes with njs 0.8.2                                       24 Oct 2023

    nginx modules:

    *) Feature: introduced console object. The following methods
       were introduced: error(), info(), log(), time(), timeEnd(),

    *) Bugfix: fixed HEAD response handling with large Content-Length
       in fetch API.

    *) Bugfix: fixed items() method for a shared dictionary.

    *) Bugfix: fixed delete() method for a shared dictionary.


    *) Feature: extended "fs" module. Added existsSync().

    *) Bugfix: fixed "xml" module. Fixed broken XML exception handling
       in parse() method.

    *) Bugfix: fixed RegExp.prototype.exec() with global regexp and
       unicode input.

    *) Bugfix: fixed return statement parsing with invalid expression.

More information about the nginx-announce mailing list