Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2523,14 +2523,18 @@ Prefer [`response.socket`][] over [`response.connection`][] and
### DEP0134: process._tickCallback
<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/29671
description: Runtime deprecation.
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/29781
description: Documentation-only deprecation.
-->
Type: Documentation-only (supports [`--pending-deprecation`][])
Type: Runtime

The `process._tickCallback` property was never documented as
an officially supported API.
an officially supported API. Please use `process.runNextTicks`
instead.

[`--pending-deprecation`]: cli.html#cli_pending_deprecation
[`--throw-deprecation`]: cli.html#cli_throw_deprecation
Expand Down
11 changes: 7 additions & 4 deletions lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,13 @@ process.emitWarning = emitWarning;
const { nextTick, runNextTicks } = setupTaskQueue();
process.nextTick = nextTick;
// Used to emulate a tick manually in the JS land.
// A better name for this function would be `runNextTicks` but
// it has been exposed to the process object so we keep this legacy name
// TODO(joyeecheung): either remove it or make it public
process._tickCallback = runNextTicks;
process.runNextTicks = runNextTicks;
process._tickCallback = deprecate(
runNextTicks,
'process._tickCallback is deprecated. ' +
'Please use `process.runNextTicks` instead.',
'DEP0134');


const { getTimerCallbacks } = require('internal/timers');
const { setupTimers } = internalBinding('timers');
Expand Down
4 changes: 0 additions & 4 deletions lib/internal/bootstrap/pre_execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,6 @@ function initializeDeprecations() {
process.binding = deprecate(process.binding,
'process.binding() is deprecated. ' +
'Please use public APIs instead.', 'DEP0111');

process._tickCallback = deprecate(process._tickCallback,
'process._tickCallback() is deprecated',
'DEP0134');
}

// Create global.process and global.Buffer as getters so that we have a
Expand Down