You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-18Lines changed: 23 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,16 +11,16 @@
11
11
</a>
12
12
</div>
13
13
14
-
# 🥞 stack-converter
15
-
`stack-converter` is a utility for translating function names, file names and line numbers in uglified JavaScript Error stack frames to the corresponding values in the original source. `stack-converter` is distributed as both a package and a library and is used by the [BugSplat](https://www.bugsplat.com) backend to deliver crash reporting as a service for JavaScript and TypeScript applications.
14
+
# 🗺️ source-mapper
15
+
`source-mapper` is a utility for translating function names, file names and line numbers in uglified JavaScript Error stack frames to the corresponding values in the original source. `source-mapper` is distributed as both a package and a library and is used by the [BugSplat](https://www.bugsplat.com) backend to deliver crash reporting as a service for JavaScript and TypeScript applications.
16
16
17
-
The following is an example JavaScript Error stack converted to its TypeScript equivalent using `stack-converter`:
17
+
The following is an example JavaScript Error stack converted to its TypeScript equivalent using `source-mapper`:
18
18
19
19
```
20
20
Error: BugSplat rocks!
21
-
at crash (/Users/bobby/Desktop/bugsplat/stack-converter/dist/bin/cmd.js:16:11)
22
-
at /Users/bobby/Desktop/bugsplat/stack-converter/dist/bin/cmd.js:6:9
23
-
at Object.<anonymous> (/Users/bobby/Desktop/bugsplat/stack-converter/dist/bin/cmd.js:14:3)
21
+
at crash (/Users/bobby/Desktop/bugsplat/source-mapper/dist/bin/cmd.js:16:11)
22
+
at /Users/bobby/Desktop/bugsplat/source-mapper/dist/bin/cmd.js:6:9
23
+
at Object.<anonymous> (/Users/bobby/Desktop/bugsplat/source-mapper/dist/bin/cmd.js:14:3)
24
24
```
25
25
26
26
```
@@ -31,49 +31,54 @@ Error: BugSplat rocks!
31
31
```
32
32
33
33
## 🖥 Command Line
34
+
<<<<<<< HEAD
34
35
35
36
1. Install this package globally `npm i -g @bugsplat/stack-converter`
36
37
2. Run `stack-converter -h` to see the latest usage information:
37
38
39
+
=======
40
+
1. Install this package globally `npm i -g @bugsplat/source-mapper`
41
+
2. Run `source-mapper -h` to see the latest usage information:
42
+
>>>>>>> 0431171 (chore: rename to source-mapper)
38
43
```bash
39
-
bobby@BugSplat % ~ % stack-converter -h
44
+
bobby@BugSplat % ~ % source-mapper -h
40
45
41
-
@bugsplat/stack-converter contains a command line utility and set of libraries to help you demangle JavaScript stack frames.
46
+
@bugsplat/source-mapper contains a command line utility and set of libraries to help you demangle JavaScript stack frames.
* Optionally provide either a path to a directory containing source maps or a .map.js file - Defaults to the current directory
48
53
* Optionally provide a path to a .txt file containing a JavaScript Error stack trace - Defaults to the value in the clipboard
49
54
50
55
❤️ support@bugsplat.com
51
56
```
52
57
53
-
3. Run `stack-converter` and optionally specify a path to a directory containing .js.map files, path to a single .js.map file, and a path to a .txt file containing a stringified JavaScript Error. If no options are provided `stack-converter` will default to looking in the current directory for source maps and attempt to read the stringified JavaScript error stack from the system clipboard.
58
+
3. Run `source-mapper` and optionally specify a path to a directory containing .js.map files, path to a single .js.map file, and a path to a .txt file containing a stringified JavaScript Error. If no options are provided `source-mapper` will default to looking in the current directory for source maps and attempt to read the stringified JavaScript error stack from the system clipboard.
54
59
55
60
## 🧩 API
56
61
57
-
1. Install this package locally `npm i @bugsplat/stack-converter`
58
-
2. Import `StackConverter` from `@bugsplat/stack-converter`
62
+
1. Install this package locally `npm i @bugsplat/source-mapper`
63
+
2. Import `SourceMapper` from `@bugsplat/source-mapper`
3. Create a new instance of `StackConverter` passing it an array of paths to source map files. You can also await the static factory function `createFromDirectory(directory: string): Promise<StackConverter>` which takes a path to a directory and creates a new StackConverter with an array of source map file paths it finds in the specified directory
69
+
3. Create a new instance of `SourceMapper` passing it an array of paths to source map files. You can also await the static factory function `createFromDirectory(directory: string): Promise<SourceMapper>` which takes a path to a directory and creates a new SourceMapper with an array of source map file paths it finds in the specified directory
0 commit comments