@cloudflare/unenv-preset@2.12.1
Breaking Changes📦 cloudflare-workersView on GitHub →
⚠ 1 breaking✨ 1 features🐛 1 fixes🔧 1 symbols
Summary
This patch introduces the use of native node:process v2 when compatibility conditions are met, which involved removing unintended EventEmitter methods from the imported process module.
⚠️ Breaking Changes
- EventEmitters methods (on, off, addListener, removeListener, ...) are no longer available on the imported `node:process` module. They should now only be accessed via the global `process` object. Fix by changing `p.on("exit", ...)` to `process.on("exit", ...)` where `p` is the imported process module.
Migration Steps
- If you were using EventEmitter methods (like on, off, addListener) on the imported `node:process` module (e.g., `import p from "node:process"; p.on(...)`), switch to using the global `process` object instead (e.g., `process.on(...)`).
✨ New Features
- Use the native `node:process` v2 when available, subject to specific compatibility date or flag conditions.
🐛 Bug Fixes
- Removed unintended availability of EventEmitters on the imported `node:process` module.