When util.js is bundled with browserify and run in browser, util.deprecate falls into an infinite loop here because process is not namespaced to global - it's only global within the context of the browserify bundle.
I can see where this would fall to @substack considering this deviates from the node environment, but I can also see why they would not want to set window.process from within a bundle. Checking typeof process rather than isUndefined(global.process) would be a simple solution.
Regardless, the --no-deprecation check should occur first to provide a way to avoid this.
Demo here.
When
util.jsis bundled with browserify and run in browser,util.deprecatefalls into an infinite loop here becauseprocessis not namespaced toglobal- it's only global within the context of the browserify bundle.I can see where this would fall to @substack considering this deviates from the node environment, but I can also see why they would not want to set
window.processfrom within a bundle. Checkingtypeof processrather thanisUndefined(global.process)would be a simple solution.Regardless, the
--no-deprecationcheck should occur first to provide a way to avoid this.Demo here.