From b3f9871df4ed8bf97d0702c681b42176ea8c2d62 Mon Sep 17 00:00:00 2001 From: Ben Vinegar Date: Wed, 27 Jul 2016 14:41:08 -0700 Subject: [PATCH] Update react-native default pathStrip regex (fixes #665) --- plugins/react-native.js | 5 ++++- test/plugins/react-native.test.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/react-native.js b/plugins/react-native.js index 4db0644cd512..3536080cabad 100644 --- a/plugins/react-native.js +++ b/plugins/react-native.js @@ -15,7 +15,10 @@ */ 'use strict'; -var PATH_STRIP_RE = /^\/var\/mobile\/Containers\/Bundle\/Application\/[^\/]+\/[^\.]+\.app/; +// Example React Native path format (iOS): +// /var/containers/Bundle/Application/{DEVICE_ID}/HelloWorld.app/main.jsbundle + +var PATH_STRIP_RE = /^.*\/[^\.]+\.app/; /** * Strip device-specific IDs from React Native file:// paths diff --git a/test/plugins/react-native.test.js b/test/plugins/react-native.test.js index 62a205bb8f1f..a0d760a63efc 100644 --- a/test/plugins/react-native.test.js +++ b/test/plugins/react-native.test.js @@ -24,7 +24,7 @@ describe('React Native plugin', function () { values: [{ stacktrace: { frames: [{ - filename: 'file:///var/mobile/Containers/Bundle/Application/ABC/123.app/file1.js', + filename: 'file:///var/containers/Bundle/Application/ABC/123.app/file1.js', lineno: 10, colno: 11, 'function': 'broken'