Skip to content

Commit 84499e2

Browse files
vzaidmanfacebook-github-bot
authored andcommitted
Scope INTERNAL_CALLSITES_REGEX to the react-native package
Summary: The `INTERNAL_CALLSITES_REGEX` entries like `/Libraries/Core/.+\.js$` match any path containing that substring, including unrelated packages that happen to have a `Libraries/` directory. Prefixing them with `/react-native/` is always correct: these files ship inside the `react-native` package, so they appear either as `.../packages/react-native/Libraries/...` in the monorepo or as `.../node_modules/react-native/Libraries/...` in installs. Unrelated third-party frames are no longer collapsed as internal. Changelog: [General][Fixed] - Scope Metro `INTERNAL_CALLSITES_REGEX` to the `react-native` package to avoid collapsing unrelated frames Differential Revision: D120179017
1 parent a9307d8 commit 84499e2

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

packages/metro-config/src/index.flow.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ export type {MetroConfig} from 'metro-config';
1616

1717
const INTERNAL_CALLSITES_REGEX = new RegExp(
1818
[
19-
'/Libraries/BatchedBridge/MessageQueue\\.js$',
20-
'/Libraries/Core/.+\\.js$',
21-
'/Libraries/LogBox/.+\\.js$',
22-
'/Libraries/Network/.+\\.js$',
23-
'/Libraries/Pressability/.+\\.js$',
24-
'/Libraries/Renderer/implementations/.+\\.js$',
25-
'/Libraries/Utilities/.+\\.js$',
26-
'/Libraries/vendor/.+\\.js$',
27-
'/Libraries/WebSocket/.+\\.js$',
28-
'/src/private/renderer/errorhandling/.+\\.js$',
19+
'/react-native/Libraries/BatchedBridge/MessageQueue\\.js$',
20+
'/react-native/Libraries/Core/.+\\.js$',
21+
'/react-native/Libraries/LogBox/.+\\.js$',
22+
'/react-native/Libraries/Network/.+\\.js$',
23+
'/react-native/Libraries/Pressability/.+\\.js$',
24+
'/react-native/Libraries/Renderer/implementations/.+\\.js$',
25+
'/react-native/Libraries/Utilities/.+\\.js$',
26+
'/react-native/Libraries/vendor/.+\\.js$',
27+
'/react-native/Libraries/WebSocket/.+\\.js$',
28+
'/react-native/src/private/renderer/errorhandling/.+\\.js$',
2929
'/metro-runtime/.+\\.js$',
3030
'/node_modules/@babel/runtime/.+\\.js$',
3131
'/node_modules/@react-native/js-polyfills/.+\\.js$',

0 commit comments

Comments
 (0)