Skip to content

Commit b3f9871

Browse files
committed
Update react-native default pathStrip regex (fixes #665)
1 parent 265cc07 commit b3f9871

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

plugins/react-native.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
*/
1616
'use strict';
1717

18-
var PATH_STRIP_RE = /^\/var\/mobile\/Containers\/Bundle\/Application\/[^\/]+\/[^\.]+\.app/;
18+
// Example React Native path format (iOS):
19+
// /var/containers/Bundle/Application/{DEVICE_ID}/HelloWorld.app/main.jsbundle
20+
21+
var PATH_STRIP_RE = /^.*\/[^\.]+\.app/;
1922

2023
/**
2124
* Strip device-specific IDs from React Native file:// paths

test/plugins/react-native.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('React Native plugin', function () {
2424
values: [{
2525
stacktrace: {
2626
frames: [{
27-
filename: 'file:///var/mobile/Containers/Bundle/Application/ABC/123.app/file1.js',
27+
filename: 'file:///var/containers/Bundle/Application/ABC/123.app/file1.js',
2828
lineno: 10,
2929
colno: 11,
3030
'function': 'broken'

0 commit comments

Comments
 (0)