mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
1482547441
Print a deprecation warning for `process.binding()` when using `--pending-deprecation`. PR-URL: https://github.com/nodejs/node/pull/26500 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
17 lines
436 B
JavaScript
17 lines
436 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
|
|
// Flags: --pending-deprecation
|
|
|
|
common.expectWarning({
|
|
DeprecationWarning: [
|
|
['process.binding() is deprecated. Please use public APIs instead.',
|
|
'DEP0111'],
|
|
['Directly calling process.binding(\'uv\').errname(<val>) is being ' +
|
|
'deprecated. Please make sure to use util.getSystemErrorName() instead.',
|
|
'DEP0119']
|
|
]
|
|
});
|
|
|
|
process.binding('uv').errname(-1);
|