intel
intel copied to clipboard
Update error check to avoid deprecation warning in NodeJS 22
Using NodeJS 22 you get a deprecation warning like this:
(node:12388) [DEP0048] DeprecationWarning: The `util.isError` API is deprecated. Please use `ObjectPrototypeToString(e) === "[object Error]" || e instanceof Error` instead.
Hi @seanmonstar I'm a long time user of intel, it has worked great throughout the years, so many thanks for the project! With NodeJS 22 there's a new deprecation warnings that comes when you use intel. Would be great if this could be fixed and released :)
I realize that node's documentation suggests https://nodejs.org/docs/latest-v22.x/api/util.html#utiltypesisnativeerrorvalue util.types.isNativeError, it seems supported since node V10, so it might be a more readable option ?