File tree 3 files changed +9
-3
lines changed
3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
- import { isNativeError } from 'node:util/types ' ;
1
+ import { types } from 'node:util' ;
2
2
3
3
import { $type } from './symbols' ;
4
4
@@ -9,6 +9,8 @@ import type {
9
9
Range
10
10
} from './index' ;
11
11
12
+ const { isNativeError } = types ;
13
+
12
14
/**
13
15
* A collection of possible errors and warnings.
14
16
*/
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import assert from 'node:assert';
3
3
import path from 'node:path' ;
4
4
import fs from 'node:fs' ;
5
5
import { EOL } from 'node:os' ;
6
- import { isNativeError } from 'node:util/types ' ;
6
+ import { types } from 'node:util' ;
7
7
import mergeWith from 'lodash.mergewith' ;
8
8
import stripIndent from 'strip-indent' ;
9
9
import { createContext , Script } from 'node:vm' ;
@@ -32,6 +32,8 @@ import type {
32
32
33
33
import type { Class } from 'type-fest' ;
34
34
35
+ const { isNativeError } = types ;
36
+
35
37
const parseErrorStackRegExp =
36
38
/ a t (?: (?< fn > \S + ) ) ? (?: .* ? ) ? \( ? (?< path > (?: \/ | f i l e : | \w : \\ ) .* ?) (?: \) | $ ) / i;
37
39
Original file line number Diff line number Diff line change 1
1
import fs from 'node:fs' ;
2
2
import path from 'node:path' ;
3
3
import { type AssertionError } from 'node:assert' ;
4
- import { isNativeError } from 'node:util/types ' ;
4
+ import { types } from 'node:util' ;
5
5
6
6
import { pluginTester } from '../../src/plugin-tester' ;
7
7
@@ -11,6 +11,8 @@ import type {
11
11
PluginTesterOptions
12
12
} from '../../src/index' ;
13
13
14
+ const { isNativeError } = types ;
15
+
14
16
const dummyDoneCallback : jest . DoneCallback = ( ) => {
15
17
throw new Error ( 'unexpected callback invocation' ) ;
16
18
} ;
You can’t perform that action at this time.
0 commit comments