Cleanup unused stuff
(cherry picked from commit eba391fd72e81090a5ceafbeee9fb76518f99bd5) (cherry picked from commit 70d4300be35246ce09798f77508a37e245b321a2)
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
jest.mock('sentry-expo', () => ({
|
|
||||||
init: () => jest.fn(),
|
|
||||||
}))
|
|
||||||
@@ -70,17 +70,6 @@ jest.mock('lande', () => ({
|
|||||||
default: jest.fn().mockReturnValue([['eng']]),
|
default: jest.fn().mockReturnValue([['eng']]),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
jest.mock('sentry-expo', () => ({
|
|
||||||
init: () => jest.fn(),
|
|
||||||
Native: {
|
|
||||||
ReactNativeTracing: jest.fn().mockImplementation(() => ({
|
|
||||||
start: jest.fn(),
|
|
||||||
stop: jest.fn(),
|
|
||||||
})),
|
|
||||||
ReactNavigationInstrumentation: jest.fn(),
|
|
||||||
},
|
|
||||||
}))
|
|
||||||
|
|
||||||
jest.mock('crypto', () => ({}))
|
jest.mock('crypto', () => ({}))
|
||||||
|
|
||||||
jest.mock('expo-application', () => ({
|
jest.mock('expo-application', () => ({
|
||||||
|
|||||||
+1
-1
@@ -294,7 +294,7 @@
|
|||||||
"\\.[jt]sx?$": "babel-jest"
|
"\\.[jt]sx?$": "babel-jest"
|
||||||
},
|
},
|
||||||
"transformIgnorePatterns": [
|
"transformIgnorePatterns": [
|
||||||
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|@discord|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|nanoid|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|normalize-url|react-native-svg|@sentry/.*|sentry-expo|bcp-47-match)"
|
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|@discord|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|nanoid|@react-navigation/.*|@unimodules/.*|unimodules|native-base|normalize-url|react-native-svg|@sentry/.*|bcp-47-match)"
|
||||||
],
|
],
|
||||||
"modulePathIgnorePatterns": [
|
"modulePathIgnorePatterns": [
|
||||||
"__tests__/.*/__mocks__",
|
"__tests__/.*/__mocks__",
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
diff --git a/node_modules/@sentry/react-native/dist/js/utils/ignorerequirecyclelogs.js b/node_modules/@sentry/react-native/dist/js/utils/ignorerequirecyclelogs.js
|
|
||||||
index 7e0b4cd..177454c 100644
|
|
||||||
--- a/node_modules/@sentry/react-native/dist/js/utils/ignorerequirecyclelogs.js
|
|
||||||
+++ b/node_modules/@sentry/react-native/dist/js/utils/ignorerequirecyclelogs.js
|
|
||||||
@@ -3,6 +3,8 @@ import { LogBox } from 'react-native';
|
|
||||||
* This is a workaround for using fetch on RN, this is a known issue in react-native and only generates a warning.
|
|
||||||
*/
|
|
||||||
export function ignoreRequireCycleLogs() {
|
|
||||||
- LogBox.ignoreLogs(['Require cycle:']);
|
|
||||||
+ try {
|
|
||||||
+ LogBox.ignoreLogs(['Require cycle:']);
|
|
||||||
+ } catch (e) {}
|
|
||||||
}
|
|
||||||
//# sourceMappingURL=ignorerequirecyclelogs.js.map
|
|
||||||
\ No newline at end of file
|
|
||||||
diff --git a/node_modules/@sentry/react-native/scripts/expo-upload-sourcemaps.js b/node_modules/@sentry/react-native/scripts/expo-upload-sourcemaps.js
|
|
||||||
index 0f244f2..ae7dfb3 100755
|
|
||||||
--- a/node_modules/@sentry/react-native/scripts/expo-upload-sourcemaps.js
|
|
||||||
+++ b/node_modules/@sentry/react-native/scripts/expo-upload-sourcemaps.js
|
|
||||||
@@ -174,6 +174,7 @@ if (!outputDir) {
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
+const otherArgs = process.argv.slice(3);
|
|
||||||
const files = getAssetPathsSync(outputDir);
|
|
||||||
const groupedAssets = groupAssets(files);
|
|
||||||
|
|
||||||
@@ -195,7 +196,7 @@ for (const [assetGroupName, assets] of Object.entries(groupedAssets)) {
|
|
||||||
|
|
||||||
const isHermes = assets.find(asset => asset.endsWith('.hbc'));
|
|
||||||
const windowsCallback = process.platform === "win32" ? 'node ' : '';
|
|
||||||
- execSync(`${windowsCallback}${sentryCliBin} sourcemaps upload ${isHermes ? '--debug-id-reference' : ''} ${assets.join(' ')}`, {
|
|
||||||
+ execSync(`${windowsCallback}${sentryCliBin} sourcemaps upload ${isHermes ? '--debug-id-reference' : ''} ${assets.join(' ')} ${otherArgs.join(' ')}`, {
|
|
||||||
env: {
|
|
||||||
...process.env,
|
|
||||||
[SENTRY_PROJECT]: sentryProject,
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
const exec = require('child_process').execSync
|
|
||||||
|
|
||||||
const SENTRY_AUTH_TOKEN = process.env.SENTRY_AUTH_TOKEN
|
|
||||||
|
|
||||||
module.exports = ({config}) => {
|
|
||||||
if (!SENTRY_AUTH_TOKEN) {
|
|
||||||
console.log(
|
|
||||||
'SENTRY_AUTH_TOKEN environment variable must be set to upload sourcemaps. Skipping.',
|
|
||||||
)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const org = config.organization
|
|
||||||
const project = config.project
|
|
||||||
const release = config.release
|
|
||||||
const dist = config.dist
|
|
||||||
|
|
||||||
if (!org || !project || !release || !dist) {
|
|
||||||
console.log(
|
|
||||||
'"organization", "project", "release", and "dist" must be set in the hook config to upload sourcemaps. Skipping.',
|
|
||||||
)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
console.log('Uploading sourcemaps to Sentry...')
|
|
||||||
exec(
|
|
||||||
`node node_modules/@sentry/react-native/scripts/expo-upload-sourcemaps dist --url https://sentry.io/ -o ${org} -p ${project} -r ${release} -d ${dist}`,
|
|
||||||
)
|
|
||||||
console.log('Sourcemaps uploaded to Sentry.')
|
|
||||||
} catch (e) {
|
|
||||||
console.error('Error uploading sourcemaps to Sentry:', e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user