Skip to content

Releases: nginx/njs

0.9.8

23 Apr 18:17

Choose a tag to compare

Bug Fixes

nginx modules

  • Fixed loading of the built-in crypto module — a regression introduced in 3185ce81 (0.9.7) caused import cr from 'crypto' to fail at nginx -t with ENOENT. njs_crypto_module is now registered in the nginx addon module lists under the existing NJS_HAVE_OPENSSL guard (closes #1049)

Full Changelog: 0.9.7...0.9.8

0.9.7

21 Apr 21:40

Choose a tag to compare

Features

Improvements

  • Built-in crypto module switched to the OpenSSL EVP interface for hashing, reducing reliance on low-level OpenSSL APIs

Bug Fixes

nginx modules

  • Removed spurious js vm init notice log emitted during configuration parsing
  • Removed shared dict expiration from read-locked paths — expiry side effects no longer run while a reader holds the shared-memory lock
  • Fixed double-free in shared dict update when eviction triggers
  • Fixed per-entry TTL being reset on SharedDict.incr() calls — a previously set custom timeout was silently replaced by the zone default

Core

  • Fixed call argument evaluation order
  • Fixed error handling when redefining the length property of an Array instance

Full Changelog: 0.9.6...0.9.7

0.9.6

03 Mar 20:13

Choose a tag to compare

Features

  • Optional chaining (?.) is now supported in the core engine
  • Nullish coalescing assignment (??=) operator added
  • Logical assignment operators (||= and &&=) added

Improvements

  • SyntaxError reporting now aligns with other JS engines — file name is no longer embedded in the error message, but exposed via the stack property instead
  • Error.stack traces are now attached in error constructors, with ~100× performance improvement

Bug Fixes

nginx modules

  • Fixed expire field truncation in shared dict state files — millisecond timestamps were silently truncated to 10 digits, causing restored entries to appear expired on restart. Appeared in eca03622 (0.9.1)
  • Suppressed spurious slab log_nomem messages for evict-enabled shared dict zones, where allocation failures are expected behavior
  • Fixed stack trace reporting for ngx.fetch() exceptions in the QuickJS engine

Core

  • Fixed string offset map corruption in scope values hash — caused SEGV/SIGBUS crashes for multi-byte UTF-8 string constants >32 characters when accessing a character at index ≥ 32 (e.g. via .replace() or bracket notation). Regression since e7caa46d (0.9.5)
  • Fixed heap-buffer-overflow in atom hash triggered by Symbol()
  • Fixed WebCrypto importKey() crash with mismatched JWK key type
  • Fixed interactive mode detection for piped stdin. Regression since 4988565c (0.8.0)
  • Fixed build on macOS
  • Fixed PTR macro compatibility with newer BFD library
  • auto/cc: replaced which with portable command -v (thanks to Zurab Kvachadze)

New Contributors

Full Changelog: 0.9.5...0.9.6

0.9.5

13 Jan 22:13

Choose a tag to compare

This release adds QuickJS native extensions support.

What's Changed

New Contributors

Full Changelog: 0.9.4...0.9.5

0.9.4

28 Oct 21:10

Choose a tag to compare

This release adds HTTP forward proxy support to ngx.fetch() API.

What's Changed

  • Fetch: added forward proxy support with HTTPS tunneling. by @xeioex in #976
  • QuickJS: fixed r.subrequest() to a location with JS handler. by @xeioex in #977
  • Modules: added error handling when logging a js exception string. by @VadimZhestikov in #978
  • Version 0.9.4. by @xeioex in #979

Full Changelog: 0.9.3...0.9.4

0.9.3

07 Oct 19:46

Choose a tag to compare

This is a bugfix release. It fixes js_set variables in log phase broken in 04f6dfb (0.9.2).

What's Changed

Full Changelog: 0.9.2...0.9.3

0.9.2

23 Sep 18:27

Choose a tag to compare

This release adds HTTP keepalive support to ngx.fetch() API. Additionally, the njs.on('exit') API was added for qjs engine.

What's Changed

Full Changelog: 0.9.1...0.9.2

0.9.1

10 Jul 20:30

Choose a tag to compare

This release adds Fetch API support to the QuickJS engine, bringing it to feature parity with njs.
Additionally, the shared dictionary now includes state file support, allowing its contents to persist across nginx restarts.

Read more about QuickJS support:
https://blog.nginx.org/blog/quickjs-engine-support-for-njs

What's Changed

  • WebCrypto: added support for HMAC as derivedKeyAlgorithm. by @xeioex in #909
  • QuickJS support for fetch(). by @hongzhidao in #908
  • Add missing null checks for njs_promise_create_function allocations by @Nekrolm in #912
  • WebCrypto: added ECDH support. by @xeioex in #911
  • WebCrypto: fixed issue introduced in 637fc26. by @xeioex in #913
  • Shared dict state file by @xeioex in #915
  • QuickJS: added memory limit check for reuse queue. by @xeioex in #916
  • Fixed segfault at error message in njs_property_query(). by @VadimZhestikov in #920
  • Fixed Function constructor template injection. by @xeioex in #922
  • Improved README.md clarity with angle bracket explanations. by @xeioex in #925
  • Fixed gcc compilation with O3 optimization level. by @xeioex in #924
  • Fixed compilation with old gcc by @xeioex in #926
  • Removed NGX_MAX_PATH define. by @orgads in #927
  • Fixed issues found with AddressSanitizer and test262. by @xeioex in #929
  • Fixed frame saving for awaited function with closures. by @xeioex in #928
  • Type script update. by @xeioex in #932
  • Fetch: fixed handling of Content-Length header when body is provided. by @xeioex in #933
  • Fixed regexp compilation of patterns with escaped '[' characters. by @xeioex in #936
  • doc: fixed invalid link in README.md by @cppcoffee in #937
  • Simple fixes to reduce memory consumption. by @VadimZhestikov in #935
  • Fixed RegExp compilation after 17124c8. by @xeioex in #942
  • Fixed NULL pointer dereference when processing If-* headers. by @xeioex in #944
  • ptimized memory consumption by object hash. by @VadimZhestikov in #938
  • Version 0.9.1. by @xeioex in #945

New Contributors

Full Changelog: 0.9.0...0.9.1

0.9.0

06 May 22:12

Choose a tag to compare

This release features a 30% performance improvement for the njs engine and support for GCC 15.

What's Changed

Full Changelog: 0.8.10...0.9.0