Skip to content

feat: handle util.types.isNativeError() depreciation #113

@AugustinMauroy

Description

@AugustinMauroy

Description

Since util.types.isNativeError() is deprecated in Node.js v24.2.0, we should provide a codemod to replace it.

  • The codemod should remove import if it's only thing imported or remove the member if not anymore used.
  • The codemod should modify any call expression of this api.

Examples

Before:

import { types } from 'node:util';


if (types.isNativeError(err)) {
  // handle the error
}

After:

if (Error.isError(err)) {
  // handle the error
}

REFS

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    🏗 In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions