util: do not mark experimental feature as deprecated

PR-URL: https://github.com/nodejs/node/pull/55740
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
This commit is contained in:
Antoine du Hamel authored and Ruy Adorno committed 2024-11-27 11:03:38 -05:00
1 parent f11d93d8ef
commit fce8c32c19
5 files changed
+12 -18

No files matched your search

+3 -1
View File
@@ -105,7 +105,9 @@ function getDeprecationWarningEmitter(
return function() {
if (!warned && shouldEmitWarning()) {
warned = true;
if (code !== undefined) {
if (code === 'ExperimentalWarning') {
process.emitWarning(msg, code, deprecated);
} else if (code !== undefined) {
if (!codesWarned.has(code)) {
const emitWarning = useEmitSync ?
require('internal/process/warning').emitWarningSync :
+2 -2
View File
@@ -502,8 +502,8 @@ module.exports = {
// Deprecated getCallSite.
// This API can be removed in next semver-minor release.
getCallSite: deprecate(getCallSites,
'The `util.getCallSite` API is deprecated. Please use `util.getCallSites()` instead.',
'DEP0186'),
'The `util.getCallSite` API has been renamed to `util.getCallSites()`.',
'ExperimentalWarning'),
getCallSites,
getSystemErrorMap,
getSystemErrorName,