Commit 4e4f1da
authored
feat(utils): Allow text encoder/decoder polyfill from global __SENTRY__ (#11283)
The TextEncoder option was removed in
#10701 because all of
the newly supported platforms support TextEncoder/Decoder.
Sadly that's not true for React Native, yet. TextEncoder will be
included in the next release of RN with Hermes. See the PR
facebook/hermes@3863a36#diff-4bf4a4ab271f254baf2097be87be98333ec69eb2d41e074b81147656c33145eb
We can not drop support of all the previous RN versions in the RN SDK v6
(the next major).
To avoid passing the encoder option around the SDK, I propose adding
polyfill properties to the global __SENTRY__ object which RN can use.1 parent 3ae830c commit 4e4f1da
File tree
3 files changed
+42
-5
lines changed- packages/utils
- src
- test
3 files changed
+42
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
81 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
82 | 87 | | |
83 | 88 | | |
84 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| |||
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
35 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
36 | 64 | | |
37 | 65 | | |
38 | 66 | | |
| |||
44 | 72 | | |
45 | 73 | | |
46 | 74 | | |
47 | | - | |
48 | | - | |
49 | 75 | | |
50 | 76 | | |
51 | 77 | | |
| |||
61 | 87 | | |
62 | 88 | | |
63 | 89 | | |
| 90 | + | |
| 91 | + | |
64 | 92 | | |
65 | 93 | | |
66 | 94 | | |
| |||
0 commit comments