File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { isNativeError } from 'node:util/types ' ;
1+ import { types } from 'node:util' ;
22
33import { $type } from './symbols' ;
44
@@ -9,6 +9,8 @@ import type {
99 Range
1010} from './index' ;
1111
12+ const { isNativeError } = types ;
13+
1214/**
1315 * A collection of possible errors and warnings.
1416 */
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import assert from 'node:assert';
33import path from 'node:path' ;
44import fs from 'node:fs' ;
55import { EOL } from 'node:os' ;
6- import { isNativeError } from 'node:util/types ' ;
6+ import { types } from 'node:util' ;
77import mergeWith from 'lodash.mergewith' ;
88import stripIndent from 'strip-indent' ;
99import { createContext , Script } from 'node:vm' ;
@@ -32,6 +32,8 @@ import type {
3232
3333import type { Class } from 'type-fest' ;
3434
35+ const { isNativeError } = types ;
36+
3537const parseErrorStackRegExp =
3638 / a t (?: (?< fn > \S + ) ) ? (?: .* ? ) ? \( ? (?< path > (?: \/ | f i l e : | \w : \\ ) .* ?) (?: \) | $ ) / i;
3739
Original file line number Diff line number Diff line change 11import fs from 'node:fs' ;
22import path from 'node:path' ;
33import { type AssertionError } from 'node:assert' ;
4- import { isNativeError } from 'node:util/types ' ;
4+ import { types } from 'node:util' ;
55
66import { pluginTester } from '../../src/plugin-tester' ;
77
@@ -11,6 +11,8 @@ import type {
1111 PluginTesterOptions
1212} from '../../src/index' ;
1313
14+ const { isNativeError } = types ;
15+
1416const dummyDoneCallback : jest . DoneCallback = ( ) => {
1517 throw new Error ( 'unexpected callback invocation' ) ;
1618} ;
You can’t perform that action at this time.
0 commit comments