mantoni/mochify.js

Use Browserify 17

Opened this issue · 1 comments

m90 commented

Ideally, Mochify would use Browserify 17 (instead of 16 at the time of writing) to keep in sync with maintained versions of the underlying tools.


Picking up the comment here: #223 (comment) I looked into why such an update from 16 to 17 is breaking Mochify and found out the following (this issue is mostly about collecting what I found out for whenever this updates becomes required for some reason):

  1. There is yet another new deprecation warning about the usage of SharedArrayBuffer that litters stderr, but that can be swallowed just as Mochify already does with other deprecation messages. (browserify/node-util#58)
  2. After muting these warnings, the tests for --no-detect-globals fail because of the following:
    Browserify 17 updates util to 0.12 browserify/browserify#1844, containing this commit browserify/node-util@6b82825 which is reading process.env.NODE_DEBUG without checking whether process is even defined. This means that when passing the option not to shim globals to browserify, any code that requires util (Mocha for example) will fail with an Uncaught ReferenceError: process is not defined

I'm not entirely sure if this is something that could be or should be worked around in Mochify or if this is something that is to be considered an upstream bug in either node-util or browserify. Mochify could of course also drop the --no-detect-globals flag again but this would mean #208 comes back to life.

m90 commented

There's an issue in node-util about this browserify/node-util#43