@@ -1162,20 +1162,23 @@ added:
11621162 - v19.9.0
11631163 - v18.19.0
11641164changes:
1165+ - version: v26.5.0
1166+ pr-url: https://github.com/nodejs/node/pull/62407
1167+ description: Non-native-Promise thenables are now returned as-is,
1168+ preserving their original type and methods.
11651169 - version: v26.0.0
11661170 pr-url: https://github.com/nodejs/node/pull/61766
1167- description: Custom thenables will no longer be wrapped in native Promises.
1168- Non-thenables will be returned with a warning.
1171+ description: Non-thenables will be returned with a warning.
11691172-->
11701173
11711174* ` fn ` {Function} Function to wrap a trace around
11721175* ` context ` {Object} Shared object to correlate trace events through
11731176* ` thisArg ` {any} The receiver to be used for the function call
11741177* ` ...args ` {any} Optional arguments to pass to the function
1175- * Returns: {any} The return value of the given function, or the result of
1176- calling ` .then(...) ` on the return value if the tracing channel has active
1177- subscribers. If the return value is not a Promise or thenable, then
1178- it is returned as-is and a warning is emitted.
1178+ * Returns: {any} The return value of the given function. If the return value
1179+ is a Promise or thenable, tracing events will be published when it settles.
1180+ If the return value is not a Promise or thenable, it is returned as-is and
1181+ a warning is emitted.
11791182
11801183Trace an asynchronous function call which returns a {Promise} or
11811184[ thenable object] [ ] . This will always produce a [ ` start ` event] [ ] and
0 commit comments