File tree 1 file changed +3
-2
lines changed
packages/core/src/lib/callstack
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ const initInfo: CallerInfo = {
35
35
const nodeVersion = semver . coerce ( process . version )
36
36
const isNodeGteV20 = nodeVersion ? semver . gte ( nodeVersion , '20.0.0' ) : false
37
37
const isNodeGteV22 = nodeVersion ? semver . gte ( nodeVersion , '22.9.0' ) : false
38
+ const isNodeGteV22_12 = nodeVersion ? semver . gte ( nodeVersion , '22.12.0' ) : false
38
39
const isNodeGteV23 = nodeVersion ? semver . gte ( nodeVersion , '23.3.0' ) : false
39
40
40
41
/**
@@ -201,8 +202,8 @@ function getCallSiteNative(distance: number, sourceMap: boolean): CallerInfo {
201
202
const ret : CallerInfo = {
202
203
...initInfo ,
203
204
}
204
- const depth2 = isNodeGteV23 ? depth + 2 : depth + 1
205
- const depth3 = isNodeGteV23 ? depth + 1 : depth
205
+ const depth2 = isNodeGteV23 || isNodeGteV22_12 ? depth + 2 : depth + 1
206
+ const depth3 = isNodeGteV23 || isNodeGteV22_12 ? depth + 1 : depth
206
207
207
208
// @ts -ignore
208
209
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
You can’t perform that action at this time.
0 commit comments