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:
Anna Henningsen 2018-02-04 19:59:53 +01:00 committed by Ruben Bridgewater
parent 9686d876d1
commit 82a7347050
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762
4 changed files with 13 additions and 12 deletions

View File

@ -840,15 +840,16 @@ Assigning properties to the top-level `this` as an alternative
to `module.exports` is deprecated. Developers should use `exports`
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
The [`crypto.fips`][] property is deprecated. Please use `crypto.setFips()`
and `crypto.getFips()` instead.
<a id="DEP0XX"></a>
### DEP0XXX: Using `assert.fail()` with more than one argument.
<a id="DEP0094"></a>
### DEP0094: Using `assert.fail()` with more than one argument.
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
to one of the other assert methods.
<a id="DEP00XX"></a>
### DEP00XX: timers.enroll()
<a id="DEP0095"></a>
### DEP0095: timers.enroll()
Type: Runtime
`timers.enroll()` is deprecated. Please use the publicly documented [`setTimeout()`][] or [`setInterval()`][] instead.
<a id="DEP00XX"></a>
### DEP00XX: timers.unenroll()
<a id="DEP0096"></a>
### DEP0096: timers.unenroll()
Type: Runtime

View File

@ -89,7 +89,7 @@ function fail(actual, expected, message, operator, stackStartFn) {
'assert.fail() with more than one argument is deprecated. ' +
'Please use assert.strictEqual() instead or only pass a message.',
'DeprecationWarning',
'DEP00XXX'
'DEP0094'
);
}
if (argsLen === 2)

View File

@ -358,7 +358,7 @@ function unenroll(item) {
exports.unenroll = util.deprecate(unenroll,
'timers.unenroll() is deprecated. ' +
'Please use clearTimeout instead.',
'DEP00XX');
'DEP0096');
// 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,
'timers.unenroll() is deprecated. ' +
'timers.enroll() is deprecated. ' +
'Please use clearTimeout instead.',
'DEP00XX');
'DEP0095');
/*

View File

@ -19,7 +19,7 @@ process.on('warning', common.mustCall((warning) => {
assert.strictEqual(lines[0], `${OVERFLOW} does not fit into a 32-bit signed` +
' integer.');
assert.strictEqual(lines.length, 2);
}, 4));
}, 5));
{