Commit
1 year ago
Fixes #29942 The `--unstable-node-globals` flag was not exposing Node.js globals (`Buffer`, `global`, `process`, `setImmediate`, `clearImmediate`) in Worker contexts due to an empty object in the runtime configuration. **Changes:** - Fixed `unstableForWindowOrWorkerGlobalScope[unstableIds.nodeGlobals]` in `runtime/js/98_global_scope_shared.js` to properly expose Node.js globals - Added comprehensive unit test to verify all Node.js globals are available and functional in Workers **Testing:** - Added `tests/unit/worker_node_globals_test.ts` with coverage for all Node.js globals - Verified `Buffer.from()` functionality (the specific failing case from the issue) - Confirmed `global === globalThis` reference correctness
References
Author
gitstart-app[bot]
Parents
Loading