Skip to content

Commit f8988bc

Browse files
committed
Merge branch 'main' into feedback-ui
2 parents dbdfceb + 8bda0cc commit f8988bc

File tree

18 files changed

+207
-283
lines changed

18 files changed

+207
-283
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444

4545
# Initializes the CodeQL tools for scanning.
4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # [email protected].5
47+
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # [email protected].8
4848
with:
4949
languages: ${{ matrix.language }}
5050
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -55,7 +55,7 @@ jobs:
5555
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5656
# If this step fails, then you should remove it and run the build manually (see below)
5757
- name: Autobuild
58-
uses: github/codeql-action/autobuild@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # [email protected].5
58+
uses: github/codeql-action/autobuild@dd746615b3b9d728a6a37ca2045b68ca76d4841a # [email protected].8
5959

6060
# ℹ️ Command-line programs to run using the OS shell.
6161
# 📚 https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
@@ -66,4 +66,4 @@ jobs:
6666
# make bootstrap
6767
# make release
6868
- name: Perform CodeQL Analysis
69-
uses: github/codeql-action/analyze@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # [email protected].5
69+
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # [email protected].8

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
steps:
2020
- name: Get auth token
2121
id: token
22-
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
22+
uses: actions/create-github-app-token@136412a57a7081aa63c935a2cc2918f76c34f514 # v1.11.2
2323
with:
2424
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
2525
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
- Bump CLI from v2.39.1 to v2.41.1 ([#4412](https://github.com/getsentry/sentry-react-native/pull/4412), [#4468](https://github.com/getsentry/sentry-react-native/pull/4468), [#4473](https://github.com/getsentry/sentry-react-native/pull/4473))
4242
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2411)
4343
- [diff](https://github.com/getsentry/sentry-cli/compare/2.39.1...2.41.1)
44-
- Bump JavaScript SDK from v8.47.0 to v8.52.1 ([#4421](https://github.com/getsentry/sentry-react-native/pull/4421), [#4449](https://github.com/getsentry/sentry-react-native/pull/4449), [#4453](https://github.com/getsentry/sentry-react-native/pull/4453), [#4480](https://github.com/getsentry/sentry-react-native/pull/4480), [#4491](https://github.com/getsentry/sentry-react-native/pull/4491), [#4496](https://github.com/getsentry/sentry-react-native/pull/4496))
45-
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#8521)
46-
- [diff](https://github.com/getsentry/sentry-javascript/compare/8.47.0...8.52.1)
44+
- Bump JavaScript SDK from v8.47.0 to v8.53.0 ([#4421](https://github.com/getsentry/sentry-react-native/pull/4421), [#4449](https://github.com/getsentry/sentry-react-native/pull/4449), [#4453](https://github.com/getsentry/sentry-react-native/pull/4453), [#4480](https://github.com/getsentry/sentry-react-native/pull/4480), [#4491](https://github.com/getsentry/sentry-react-native/pull/4491), [#4496](https://github.com/getsentry/sentry-react-native/pull/4496), [#4497](https://github.com/getsentry/sentry-react-native/pull/4497))
45+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#8530)
46+
- [diff](https://github.com/getsentry/sentry-javascript/compare/8.47.0...8.53.0)
4747
- Bump Android SDK from v7.20.0 to v7.20.1 ([#4467](https://github.com/getsentry/sentry-react-native/pull/4467))
4848
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7201)
4949
- [diff](https://github.com/getsentry/sentry-java/compare/7.20.0...7.20.1)

dev-packages/e2e-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"devDependencies": {
1414
"@babel/preset-env": "^7.25.3",
1515
"@babel/preset-typescript": "^7.18.6",
16-
"@sentry/core": "8.52.1",
16+
"@sentry/core": "8.53.0",
1717
"@sentry/react-native": "6.5.0",
1818
"@types/node": "^20.9.3",
1919
"@types/react": "^18.2.64",

dev-packages/utils/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {};

dev-packages/utils/metro.js

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
const path = require('path');
2+
const exclusionList = require('metro-config/src/defaults/exclusionList');
3+
4+
/**
5+
* Packages used by the sample apps
6+
*/
7+
const getMonorepoPackages = monorepoRoot => {
8+
return {
9+
'@sentry/react-native': path.resolve(monorepoRoot, 'packages/core'),
10+
};
11+
};
12+
13+
/**
14+
* Block given packages present in the monorepo packages to avoid conflicts with the sample apps
15+
*/
16+
const getBlockList = (monorepoPackages, excludedPackages) => {
17+
return Object.values(monorepoPackages)
18+
.map(p => excludedPackages.map(e => new RegExp(`${p}/node_modules/${e}/.*`)))
19+
.flat();
20+
};
21+
22+
const withMonorepo = config => {
23+
const projectRoot = config.projectRoot;
24+
if (!projectRoot) {
25+
throw new Error('projectRoot is required');
26+
}
27+
28+
const monorepoRoot = path.resolve(projectRoot, '../..');
29+
const monorepoPackages = getMonorepoPackages(monorepoRoot);
30+
31+
config.resolver = config.resolver || {};
32+
33+
const blockList = [
34+
...((Array.isArray(config.resolver.blockList) && config.resolver.blockList) ||
35+
(!!config.resolver.blockList && [config.resolver.blockList]) ||
36+
[]),
37+
...getBlockList(monorepoPackages, ['react-native', 'react']),
38+
new RegExp('.*\\android\\.*'), // Required for Windows in order to run the Sample.
39+
];
40+
config.resolver.blockList = exclusionList(blockList);
41+
42+
config.watchFolders = [...(config.watchFolders || []), projectRoot, ...Object.values(monorepoPackages)];
43+
44+
config.resolver.extraNodeModules = {
45+
...config.resolver.extraNodeModules,
46+
...monorepoPackages,
47+
'react-native': path.resolve(projectRoot, 'node_modules/react-native'),
48+
react: path.resolve(projectRoot, 'node_modules/react'),
49+
};
50+
51+
config.resolver.nodeModulesPaths = [
52+
...(config.resolver.nodeModulesPaths || []),
53+
path.resolve(projectRoot, 'node_modules'),
54+
...Object.values(monorepoPackages).map(p => path.resolve(p, 'node_modules')),
55+
];
56+
57+
return config;
58+
};
59+
60+
module.exports = {
61+
withMonorepo,
62+
};

dev-packages/utils/package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "sentry-react-native-samples-utils",
3+
"version": "0.0.1",
4+
"description": "Internal Samples Utils",
5+
"main": "index.js",
6+
"license": "MIT",
7+
"private": true,
8+
"dependencies": {
9+
"metro-config": "^0.81.0"
10+
}
11+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"packages/core",
4646
"dev-packages/e2e-tests",
4747
"dev-packages/type-check",
48+
"dev-packages/utils",
4849
"samples/react-native",
4950
"samples/react-native-macos",
5051
"samples/expo",

packages/core/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,21 @@
6666
},
6767
"dependencies": {
6868
"@sentry/babel-plugin-component-annotate": "2.20.1",
69-
"@sentry/browser": "8.52.1",
69+
"@sentry/browser": "8.53.0",
7070
"@sentry/cli": "2.41.1",
71-
"@sentry/core": "8.52.1",
72-
"@sentry/react": "8.52.1",
73-
"@sentry/types": "8.52.1",
74-
"@sentry/utils": "8.52.1"
71+
"@sentry/core": "8.53.0",
72+
"@sentry/react": "8.53.0",
73+
"@sentry/types": "8.53.0",
74+
"@sentry/utils": "8.53.0"
7575
},
7676
"devDependencies": {
7777
"@babel/core": "^7.25.2",
7878
"@expo/metro-config": "0.19.5",
7979
"@mswjs/interceptors": "^0.25.15",
8080
"@react-native/babel-preset": "0.76.3",
81-
"@sentry-internal/eslint-config-sdk": "8.52.1",
82-
"@sentry-internal/eslint-plugin-sdk": "8.52.1",
83-
"@sentry-internal/typescript": "8.52.1",
81+
"@sentry-internal/eslint-config-sdk": "8.53.0",
82+
"@sentry-internal/eslint-plugin-sdk": "8.53.0",
83+
"@sentry-internal/typescript": "8.53.0",
8484
"@sentry/wizard": "3.39.0",
8585
"@testing-library/react-native": "^12.7.2",
8686
"@types/jest": "^29.5.3",
Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
1-
const path = require('path');
2-
const exclusionList = require('metro-config/src/defaults/exclusionList');
3-
4-
const projectRoot = __dirname;
5-
const monorepoRoot = path.resolve(projectRoot, '../..');
6-
7-
// Only list the packages within your monorepo that your app uses. No need to add anything else.
8-
// If your monorepo tooling can give you the list of monorepo workspaces linked
9-
// in your app workspace, you can automate this list instead of hardcoding them.
10-
const monorepoPackages = {
11-
'@sentry/react-native': path.resolve(monorepoRoot, 'packages/core'),
12-
};
1+
const { withMonorepo } = require('sentry-react-native-samples-utils/metro');
132

143
/**
154
* Metro configuration for React Native
165
* https://github.com/facebook/react-native
176
*
187
* @format
198
*/
20-
module.exports = {
9+
module.exports = withMonorepo({
2110
transformer: {
2211
getTransformOptions: async () => ({
2312
transform: {
@@ -27,24 +16,4 @@ module.exports = {
2716
}),
2817
},
2918
projectRoot: __dirname,
30-
// 1. Watch the local app directory, and only the shared packages (limiting the scope and speeding it up)
31-
// Note how we change this from `monorepoRoot` to `projectRoot`. This is part of the optimization!
32-
watchFolders: [projectRoot, ...Object.values(monorepoPackages)],
33-
resolver: {
34-
blockList: exclusionList([
35-
...Object.values(monorepoPackages).map(p => new RegExp(`${p}/node_modules/react-native/.*`)),
36-
]),
37-
// Add the monorepo workspaces as `extraNodeModules` to Metro.
38-
// If your monorepo tooling creates workspace symlinks in the `node_modules` directory,
39-
// you can either add symlink support to Metro or set the `extraNodeModules` to avoid the symlinks.
40-
// See: https://metrobundler.dev/docs/configuration/#extranodemodules
41-
extraNodeModules: {
42-
...monorepoPackages,
43-
'react-native': path.resolve(projectRoot, 'node_modules/react-native'),
44-
},
45-
nodeModulesPaths: [
46-
path.resolve(projectRoot, 'node_modules'),
47-
...Object.values(monorepoPackages).map(p => path.resolve(p, 'node_modules')),
48-
],
49-
},
50-
};
19+
});

0 commit comments

Comments
 (0)