Skip to content

Commit c02d84f

Browse files
committed
Merge branch 'antonis/3859-newCaptureFeedbackAPI-Form' into antonis/3859-newCaptureFeedbackAPI-Form-logo
2 parents d22d660 + 9831482 commit c02d84f

File tree

77 files changed

+285
-214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+285
-214
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,16 @@ jobs:
1717
runs-on: ubuntu-latest
1818
name: "Release a new version"
1919
steps:
20+
- name: Get auth token
21+
id: token
22+
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
23+
with:
24+
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
25+
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
2026
- name: Check out current commit (${{ github.sha }})
2127
uses: actions/checkout@v4
2228
with:
23-
token: ${{ secrets.GH_RELEASE_PAT }}
29+
token: ${{ steps.token.outputs.token }}
2430
fetch-depth: 0
2531
- run: corepack enable
2632
- uses: actions/setup-node@v4
@@ -31,7 +37,7 @@ jobs:
3137
- name: Prepare release
3238
uses: getsentry/action-prepare-release@v1
3339
env:
34-
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
40+
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
3541
with:
3642
version: ${{ github.event.inputs.version }}
3743
force: ${{ github.event.inputs.force }}

CHANGELOG.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,31 +35,41 @@
3535
});
3636
```
3737

38-
- Adds feedback form ([#4320](https://github.com/getsentry/sentry-react-native/pull/4328))
38+
- Adds feedback form (beta) ([#4320](https://github.com/getsentry/sentry-react-native/pull/4328))
3939

40-
You can add the form component in your UI and customise it like:
40+
You can add the form component in your UI like:
4141
```jsx
4242
import { FeedbackForm } from "@sentry/react-native";
4343
...
4444
<FeedbackForm/>
4545
```
4646
Check [the documentation](https://docs.sentry.io/platforms/react-native/user-feedback/) for more configuration options.
4747

48+
- Export `Span` type from `@sentry/types` ([#4345](https://github.com/getsentry/sentry-react-native/pull/4345))
49+
50+
4851
### Fixes
4952

5053
- Return `lastEventId` export from `@sentry/core` ([#4315](https://github.com/getsentry/sentry-react-native/pull/4315))
5154
- Don't log file not found errors when loading envs in `sentry-expo-upload-sourcemaps` ([#4332](https://github.com/getsentry/sentry-react-native/pull/4332))
5255
- Navigation Span should have no parent by default ([#4326](https://github.com/getsentry/sentry-react-native/pull/4326))
5356
- Disable HTTP Client Errors on iOS ([#4347](https://github.com/getsentry/sentry-react-native/pull/4347))
5457

58+
### Changes
59+
60+
- Falsy values of `options.environment` (empty string, undefined...) default to `production`
61+
5562
### Dependencies
5663

5764
- Bump CLI from v2.38.2 to v2.39.1 ([#4305](https://github.com/getsentry/sentry-react-native/pull/4305), [#4316](https://github.com/getsentry/sentry-react-native/pull/4316))
5865
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2391)
5966
- [diff](https://github.com/getsentry/sentry-cli/compare/2.38.2...2.39.1)
60-
- Bump Android SDK from v7.18.0 to v7.18.1 ([#4329](https://github.com/getsentry/sentry-react-native/pull/4329))
61-
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7181)
62-
- [diff](https://github.com/getsentry/sentry-java/compare/7.18.0...7.18.1)
67+
- Bump Android SDK from v7.18.0 to v7.19.0 ([#4329](https://github.com/getsentry/sentry-react-native/pull/4329), [#4365](https://github.com/getsentry/sentry-react-native/pull/4365))
68+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7190)
69+
- [diff](https://github.com/getsentry/sentry-java/compare/7.18.0...7.19.0)
70+
- Bump JavaScript SDK from v8.40.0 to v8.44.0 ([#4351](https://github.com/getsentry/sentry-react-native/pull/4351), [#4325](https://github.com/getsentry/sentry-react-native/pull/4325))
71+
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#8440)
72+
- [diff](https://github.com/getsentry/sentry-javascript/compare/8.40.0...8.44.0)
6373

6474
## 6.4.0
6575

dev-packages/e2e-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"devDependencies": {
1414
"@babel/preset-env": "^7.25.3",
1515
"@babel/preset-typescript": "^7.18.6",
16+
"@sentry/core": "8.44.0",
1617
"@sentry/react-native": "6.4.0",
17-
"@sentry/utils": "8.40.0",
1818
"@types/node": "^20.9.3",
1919
"@types/react": "^18.2.64",
2020
"appium": "2.4.1",

dev-packages/e2e-tests/patch-scripts/rn.patch.app.build.gradle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const fs = require('fs');
44
const { argv } = require('process');
55

66
const parseArgs = require('minimist');
7-
const { logger } = require('@sentry/utils');
7+
const { logger } = require('@sentry/core');
88
logger.enable();
99

1010
const args = parseArgs(argv.slice(2));

dev-packages/e2e-tests/patch-scripts/rn.patch.app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const path = require('path');
55
const { argv, env } = require('process');
66

77
const parseArgs = require('minimist');
8-
const { logger } = require('@sentry/utils');
8+
const { logger } = require('@sentry/core');
99
logger.enable();
1010

1111
const SENTRY_RELEASE = env.SENTRY_RELEASE;

dev-packages/e2e-tests/patch-scripts/rn.patch.gradle.properties.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const fs = require('fs');
44
const { argv } = require('process');
55

66
const parseArgs = require('minimist');
7-
const { logger } = require('@sentry/utils');
7+
const { logger } = require('@sentry/core');
88
logger.enable();
99

1010
const args = parseArgs(argv.slice(2));

dev-packages/e2e-tests/patch-scripts/rn.patch.metro.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const fs = require('fs');
44
const { argv } = require('process');
55

66
const parseArgs = require('minimist');
7-
const { logger } = require('@sentry/utils');
7+
const { logger } = require('@sentry/core');
88
logger.enable();
99

1010
const args = parseArgs(argv.slice(2));

dev-packages/e2e-tests/patch-scripts/rn.patch.podfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const fs = require('fs');
44
const { argv } = require('process');
55

66
const parseArgs = require('minimist');
7-
const { logger } = require('@sentry/utils');
7+
const { logger } = require('@sentry/core');
88
logger.enable();
99

1010
const args = parseArgs(argv.slice(2));

dev-packages/e2e-tests/patch-scripts/rn.patch.xcode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { argv } = require('process');
66
const xcode = require('xcode');
77
const parseArgs = require('minimist');
88
const semver = require('semver');
9-
const { logger } = require('@sentry/utils');
9+
const { logger } = require('@sentry/core');
1010
logger.enable();
1111

1212
const args = parseArgs(argv.slice(2));

packages/core/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,5 @@ android {
5454

5555
dependencies {
5656
implementation 'com.facebook.react:react-native:+'
57-
api 'io.sentry:sentry-android:7.18.1'
57+
api 'io.sentry:sentry-android:7.19.0'
5858
}

packages/core/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"test:sdk": "npx jest",
3434
"test:tools": "npx jest --config jest.config.tools.js",
3535
"test:watch": "npx jest --watch",
36-
"yalc:add:sentry-javascript": "yalc add @sentry/browser @sentry/core @sentry/react @sentry/types @sentry/utils",
36+
"yalc:add:sentry-javascript": "yalc add @sentry/browser @sentry/core @sentry/react @sentry/types",
3737
"fix": "npx run-s fix:eslint fix:prettier",
3838
"fix:eslint": "eslint --config .eslintrc.js --fix .",
3939
"fix:prettier": "prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore --write \"{src,test,scripts,plugin/src}/**/**.ts\"",
@@ -66,21 +66,21 @@
6666
},
6767
"dependencies": {
6868
"@sentry/babel-plugin-component-annotate": "2.20.1",
69-
"@sentry/browser": "8.40.0",
69+
"@sentry/browser": "8.44.0",
7070
"@sentry/cli": "2.39.1",
71-
"@sentry/core": "8.40.0",
72-
"@sentry/react": "8.40.0",
73-
"@sentry/types": "8.40.0",
74-
"@sentry/utils": "8.40.0"
71+
"@sentry/core": "8.44.0",
72+
"@sentry/react": "8.44.0",
73+
"@sentry/types": "8.44.0",
74+
"@sentry/utils": "8.44.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.40.0",
82-
"@sentry-internal/eslint-plugin-sdk": "8.40.0",
83-
"@sentry-internal/typescript": "8.40.0",
81+
"@sentry-internal/eslint-config-sdk": "8.44.0",
82+
"@sentry-internal/eslint-plugin-sdk": "8.44.0",
83+
"@sentry-internal/typescript": "8.44.0",
8484
"@sentry/wizard": "3.36.0",
8585
"@testing-library/react-native": "^12.7.2",
8686
"@types/jest": "^29.5.3",

packages/core/src/js/breadcrumb.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { severityLevelFromString } from '@sentry/core';
12
import type { Breadcrumb, SeverityLevel } from '@sentry/types';
2-
import { severityLevelFromString } from '@sentry/utils';
33

44
export const DEFAULT_BREADCRUMB_LEVEL: SeverityLevel = 'info';
55

packages/core/src/js/client.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { eventFromException, eventFromMessage } from '@sentry/browser';
2-
import { BaseClient } from '@sentry/core';
2+
import { BaseClient, dateTimestampInSeconds, logger, SentryError } from '@sentry/core';
33
import type {
44
ClientReportEnvelope,
55
ClientReportItem,
@@ -11,7 +11,6 @@ import type {
1111
TransportMakeRequestResponse,
1212
UserFeedback,
1313
} from '@sentry/types';
14-
import { dateTimestampInSeconds, logger, SentryError } from '@sentry/utils';
1514
import { Alert } from 'react-native';
1615

1716
import { getDevServer } from './integrations/debugsymbolicatorutils';

packages/core/src/js/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export type {
66
Exception,
77
SendFeedbackParams,
88
SeverityLevel,
9+
Span,
910
StackFrame,
1011
Stacktrace,
1112
Thread,

packages/core/src/js/integrations/debugsymbolicator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { logger } from '@sentry/core';
12
import type { Event, EventHint, Exception, Integration, StackFrame as SentryStackFrame } from '@sentry/types';
2-
import { logger } from '@sentry/utils';
33

44
import type { ExtendedError } from '../utils/error';
55
import { getFramesToPop, isErrorLike } from '../utils/error';

packages/core/src/js/integrations/debugsymbolicatorutils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { logger } from '@sentry/core';
12
import type { StackFrame as SentryStackFrame } from '@sentry/types';
2-
import { logger } from '@sentry/utils';
33

44
import { ReactNativeLibraries } from '../utils/rnlibraries';
55
import { createStealthXhr, XHR_READYSTATE_DONE } from '../utils/xhr';

packages/core/src/js/integrations/devicecontext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable complexity */
2+
import { logger, severityLevelFromString } from '@sentry/core';
23
import type { Client, Event, EventHint, Integration } from '@sentry/types';
3-
import { logger, severityLevelFromString } from '@sentry/utils';
44
import { AppState } from 'react-native';
55

66
import { breadcrumbFromObject } from '../breadcrumb';

packages/core/src/js/integrations/modulesloader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { logger } from '@sentry/core';
12
import type { Event, Integration } from '@sentry/types';
2-
import { logger } from '@sentry/utils';
33

44
import { NATIVE } from '../wrapper';
55

packages/core/src/js/integrations/nativelinkederrors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { exceptionFromError } from '@sentry/browser';
2+
import { isInstanceOf, isPlainObject, isString } from '@sentry/core';
23
import type {
34
Client,
45
DebugImage,
@@ -10,7 +11,6 @@ import type {
1011
StackFrame,
1112
StackParser,
1213
} from '@sentry/types';
13-
import { isInstanceOf, isPlainObject, isString } from '@sentry/utils';
1414

1515
import type { NativeStackFrames } from '../NativeRNSentry';
1616
import { NATIVE } from '../wrapper';

packages/core/src/js/integrations/reactnativeerrorhandlers.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { captureException, getClient, getCurrentScope } from '@sentry/core';
1+
import { addExceptionMechanism, captureException, getClient, getCurrentScope, logger } from '@sentry/core';
22
import type { EventHint, Integration, SeverityLevel } from '@sentry/types';
3-
import { addExceptionMechanism, logger } from '@sentry/utils';
43

54
import { createSyntheticError, isErrorLike } from '../utils/error';
65
import { RN_GLOBAL_OBJ } from '../utils/worldwide';

packages/core/src/js/integrations/reactnativeerrorhandlersutils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { logger } from '@sentry/utils';
1+
import { logger } from '@sentry/core';
22

33
import { ReactNativeLibraries } from '../utils/rnlibraries';
44
import { RN_GLOBAL_OBJ } from '../utils/worldwide';

packages/core/src/js/integrations/sdkinfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { logger } from '@sentry/core';
12
import type { Event, Integration, Package, SdkInfo as SdkInfoType } from '@sentry/types';
2-
import { logger } from '@sentry/utils';
33

44
import { isExpoGo, notWeb } from '../utils/environment';
55
import { SDK_NAME, SDK_PACKAGE_NAME, SDK_VERSION } from '../version';

packages/core/src/js/integrations/spotlight.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { logger, serializeEnvelope } from '@sentry/core';
12
import type { BaseTransportOptions, Client, ClientOptions, Envelope, Integration } from '@sentry/types';
2-
import { logger, serializeEnvelope } from '@sentry/utils';
33

44
import { ReactNativeLibraries } from '../utils/rnlibraries';
55
import { createStealthXhr, XHR_READYSTATE_DONE } from '../utils/xhr';

packages/core/src/js/integrations/viewhierarchy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { logger } from '@sentry/core';
12
import type { Attachment, Event, EventHint, Integration } from '@sentry/types';
2-
import { logger } from '@sentry/utils';
33

44
import { NATIVE } from '../wrapper';
55

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,72 @@
1-
import { makeFifoCache } from '@sentry/utils';
2-
31
import type { AndroidCombinedProfileEvent, CombinedProfileEvent } from './types';
42

53
export const PROFILE_QUEUE = makeFifoCache<string, CombinedProfileEvent | AndroidCombinedProfileEvent>(20);
4+
5+
/**
6+
* Creates a cache that evicts keys in fifo order
7+
* @param size {Number}
8+
*/
9+
function makeFifoCache<Key extends string, Value>(
10+
size: number,
11+
): {
12+
get: (key: Key) => Value | undefined;
13+
add: (key: Key, value: Value) => void;
14+
delete: (key: Key) => boolean;
15+
clear: () => void;
16+
size: () => number;
17+
} {
18+
// Maintain a fifo queue of keys, we cannot rely on Object.keys as the browser may not support it.
19+
let evictionOrder: Key[] = [];
20+
let cache: Record<string, Value> = {};
21+
22+
return {
23+
add(key: Key, value: Value) {
24+
while (evictionOrder.length >= size) {
25+
// shift is O(n) but this is small size and only happens if we are
26+
// exceeding the cache size so it should be fine.
27+
const evictCandidate = evictionOrder.shift();
28+
29+
if (evictCandidate !== undefined) {
30+
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
31+
delete cache[evictCandidate];
32+
}
33+
}
34+
35+
// in case we have a collision, delete the old key.
36+
if (cache[key]) {
37+
this.delete(key);
38+
}
39+
40+
evictionOrder.push(key);
41+
cache[key] = value;
42+
},
43+
clear() {
44+
cache = {};
45+
evictionOrder = [];
46+
},
47+
get(key: Key): Value | undefined {
48+
return cache[key];
49+
},
50+
size() {
51+
return evictionOrder.length;
52+
},
53+
// Delete cache key and return true if it existed, false otherwise.
54+
delete(key: Key): boolean {
55+
if (!cache[key]) {
56+
return false;
57+
}
58+
59+
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
60+
delete cache[key];
61+
62+
for (let i = 0; i < evictionOrder.length; i++) {
63+
if (evictionOrder[i] === key) {
64+
evictionOrder.splice(i, 1);
65+
break;
66+
}
67+
}
68+
69+
return true;
70+
},
71+
};
72+
}

packages/core/src/js/profiling/convertHermesProfile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { logger } from '@sentry/core';
12
import type { FrameId, StackId, ThreadCpuFrame, ThreadCpuSample, ThreadCpuStack, ThreadId } from '@sentry/types';
2-
import { logger } from '@sentry/utils';
33

44
import { MAX_PROFILE_DURATION_MS } from './constants';
55
import type * as Hermes from './hermes';

packages/core/src/js/profiling/debugid.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { GLOBAL_OBJ, logger } from '@sentry/core';
12
import type { DebugImage } from '@sentry/types';
2-
import { GLOBAL_OBJ, logger } from '@sentry/utils';
33

44
import { DEFAULT_BUNDLE_NAME } from './hermes';
55

packages/core/src/js/profiling/integration.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/* eslint-disable complexity */
2-
import { getActiveSpan, getClient, spanIsSampled } from '@sentry/core';
2+
import { getActiveSpan, getClient, logger, spanIsSampled, uuid4 } from '@sentry/core';
33
import type { Envelope, Event, Integration, Span, ThreadCpuProfile } from '@sentry/types';
4-
import { logger, uuid4 } from '@sentry/utils';
54
import { Platform } from 'react-native';
65

76
import type { ReactNativeClient } from '../client';

packages/core/src/js/profiling/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable complexity */
2+
import { forEachEnvelopeItem, logger } from '@sentry/core';
23
import type { Envelope, Event, ThreadCpuProfile } from '@sentry/types';
3-
import { forEachEnvelopeItem, logger } from '@sentry/utils';
44

55
import { getDefaultEnvironment } from '../utils/environment';
66
import { getDebugMetadata } from './debugid';

0 commit comments

Comments
 (0)