-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Instrument based on source map paths
- Loading branch information
1 parent
780a572
commit e059fa0
Showing
15 changed files
with
1,018 additions
and
40 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`mapping a bundled script 1`] = ` | ||
{ | ||
"classMap": [ | ||
{ | ||
"children": [ | ||
{ | ||
"children": [ | ||
{ | ||
"location": "original.mjs:3", | ||
"name": "foo", | ||
"static": true, | ||
"type": "function", | ||
}, | ||
], | ||
"name": "original", | ||
"type": "class", | ||
}, | ||
], | ||
"name": "appmap-node", | ||
"type": "package", | ||
}, | ||
], | ||
"events": [ | ||
{ | ||
"defined_class": "original", | ||
"event": "call", | ||
"id": 1, | ||
"lineno": 3, | ||
"method_id": "foo", | ||
"parameters": [ | ||
{ | ||
"class": "String", | ||
"name": "msg", | ||
"value": "'hello'", | ||
}, | ||
], | ||
"path": "original.mjs", | ||
"static": true, | ||
"thread_id": 0, | ||
}, | ||
{ | ||
"elapsed": 31.337, | ||
"event": "return", | ||
"id": 2, | ||
"parent_id": 1, | ||
"thread_id": 0, | ||
}, | ||
], | ||
"metadata": { | ||
"app": "appmap-node", | ||
"client": { | ||
"name": "appmap-node", | ||
"url": "https://github.com/getappmap/appmap-node", | ||
"version": "test node-appmap version", | ||
}, | ||
"language": { | ||
"engine": "Node.js", | ||
"name": "javascript", | ||
"version": "test node version", | ||
}, | ||
"name": "test process recording", | ||
"recorder": { | ||
"name": "process", | ||
"type": "process", | ||
}, | ||
}, | ||
"version": "1.12", | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { integrationTest, readAppmap, runAppmapNode } from "./helpers"; | ||
|
||
integrationTest("mapping a bundled script", () => { | ||
expect(runAppmapNode("./built/index.js").status).toBe(0); | ||
expect(readAppmap()).toMatchSnapshot(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
To recreate index.js & index.js.map: | ||
|
||
``` | ||
$ yarn esbuild original.mjs --bundle --platform=node --sourcemap --outfile=built/index.js | ||
``` |
Oops, something went wrong.