Node moved zlib's constants from under the zlib module to under zlib.constants e.g. zlib.Z_BEST_COMPRESSION is now zlib.constants.Z_BEST_COMPRESSION:
Note: Previously, the constants were available directly from require('zlib'), for instance zlib.Z_NO_FLUSH. Accessing the constants directly from the module is currently still possible but should be considered deprecated.
https://nodejs.org/api/zlib.html#zlib_constants
Flow's defs are here: https://github.com/facebook/flow/blob/master/lib/node.js#L1730. Probably could pull the fields out into a constants type and then intersect it into the zlib type for backwards compatibility.
I will take this one :)
Why wasn't this merged?
Oh idk I could look into this 馃憤