module: deprecate Module._debug
The _debug of Module is undocumented and it useless here. PR-URL: https://github.com/nodejs/node/pull/13948 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
6f1caadb85
commit
9d7574eef5
@ -684,6 +684,15 @@ difference is that `querystring.parse()` does url encoding:
|
|||||||
{ '%E5%A5%BD': '1' }
|
{ '%E5%A5%BD': '1' }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<a id="DEP0077"></a>
|
||||||
|
### DEP0077: Module.\_debug()
|
||||||
|
|
||||||
|
Type: Runtime
|
||||||
|
|
||||||
|
`Module._debug()` has been deprecated.
|
||||||
|
|
||||||
|
*Note*: `Module._debug()` was never documented as an officially supported API.
|
||||||
|
|
||||||
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
|
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
|
||||||
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array
|
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array
|
||||||
[`Buffer.from(buffer)`]: buffer.html#buffer_class_method_buffer_from_buffer
|
[`Buffer.from(buffer)`]: buffer.html#buffer_class_method_buffer_from_buffer
|
||||||
|
@ -80,11 +80,11 @@ Module.globalPaths = [];
|
|||||||
|
|
||||||
Module.wrapper = NativeModule.wrapper;
|
Module.wrapper = NativeModule.wrapper;
|
||||||
Module.wrap = NativeModule.wrap;
|
Module.wrap = NativeModule.wrap;
|
||||||
Module._debug = util.debuglog('module');
|
|
||||||
|
|
||||||
// We use this alias for the preprocessor that filters it out
|
const debug = util.debuglog('module');
|
||||||
const debug = Module._debug;
|
|
||||||
|
|
||||||
|
Module._debug = util.deprecate(debug, 'Module._debug is deprecated.',
|
||||||
|
'DEP0077');
|
||||||
|
|
||||||
// given a module name, and a list of paths to test, returns the first
|
// given a module name, and a list of paths to test, returns the first
|
||||||
// matching file in the following precedence.
|
// matching file in the following precedence.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user