github nginx/njs 0.9.6

9 hours ago

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

Don't miss a new njs release

NewReleases is sending notifications on new releases.