bcoin-org / bcoin-org/bcash

Custom inspection function on Objects via .inspect() is deprecated

Open
#72 0 comments 4 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
104
Forks
66
PR merge metrics
No merged PRs in 30d

Description

This is a new deprecation warning shown on Node 10 (https://github.com/nodejs/node/issues/15549).

`(node:10005) [DEP0079] DeprecationWarning: Custom inspection function on Objects via .inspect() is deprecated`

It's shown whenever an object with inspect() defined is console.logged, like `await wallet.receiveAddress()`. As these inspect()s are spread out throughout the code the change needed is not trivial. The new API for this seems a bit cumbersome: https://nodejs.org/api/util.html#util_custom_inspection_functions_on_objects.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the inspect() definitions mentioned in the issue and review Node.js's custom inspection functions API. Update the affected objects to avoid the DEP0079 warning, then verify that console.log, including await wallet.receiveAddress(), no longer emits the deprecation warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.