TraceKit
TraceKit copied to clipboard
Electron Regex Fix
Hi, the current regex for chrome is
/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|webpack|eval).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i
However Ive noticed in Electron apps at least, theres no guarantee of a file:// prefix. ie Filenames for me are listed as.
/User/Emmet/......
as opposed to
file://User/Emmet/......
Ive changed the regex to
/^\s*at (.*?) ?\(((?:file|https?|\s*|blob|chrome-extension|native|webpack|eval).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i
And now Tracekit is working within Electron.
If any more information is required, let me know.
Thanks, Emmet
Hey, could you please submit a pr with an added unit test for this scenario. That would be a huge help