stacktracey 2.1.4 → 2.1.8
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/README.md +1 -1
- package/package.json +2 -2
- package/stacktracey.d.ts +1 -1
- package/stacktracey.js +3 -2
- package/test.js +17 -0
package/README.md
CHANGED
|
@@ -153,7 +153,7 @@ You can override the `isThirdParty` behavior by subclassing `StackTracey`:
|
|
|
153
153
|
```javascript
|
|
154
154
|
class MyStackTracey extends StackTracey {
|
|
155
155
|
|
|
156
|
-
isThirdParty (path) {
|
|
156
|
+
isThirdParty (path, externalDomain) { // you can use externalDomain to include traces from libs from other domains
|
|
157
157
|
return (super.isThirdParty (path) // include default behavior
|
|
158
158
|
|| path.includes ('my-lib')) // paths including 'my-lib' will be marked as thirdParty
|
|
159
159
|
&& !path.includes ('jquery') // jquery paths won't be marked as thirdParty
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stacktracey",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.8",
|
|
4
4
|
"description": "Parses call stacks. Reads sources. Clean & filtered output. Sourcemaps. Node & browsers.",
|
|
5
5
|
"main": "stacktracey",
|
|
6
6
|
"types": "./stacktracey.d.ts",
|
|
@@ -82,6 +82,6 @@
|
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
84
|
"as-table": "^1.0.36",
|
|
85
|
-
"get-source": "^2.0.
|
|
85
|
+
"get-source": "^2.0.12"
|
|
86
86
|
}
|
|
87
87
|
}
|
package/stacktracey.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ declare class StackTracey {
|
|
|
39
39
|
maxColumnWidths (): StackTracey.MaxColumnWidths
|
|
40
40
|
|
|
41
41
|
static resetCache (): void
|
|
42
|
-
static locationsEqual (a: Location, b: Location): boolean
|
|
42
|
+
static locationsEqual (a: StackTracey.Location, b: StackTracey.Location): boolean
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
declare namespace StackTracey {
|
package/stacktracey.js
CHANGED
|
@@ -134,9 +134,10 @@ class StackTracey {
|
|
|
134
134
|
|
|
135
135
|
callee = planA[1]
|
|
136
136
|
native = (planA[2] === 'native')
|
|
137
|
-
fileLineColumn = (planA[2].match (/(.*):(
|
|
137
|
+
fileLineColumn = (planA[2].match (/(.*):(\d+):(\d+)/) ||
|
|
138
|
+
planA[2].match (/(.*):(\d+)/) || []).slice (1)
|
|
138
139
|
|
|
139
|
-
} else if ((planB = line.match (/^(at\s+)*(.+):(
|
|
140
|
+
} else if ((planB = line.match (/^(at\s+)*(.+):(\d+):(\d+)/) )) {
|
|
140
141
|
fileLineColumn = (planB).slice (2)
|
|
141
142
|
|
|
142
143
|
} else {
|
package/test.js
CHANGED
|
@@ -333,6 +333,23 @@ describe ('StackTracey', () => {
|
|
|
333
333
|
|
|
334
334
|
items[1].fileRelative.should.equal('hohoho/test.js')
|
|
335
335
|
})
|
|
336
|
+
|
|
337
|
+
it ('recognizes locations without column', () => {
|
|
338
|
+
const stack = [
|
|
339
|
+
'Error',
|
|
340
|
+
' at ValidateCompatibilityWithBindGroupLayout (../../third_party/dawn/src/dawn_native/ShaderModule.cpp:395)',
|
|
341
|
+
].join ('\n')
|
|
342
|
+
|
|
343
|
+
const items = new StackTracey(stack).items
|
|
344
|
+
|
|
345
|
+
items[0].should.contain({
|
|
346
|
+
callee: 'ValidateCompatibilityWithBindGroupLayout',
|
|
347
|
+
calleeShort: 'ValidateCompatibilityWithBindGroupLayout',
|
|
348
|
+
fileRelative: '../../third_party/dawn/src/dawn_native/ShaderModule.cpp',
|
|
349
|
+
fileShort: '../../third_party/dawn/src/dawn_native/ShaderModule.cpp',
|
|
350
|
+
fileName: 'ShaderModule.cpp'
|
|
351
|
+
})
|
|
352
|
+
})
|
|
336
353
|
})
|
|
337
354
|
|
|
338
355
|
|