Skip to content

Commit e8fa026

Browse files
committed
fix: use React Native DevTools core dependency
Rely on React Native's bundled react-devtools-core instead of asking users to install and version it separately.
1 parent 5264a04 commit e8fa026

6 files changed

Lines changed: 7 additions & 10 deletions

File tree

.changeset/quiet-walls-connect.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44

55
Add React Native 0.87+ support through a Metro config wrapper and native
66
bootstrap entry. React Native apps now wrap their final Metro config and import
7-
`agent-react-devtools/react-native` from the application entry graph. Install
8-
`react-devtools-core@^6.1.5` to match React Native's DevTools backend.
7+
`agent-react-devtools/react-native` from the application entry graph.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ React Native 0.87 removed the legacy standalone React DevTools auto-connect
247247
path. Projects must now add the agent bootstrap to Metro explicitly:
248248

249249
```sh
250-
npm install --save-dev agent-react-devtools react-devtools-core@^6.1.5
250+
npm install --save-dev agent-react-devtools
251251
```
252252

253253
Both of the following steps are required.

examples/expo-app/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"devDependencies": {
2626
"@types/react": "~19.1.10",
2727
"agent-react-devtools": "workspace:*",
28-
"react-devtools-core": "^6.1.5",
2928
"typescript": "^5.5.0"
3029
}
3130
}

packages/agent-react-devtools/skills/react-devtools/references/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ React Native 0.87 removed the legacy standalone DevTools auto-connect path.
6363
The Metro wrapper and entry-graph import below are both mandatory.
6464

6565
```bash
66-
npm install --save-dev agent-react-devtools react-devtools-core@^6.1.5
66+
npm install --save-dev agent-react-devtools
6767
```
6868

6969
For bare React Native, wrap the final composed config:

packages/agent-react-devtools/src/__tests__/init.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ describe('runInit', () => {
217217

218218
const output = log.mock.calls.flat().join('\n');
219219
expect(output).toContain('React Native 0.87+ requires manual setup');
220-
expect(output).toContain('react-devtools-core@^6.1.5');
220+
expect(output).toContain('npm install -D agent-react-devtools');
221+
expect(output).not.toContain('react-devtools-core');
221222
expect(output).toContain('withAgentReactDevTools');
222223
expect(output).toContain("import 'agent-react-devtools/react-native'");
223224
expect(output).not.toContain('connect to DevTools automatically');

packages/agent-react-devtools/src/init.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,8 @@ export async function runInit(
364364
if (framework === 'react-native') {
365365
console.log('\nReact Native 0.87+ requires manual setup.');
366366
console.log('No files were changed by init.\n');
367-
console.log('1. Install compatible dependencies:');
368-
console.log(
369-
' npm install -D agent-react-devtools react-devtools-core@^6.1.5\n',
370-
);
367+
console.log('1. Install agent-react-devtools:');
368+
console.log(' npm install -D agent-react-devtools\n');
371369
console.log('2. Wrap your final Metro config:');
372370
console.log(
373371
" const { withAgentReactDevTools } = require('agent-react-devtools/metro');",

0 commit comments

Comments
 (0)