From 1c663d4abd5eb2e3271a8190b3b621db2eb7a318 Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Tue, 31 Oct 2023 15:37:19 +0200 Subject: [PATCH] doc: add migration paths --- doc/api/deprecations.md | 45 +++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 37310b78e4df07..ccf2cd06a1cba7 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -1005,7 +1005,8 @@ changes: Type: Runtime -The [`util.isBoolean()`][] API is deprecated. +The [`util.isBoolean()`][] API is deprecated. Please use +`typeof arg === 'boolean'` instead. ### DEP0046: `util.isBuffer()` @@ -1052,7 +1053,8 @@ changes: Type: Runtime -The [`util.isDate()`][] API is deprecated. +The [`util.isDate()`][] API is deprecated. Please use +`arg instanceof Date` instead. ### DEP0048: `util.isError()` @@ -1075,7 +1077,8 @@ changes: Type: Runtime -The [`util.isError()`][] API is deprecated. +The [`util.isError()`][] API is deprecated. Please use +`arg instanceof Error` instead. ### DEP0049: `util.isFunction()` @@ -1098,7 +1101,8 @@ changes: Type: Runtime -The [`util.isFunction()`][] API is deprecated. +The [`util.isFunction()`][] API is deprecated. Please use +`typeof arg === 'function'` instead. ### DEP0050: `util.isNull()` @@ -1121,7 +1125,8 @@ changes: Type: Runtime -The [`util.isNull()`][] API is deprecated. +The [`util.isNull()`][] API is deprecated. Please use +`arg === null` instead. ### DEP0051: `util.isNullOrUndefined()` @@ -1144,7 +1149,8 @@ changes: Type: Runtime -The [`util.isNullOrUndefined()`][] API is deprecated. +The [`util.isNullOrUndefined()`][] API is deprecated. Please use +`arg === null || arg === undefined` instead. ### DEP0052: `util.isNumber()` @@ -1167,7 +1173,8 @@ changes: Type: Runtime -The [`util.isNumber()`][] API is deprecated. +The [`util.isNumber()`][] API is deprecated. Please use +`typeof arg === 'number'` instead. ### DEP0053: `util.isObject()` @@ -1190,7 +1197,8 @@ changes: Type: Runtime -The [`util.isObject()`][] API is deprecated. +The [`util.isObject()`][] API is deprecated. Please use +`typeof arg === 'object'` instead. ### DEP0054: `util.isPrimitive()` @@ -1213,7 +1221,8 @@ changes: Type: Runtime -The [`util.isPrimitive()`][] API is deprecated. +The [`util.isPrimitive()`][] API is deprecated. Please use +`typeof arg !== 'object' && typeof arg !== 'function'` instead. ### DEP0055: `util.isRegExp()` @@ -1236,7 +1245,8 @@ changes: Type: Runtime -The [`util.isRegExp()`][] API is deprecated. +The [`util.isRegExp()`][] API is deprecated. Please use +`arg instanceof RegExp` instead. ### DEP0056: `util.isString()` @@ -1259,7 +1269,8 @@ changes: Type: Runtime -The [`util.isString()`][] API is deprecated. +The [`util.isString()`][] API is deprecated. Please use +`typeof arg === 'string'` instead. ### DEP0057: `util.isSymbol()` @@ -1282,7 +1293,8 @@ changes: Type: Runtime -The [`util.isSymbol()`][] API is deprecated. +The [`util.isSymbol()`][] API is deprecated. Please use +`typeof arg === 'symbol'` instead. ### DEP0058: `util.isUndefined()` @@ -1305,7 +1317,8 @@ changes: Type: Runtime -The [`util.isUndefined()`][] API is deprecated. +The [`util.isUndefined()`][] API is deprecated. Please use +`arg === undefined` instead. ### DEP0059: `util.log()` @@ -1324,7 +1337,8 @@ changes: Type: Runtime -The [`util.log()`][] API is deprecated. +The [`util.log()`][] API is deprecated. Please use a userland +alternative instead. ### DEP0060: `util._extend()` @@ -1343,7 +1357,8 @@ changes: Type: Runtime -The [`util._extend()`][] API is deprecated. +The [`util._extend()`][] API is deprecated. Please use a userland +alternative instead. ### DEP0061: `fs.SyncWriteStream`