v22.21.0
📦 node-jsView on GitHub →
✨ 6 features🐛 5 fixes🔧 9 symbols
Summary
This release introduces built-in proxy support for fetch and http/https requests via environment variables, adds a new callback for HTTP upgrade control, and stabilizes .env file support.
Migration Steps
- If using custom proxy logic for fetch, consider migrating to the built-in --use-env-proxy flag.
- Update HTTP server upgrade logic to utilize the new shouldUpgradeCallback if fine-grained control is required.
- Review memory limit configurations; --max-old-space-size can now be defined as a percentage of available memory.
✨ New Features
- Added --use-env-proxy CLI flag to enable environment-based proxy configuration.
- Added support for HTTP proxy in fetch() when NODE_USE_ENV_PROXY is enabled.
- Added shouldUpgradeCallback to HTTP servers to provide control over HTTP upgrades.
- Added built-in proxy support to http.request, https.request, and Agent.
- Added support for percentage values in the --max-old-space-size CLI flag.
- Marked .env file support as stable.
🐛 Bug Fixes
- Restored buffer optimization in dgram fixBufferList.
- Fixed a race condition between diagnostics_channel and Garbage Collection.
- Fixed an issue in Windows where readdir would add an unnecessary second trailing slash.
- Optimized checkIsHttpToken for short strings in the http module.
- Improved Promise handling in crypto module by using async/await and avoiding promise.catch().