Dmitry Volyntsev xeioex at nginx.com
Tue Oct 25 17:27:13 UTC 2022


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

Notable new features:
  - js_preload_object directive:
     The directive preloads an immutable object at configure time.
     This significantly reduces the runtime cost of referencing large
     objects in JS code.

Learn more about njs:

- Overview and introduction: https://nginx.org/en/docs/njs/
- NGINX JavaScript in Your Web Server Configuration:
- Extending NGINX with Custom Code: https://youtu.be/0CVhq4AUU7M
- Using node modules with njs:
- Writing njs code using TypeScript definition files:

Feel free to try it and give us feedback on:

- Github: https://github.com/nginx/njs/issues
- Mailing list: https://mailman.nginx.org/mailman/listinfo/nginx-devel

Additional examples and howtos can be found here:

- Github: https://github.com/nginx/njs-examples

Changes with njs 0.7.8                                    25 Oct 2022

     nginx modules:

     *) Feature: added js_preload_object directive.

     *) Feature: added ngx.conf_prefix property.

     *) Feature: added s.sendUpstream() and s.sendDownstream()
        in stream module.

     *) Feature: added support for HEAD method in Fetch API.

     *) Improvement: improved async callback support for s.send()
        in stream module.


     *) Feature: added "name" instance property for a function

     *) Feature: added njs.memoryStats object.

     *) Bugfix: fixed String.prototype.trimEnd() with unicode

     *) Bugfix: fixed Object.freeze() with fast arrays.

     *) Bugfix: fixed Object.defineProperty() with fast arrays.

     *) Bugfix: fixed async token as a property name of an object.

     *) Bugfix: fixed property set instruction when key modifies
        base binding.

     *) Bugfix: fixed complex assignments.

     *) Bugfix: fixed handling of unhandled promise rejection.

     *) Bugfix: fixed process.env when duplicate environ variables
        are present.

     *) Bugfix: fixed double declaration detection in modules.

     *) Bugfix: fixed bound function calls according to the spec.

     *) Bugfix: fixed break label for if statement.

     *) Bugfix: fixed labeled empty statements.

More information about the nginx mailing list