@putout/printer 18.50.5 → 18.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ChangeLog
CHANGED
|
@@ -2,7 +2,7 @@ import {env as _env} from 'node:process';
|
|
|
2
2
|
|
|
3
3
|
const STACK_INDEX = 3;
|
|
4
4
|
|
|
5
|
-
const parseCallLocation = ({stack}) => stack.split('\n')[
|
|
5
|
+
const parseCallLocation = ({stack}, stackIndex) => stack.split('\n')[stackIndex];
|
|
6
6
|
|
|
7
7
|
const Coverage = new Map();
|
|
8
8
|
|
|
@@ -11,10 +11,11 @@ export const instrument = (typeNames, fn, overrides = {}) => {
|
|
|
11
11
|
env = _env,
|
|
12
12
|
coverage = Coverage,
|
|
13
13
|
instrumentName = 'TYPE_CHECK',
|
|
14
|
+
stackIndex = STACK_INDEX,
|
|
14
15
|
} = overrides;
|
|
15
16
|
|
|
16
17
|
const error = Error();
|
|
17
|
-
const location = parseCallLocation(error);
|
|
18
|
+
const location = parseCallLocation(error, stackIndex);
|
|
18
19
|
const on = env[instrumentName];
|
|
19
20
|
const covered = new Set();
|
|
20
21
|
|
package/package.json
CHANGED