Skip to content

Commit 82a7347

Browse files
addaleaxBridgeAR
authored andcommitted
doc,assert,timers: assign deprecation codes
Overlooked when landing the respective PRs. PR-URL: #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>
1 parent 9686d87 commit 82a7347

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

doc/api/deprecations.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -840,31 +840,32 @@ Assigning properties to the top-level `this` as an alternative
840840
to `module.exports` is deprecated. Developers should use `exports`
841841
or `module.exports` instead.
842842
843-
### DEP00XX: crypto.fips is deprecated and replaced.
843+
<a id="DEP0093"></a>
844+
### DEP0093: crypto.fips is deprecated and replaced.
844845
845846
Type: Documentation-only
846847
847848
The [`crypto.fips`][] property is deprecated. Please use `crypto.setFips()`
848849
and `crypto.getFips()` instead.
849850
850-
<a id="DEP0XX"></a>
851-
### DEP0XXX: Using `assert.fail()` with more than one argument.
851+
<a id="DEP0094"></a>
852+
### DEP0094: Using `assert.fail()` with more than one argument.
852853
853854
Type: Runtime
854855
855856
Using `assert.fail()` with more than one argument has no benefit over writing an
856857
individual error message. Either use `assert.fail()` with one argument or switch
857858
to one of the other assert methods.
858859
859-
<a id="DEP00XX"></a>
860-
### DEP00XX: timers.enroll()
860+
<a id="DEP0095"></a>
861+
### DEP0095: timers.enroll()
861862
862863
Type: Runtime
863864
864865
`timers.enroll()` is deprecated. Please use the publicly documented [`setTimeout()`][] or [`setInterval()`][] instead.
865866
866-
<a id="DEP00XX"></a>
867-
### DEP00XX: timers.unenroll()
867+
<a id="DEP0096"></a>
868+
### DEP0096: timers.unenroll()
868869
869870
Type: Runtime
870871

lib/assert.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function fail(actual, expected, message, operator, stackStartFn) {
8989
'assert.fail() with more than one argument is deprecated. ' +
9090
'Please use assert.strictEqual() instead or only pass a message.',
9191
'DeprecationWarning',
92-
'DEP00XXX'
92+
'DEP0094'
9393
);
9494
}
9595
if (argsLen === 2)

lib/timers.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ function unenroll(item) {
358358
exports.unenroll = util.deprecate(unenroll,
359359
'timers.unenroll() is deprecated. ' +
360360
'Please use clearTimeout instead.',
361-
'DEP00XX');
361+
'DEP0096');
362362

363363

364364
// Make a regular object able to act as a timer by setting some properties.
@@ -375,9 +375,9 @@ function enroll(item, msecs) {
375375
}
376376

377377
exports.enroll = util.deprecate(enroll,
378-
'timers.unenroll() is deprecated. ' +
378+
'timers.enroll() is deprecated. ' +
379379
'Please use clearTimeout instead.',
380-
'DEP00XX');
380+
'DEP0095');
381381

382382

383383
/*

test/parallel/test-timers-max-duration-warning.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ process.on('warning', common.mustCall((warning) => {
1919
assert.strictEqual(lines[0], `${OVERFLOW} does not fit into a 32-bit signed` +
2020
' integer.');
2121
assert.strictEqual(lines.length, 2);
22-
}, 4));
22+
}, 5));
2323

2424

2525
{

0 commit comments

Comments
 (0)