parcel-bundler / parcel

The zero configuration build tool for the web. 📦🚀
https://parceljs.org
MIT License
43.27k stars 2.26k forks source link

Fix dev packager global reference #9814

Closed MonicaOlejniczak closed 1 week ago

MonicaOlejniczak commented 1 week ago

↪️ Pull Request

When running parcel without scope hoisting, global references are not passed through correctly in the DevPackager module. This results in runtime errors when any code directly uses global. without any checks of its existence since var global = arguments[3] is always undefined. These changes amend the pass through of the global object, so that arguments[3] exists under a privately namespaced variable to prevent collisions with other constants named global.

🚨 Test instructions

yarn test:integration