Skip to content

Ref: Use main carrier on useEncodePolyfill #4731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 38 commits into from
Apr 15, 2025
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
04b6c06
bump SDKs
lucas-zimerman Feb 14, 2025
0dc4bca
bump SDKs
lucas-zimerman Feb 14, 2025
382fef6
fix build
lucas-zimerman Feb 14, 2025
33af36c
fix tests
lucas-zimerman Feb 19, 2025
ad6a76c
fix tests
lucas-zimerman Feb 19, 2025
15342a2
fix lint errors
lucas-zimerman Feb 19, 2025
c267f9b
test ts 5.0
lucas-zimerman Feb 19, 2025
efea84f
rollback
lucas-zimerman Feb 19, 2025
65a10d5
Merge branch 'v7' into lz/bump/jsv9
lucas-zimerman Feb 24, 2025
028dbf9
fix merge conflict with yarn
lucas-zimerman Feb 25, 2025
a57459a
fix new lint issue
lucas-zimerman Feb 25, 2025
5de9867
sync yarn.lock with V7 branch and install new packages
lucas-zimerman Feb 26, 2025
ae65521
ensure we are using the JS version from the default node resolution
lucas-zimerman Feb 26, 2025
bd64169
update changelog with javascript version bump
lucas-zimerman Feb 26, 2025
39a81c7
fix check type (#4587)
lucas-zimerman Feb 25, 2025
3a4fd4c
add major changes to the SDK
lucas-zimerman Feb 26, 2025
d8088ad
fix lint
lucas-zimerman Feb 26, 2025
6f71cda
review check: fix changelog PR number / Fix wrapper incorrect null c…
lucas-zimerman Feb 26, 2025
55c1961
fix incorrect cli version
lucas-zimerman Feb 26, 2025
97853c6
fix lint
lucas-zimerman Feb 26, 2025
dc2e123
Merge branch 'v7' into lz/bump/jsv9
lucas-zimerman Feb 25, 2025
9a0b21e
remove shutdowntimeout from android / use newer wizard version
lucas-zimerman Mar 3, 2025
45ee6fa
rollback feedback test change, rollback jest version, fix safe test
lucas-zimerman Mar 14, 2025
816b506
return shutdowntimeout
lucas-zimerman Mar 14, 2025
25bf147
explain tracing sample rate
lucas-zimerman Mar 14, 2025
8584214
fix tracing extension test
lucas-zimerman Mar 14, 2025
a26497e
Merge branch 'v7' into lz/bump/jsv9
lucas-zimerman Mar 14, 2025
499e5a3
lint fix
lucas-zimerman Mar 14, 2025
578ad2c
update changelog
lucas-zimerman Mar 15, 2025
d7fe6c6
merge v7
lucas-zimerman Apr 7, 2025
b08c54f
fix yarn lock merge/ fix ts-jest version no longer exists / fix cor…
lucas-zimerman Apr 7, 2025
19197f3
fix lint on addTimeToInitialDisplay
lucas-zimerman Apr 7, 2025
709697c
fix issue with UIManager test
lucas-zimerman Apr 7, 2025
4538bce
use main carrier
lucas-zimerman Apr 7, 2025
a64450d
fix yarn lint
lucas-zimerman Apr 7, 2025
a5ddcda
moved major changes to the correct spot
lucas-zimerman Apr 7, 2025
6d86583
Merge branch 'lz/bump/jsv9' into lz/jsv9/carrier
lucas-zimerman Apr 7, 2025
4764570
Merge branch 'v7' into lz/jsv9/carrier
lucas-zimerman Apr 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions packages/core/src/js/transports/encodePolyfill.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { SDK_VERSION } from '@sentry/core';
import { getMainCarrier, SDK_VERSION } from '@sentry/core';

import { RN_GLOBAL_OBJ } from '../utils/worldwide';
import type { RN_GLOBAL_OBJ } from '../utils/worldwide';
import { utf8ToBytes } from '../vendor';

export const useEncodePolyfill = (): void => {
if (!RN_GLOBAL_OBJ.__SENTRY__) {
(RN_GLOBAL_OBJ.__SENTRY__ as Partial<(typeof RN_GLOBAL_OBJ)['__SENTRY__']>) = {};
const globalCarriers = getMainCarrier().__SENTRY__;

if (!globalCarriers) {
(globalCarriers as Partial<(typeof RN_GLOBAL_OBJ)['__SENTRY__']>) = {};
}

RN_GLOBAL_OBJ.__SENTRY__[SDK_VERSION].encodePolyfill = encodePolyfill;
globalCarriers[SDK_VERSION].encodePolyfill = encodePolyfill;
};

export const encodePolyfill = (text: string): Uint8Array => {
Expand Down
Loading