Releases: nginx/njs
0.9.8
Bug Fixes
nginx modules
- Fixed loading of the built-in
cryptomodule — a regression introduced in 3185ce81 (0.9.7) causedimport cr from 'crypto'to fail atnginx -twith ENOENT.njs_crypto_moduleis now registered in the nginx addon module lists under the existingNJS_HAVE_OPENSSLguard (closes #1049)
Full Changelog: 0.9.7...0.9.8
0.9.7
Features
- WebCrypto Ed25519 and X25519 support — Edwards-curve signatures and X25519 ECDH now available via
subtle.sign,subtle.verify, andsubtle.deriveBits - WebCrypto
wrapKey()andunwrapKey()support added, including the AES-KW algorithm and JWK-format unwrap crypto.randomUUID()— RFC 4122 v4 UUID generatorawaitexpressions are now allowed in tagged templates and as call argumentsngx.shared.SharedDict.ttl()— returns the remaining time-to-live for a key in a shared dict- Improved shared dict eviction strategy — evicts oldest entries more aggressively when the zone is under memory pressure
Improvements
- Built-in
cryptomodule switched to the OpenSSL EVP interface for hashing, reducing reliance on low-level OpenSSL APIs
Bug Fixes
nginx modules
- Removed spurious
js vm initnotice 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
lengthproperty of anArrayinstance
Full Changelog: 0.9.6...0.9.7
0.9.6
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
stackproperty instead - Error.stack traces are now attached in error constructors, with ~100× performance improvement
Bug Fixes
nginx modules
- Fixed
expirefield truncation in shared dict state files — millisecond timestamps were silently truncated to 10 digits, causing restored entries to appear expired on restart. Appeared ineca03622(0.9.1) - Suppressed spurious
slab log_nomemmessages 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 sincee7caa46d(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
PTRmacro compatibility with newer BFD library auto/cc: replacedwhichwith portablecommand -v(thanks to Zurab Kvachadze)
New Contributors
- @OwenSanzas made their first contribution in #1013
- @BalkanMadman made their first contribution in #1016
Full Changelog: 0.9.5...0.9.6
0.9.5
This release adds QuickJS native extensions support.
What's Changed
- Quickjs native extension. by @xeioex in #998
- Fetch: making sure catch handler is executed asynchronously. by @VadimZhestikov in #981
- Modules: improved handling of results of async handlers. by @VadimZhestikov in #984
- Added Object.hasOwn(). by @VadimZhestikov in #986
- Using printing and parsing library from QuickJS. by @xeioex in #987
- Quickjs-ng 0.11.0 support by @xeioex in #989
- Fix detached buffer by @xeioex in #991
- Xml module fixes. by @xeioex in #994
- Fixed missed allocation check in promise code. by @xeioex in #995
- Fix fs.mkdir(). by @xeioex in #996
- Filter need in memory by @xeioex in #997
- HTTP: fixed buffer_type inheritance in if blocks. by @xeioex in #1000
- Respecting user provided CFLAGS. by @xeioex in #993
- Types: fixed CipherAlgorithm and Pbkdf2Params by @mkaesberger in #1001
- HTTP: improved r.subrequest() error handling after d34fcb0 (0.8.5). by @xeioex in #1007
- QuickJS: fixed js_body_filter with multiple chunks. by @xeioex in #1009
- Version 0.9.5. by @xeioex in #1010
New Contributors
- @mkaesberger made their first contribution in #1001
Full Changelog: 0.9.4...0.9.5
0.9.4
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
This is a bugfix release. It fixes js_set variables in log phase broken in 04f6dfb (0.9.2).
What's Changed
- Readme: updated hero graphic. by @mtbChef in #973
- Exception while loading. by @xeioex in #972
- Rethinking exit hook. by @xeioex in #970
- Version 0.9.3. by @xeioex in #975
Full Changelog: 0.9.2...0.9.3
0.9.2
This release adds HTTP keepalive support to ngx.fetch() API. Additionally, the njs.on('exit') API was added for qjs engine.
What's Changed
- Change: increasing the default stack size to 160k. by @xeioex in #950
- Fixed building QuickJS support with clang 19. by @xeioex in #958
- Fix long running streams in tcp stream by @xeioex in #954
- Qjs exit hook by @xeioex in #959
- Fetch keepalive support. by @xeioex in #963
- Fixed build with GCC 15 and O3 optimization level. by @xeioex in #965
- Fix no ssl build by @xeioex in #966
Full Changelog: 0.9.1...0.9.2
0.9.1
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
- @Nekrolm made their first contribution in #912
- @orgads made their first contribution in #927
- @cppcoffee made their first contribution in #937
Full Changelog: 0.9.0...0.9.1
0.9.0
This release features a 30% performance improvement for the njs engine and support for GCC 15.
What's Changed
- Refactored working with built-in strings, symbols and small integers. by @VadimZhestikov in #848
- Fixed regexp undefined value of captured group. by @VadimZhestikov in #900
- Fixed GCC 15 build with -Wunterminated-string-initialization. by @xeioex in #902
- HTTP: fixed GCC 15 build with -Wunterminated-string-initialization. by @xeioex in #904
- Release 0.9.0 by @VadimZhestikov in #906
Full Changelog: 0.8.10...0.9.0