doc,assert,timers: assign deprecation codes
Overlooked when landing the respective PRs. PR-URL: https://github.com/nodejs/node/pull/18564 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
This commit is contained in:
parent
9686d876d1
commit
82a7347050
@ -840,15 +840,16 @@ Assigning properties to the top-level `this` as an alternative
|
|||||||
to `module.exports` is deprecated. Developers should use `exports`
|
to `module.exports` is deprecated. Developers should use `exports`
|
||||||
or `module.exports` instead.
|
or `module.exports` instead.
|
||||||
|
|
||||||
### DEP00XX: crypto.fips is deprecated and replaced.
|
<a id="DEP0093"></a>
|
||||||
|
### DEP0093: crypto.fips is deprecated and replaced.
|
||||||
|
|
||||||
Type: Documentation-only
|
Type: Documentation-only
|
||||||
|
|
||||||
The [`crypto.fips`][] property is deprecated. Please use `crypto.setFips()`
|
The [`crypto.fips`][] property is deprecated. Please use `crypto.setFips()`
|
||||||
and `crypto.getFips()` instead.
|
and `crypto.getFips()` instead.
|
||||||
|
|
||||||
<a id="DEP0XX"></a>
|
<a id="DEP0094"></a>
|
||||||
### DEP0XXX: Using `assert.fail()` with more than one argument.
|
### DEP0094: Using `assert.fail()` with more than one argument.
|
||||||
|
|
||||||
Type: Runtime
|
Type: Runtime
|
||||||
|
|
||||||
@ -856,15 +857,15 @@ Using `assert.fail()` with more than one argument has no benefit over writing an
|
|||||||
individual error message. Either use `assert.fail()` with one argument or switch
|
individual error message. Either use `assert.fail()` with one argument or switch
|
||||||
to one of the other assert methods.
|
to one of the other assert methods.
|
||||||
|
|
||||||
<a id="DEP00XX"></a>
|
<a id="DEP0095"></a>
|
||||||
### DEP00XX: timers.enroll()
|
### DEP0095: timers.enroll()
|
||||||
|
|
||||||
Type: Runtime
|
Type: Runtime
|
||||||
|
|
||||||
`timers.enroll()` is deprecated. Please use the publicly documented [`setTimeout()`][] or [`setInterval()`][] instead.
|
`timers.enroll()` is deprecated. Please use the publicly documented [`setTimeout()`][] or [`setInterval()`][] instead.
|
||||||
|
|
||||||
<a id="DEP00XX"></a>
|
<a id="DEP0096"></a>
|
||||||
### DEP00XX: timers.unenroll()
|
### DEP0096: timers.unenroll()
|
||||||
|
|
||||||
Type: Runtime
|
Type: Runtime
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ function fail(actual, expected, message, operator, stackStartFn) {
|
|||||||
'assert.fail() with more than one argument is deprecated. ' +
|
'assert.fail() with more than one argument is deprecated. ' +
|
||||||
'Please use assert.strictEqual() instead or only pass a message.',
|
'Please use assert.strictEqual() instead or only pass a message.',
|
||||||
'DeprecationWarning',
|
'DeprecationWarning',
|
||||||
'DEP00XXX'
|
'DEP0094'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (argsLen === 2)
|
if (argsLen === 2)
|
||||||
|
@ -358,7 +358,7 @@ function unenroll(item) {
|
|||||||
exports.unenroll = util.deprecate(unenroll,
|
exports.unenroll = util.deprecate(unenroll,
|
||||||
'timers.unenroll() is deprecated. ' +
|
'timers.unenroll() is deprecated. ' +
|
||||||
'Please use clearTimeout instead.',
|
'Please use clearTimeout instead.',
|
||||||
'DEP00XX');
|
'DEP0096');
|
||||||
|
|
||||||
|
|
||||||
// Make a regular object able to act as a timer by setting some properties.
|
// Make a regular object able to act as a timer by setting some properties.
|
||||||
@ -375,9 +375,9 @@ function enroll(item, msecs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
exports.enroll = util.deprecate(enroll,
|
exports.enroll = util.deprecate(enroll,
|
||||||
'timers.unenroll() is deprecated. ' +
|
'timers.enroll() is deprecated. ' +
|
||||||
'Please use clearTimeout instead.',
|
'Please use clearTimeout instead.',
|
||||||
'DEP00XX');
|
'DEP0095');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -19,7 +19,7 @@ process.on('warning', common.mustCall((warning) => {
|
|||||||
assert.strictEqual(lines[0], `${OVERFLOW} does not fit into a 32-bit signed` +
|
assert.strictEqual(lines[0], `${OVERFLOW} does not fit into a 32-bit signed` +
|
||||||
' integer.');
|
' integer.');
|
||||||
assert.strictEqual(lines.length, 2);
|
assert.strictEqual(lines.length, 2);
|
||||||
}, 4));
|
}, 5));
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user