Skip to content

Commit aa103cd

Browse files
committed
test(react-native): fix internal dependencies for test fixture generation
1 parent b767939 commit aa103cd

1 file changed

Lines changed: 14 additions & 7 deletions

File tree

scripts/generate-react-native-fixture.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,19 @@ const fixtureDir = resolve(ROOT_DIR, fixturePath, reactNativeVersion)
3939
const replacementFilesDir = resolve(ROOT_DIR, 'test/react-native/features/fixtures/replacements/')
4040

4141
const INTERNAL_DEPENDENCIES = [
42-
'@bugsnag/react-native'
42+
'@bugsnag/react-native',
43+
'@bugsnag/core',
44+
'@bugsnag/delivery-react-native',
45+
'@bugsnag/plugin-console-breadcrumbs',
46+
'@bugsnag/plugin-network-breadcrumbs',
47+
'@bugsnag/plugin-react',
48+
'@bugsnag/plugin-react-native-client-sync',
49+
'@bugsnag/plugin-react-native-event-sync',
50+
'@bugsnag/plugin-react-native-global-error-handler',
51+
'@bugsnag/plugin-react-native-hermes',
52+
'@bugsnag/plugin-react-native-session',
53+
'@bugsnag/plugin-react-native-unhandled-rejection',
54+
'@bugsnag/derecursify'
4355
]
4456

4557
// make sure we install a compatible versions of peer dependencies
@@ -182,13 +194,8 @@ if (process.env.BUILD_IOS === 'true' || process.env.BUILD_IOS === '1') {
182194
}
183195

184196
function installFixtureDependencies () {
185-
// get the react native package plus all of it's dependencies
186-
const bugsnagReactNativePkg = JSON.parse(fs.readFileSync(`${ROOT_DIR}/packages/react-native/package.json`, 'utf8'))
187-
const bugsnagPackages = Object.keys(bugsnagReactNativePkg.dependencies)
188-
.filter(dep => dep.startsWith('@bugsnag/')).concat(INTERNAL_DEPENDENCIES)
189-
190197
// pack the bugsnag packages into the test fixture directory
191-
const workSpaceArgs = bugsnagPackages.map(dep => `--workspace=${dep}`)
198+
const workSpaceArgs = INTERNAL_DEPENDENCIES.map(dep => `--workspace=${dep}`)
192199
execFileSync('npm', ['pack', `--pack-destination=${fixtureDir}`, ...workSpaceArgs], { cwd: ROOT_DIR, stdio: 'inherit' })
193200

194201
// pack the scenario launcher

0 commit comments

Comments
 (0)