Skip to content

Commit

Permalink
domain: eol deprecate process.assert
Browse files Browse the repository at this point in the history
  • Loading branch information
RedYetiDev committed Sep 20, 2024
1 parent 8b8fc53 commit f855179
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 36 deletions.
5 changes: 4 additions & 1 deletion doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2142,14 +2142,17 @@ parameter.

<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/55035
description: End-of-Life.
- version: v10.0.0
pr-url: https://github.com/nodejs/node/pull/18666
description: Runtime deprecation.
- version: v0.3.7
description: Documentation-only deprecation.
-->

Type: Runtime
Type: End-of-Life

`process.assert()` is deprecated. Please use the [`assert`][] module instead.

Expand Down
6 changes: 0 additions & 6 deletions lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,6 @@ ObjectDefineProperty(process, 'allowedNodeEnvironmentFlags', {
configurable: true,
});

// process.assert
process.assert = deprecate(
perThreadSetup.assert,
'process.assert() is deprecated. Please use the `assert` module instead.',
'DEP0100');

// TODO(joyeecheung): this property has not been well-maintained, should we
// deprecate it in favor of a better API?
const { isDebugBuild, hasOpenSSL, hasInspector } = config;
Expand Down
4 changes: 0 additions & 4 deletions lib/internal/process/per_thread.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ let getValidatedPath; // We need to lazy load it because of the circular depende

const kInternal = Symbol('internal properties');

function assert(x, msg) {
if (!x) throw new ERR_ASSERTION(msg || 'assertion error');
}
const { exitCodes: { kNoFailure } } = internalBinding('errors');

const binding = internalBinding('process_methods');
Expand Down Expand Up @@ -428,7 +425,6 @@ const { arch, platform, version } = process;

module.exports = {
toggleTraceCategoryState,
assert,
buildAllowedFlags,
wrapProcessMethods,
hrtime,
Expand Down
25 changes: 0 additions & 25 deletions test/parallel/test-process-assert.js

This file was deleted.

0 comments on commit f855179

Please sign in to comment.