Fix: update custom inspection to use a symbol#141
Conversation
|
Yay more API churn /sarcasm Also, failing tests. |
Node.js 11 removed support for the `inspect` property on objects as custom inspect functions. Instead, this can be done by using the util.inspect.custom symbol that is used here instead. To keep it backwarts compatible the old function stays in place.
d57267a to
d007c72
Compare
|
The test is fixed. I just want to point out that this only failed on Node.js < 6. Node.js < 6 does not receive any security updates anymore and 6 is currently the newest version tested against. Shall I open a PR to test on newer versions as well and are there any plans to drop support for the older versions? |
We support back to node 0.10 - there is no reason to stop supporting old versions of node at this juncture because we are a build tool... |
|
@phated please rerun the failures - they both should be either infrastructure failures while the one on travis could also be an issue with dev dependencies not supporting 0.10 anymore. |
|
Ping @phated the tests have to be partially triggered again. The code should be fine. |
|
Thanks @BridgeAR |
Node.js 11 removed support for the
inspectproperty on objects ascustom inspect functions. Instead, this can be done by using the
util.inspect.custom symbol that is used here instead. To keep it
backwarts compatible the old function stays in place.
The README actually has a reference to this as well. However, the old
inspect function will not be called by Node.js 11 anymore. I am not really
sure how to properly reflect that and just kept it as it is.