@honeybadger-io/react-native 6.4.3 → 6.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +8 -0
- package/dist/index.js +2 -2
- package/package.json +3 -3
- package/scripts/honeybadger-upload-sourcemaps.sh +49 -14
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [6.4.5](https://github.com/honeybadger-io/honeybadger-js/compare/@honeybadger-io/react-native@6.4.4...@honeybadger-io/react-native@6.4.5) (2025-06-30)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @honeybadger-io/react-native
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [6.4.4](https://github.com/honeybadger-io/honeybadger-js/compare/@honeybadger-io/react-native@6.4.3...@honeybadger-io/react-native@6.4.4) (2025-06-24)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* generate sourcemaps for expo projects ([#1439](https://github.com/honeybadger-io/honeybadger-js/issues/1439)) ([bd5edef](https://github.com/honeybadger-io/honeybadger-js/commit/bd5edef69f3424018a145dd7d532ee826c3218ad))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [6.4.3](https://github.com/honeybadger-io/honeybadger-js/compare/@honeybadger-io/react-native@6.4.2...@honeybadger-io/react-native@6.4.3) (2025-03-18)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @honeybadger-io/react-native
|
package/README.md
CHANGED
|
@@ -63,6 +63,12 @@ As of version 0.70, React Native uses Hermes as the default JavaScript engine. T
|
|
|
63
63
|
npx honeybadger-upload-sourcemaps --no-hermes --apiKey <your project API key> --revision <build revision>
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
+
If your React Native project uses Expo, include the `--expo` param.
|
|
67
|
+
|
|
68
|
+
```shell
|
|
69
|
+
npx honeybadger-upload-sourcemaps --apiKey <your project API key> --revision <build revision> --expo
|
|
70
|
+
```
|
|
71
|
+
|
|
66
72
|
If you just want to generate the source maps without uploading them to Honeybadger, you can use the `--skip-upload` flag.
|
|
67
73
|
|
|
68
74
|
```shell
|
|
@@ -137,6 +143,8 @@ Then run `npm install` within the example project.
|
|
|
137
143
|
|
|
138
144
|
If you notice that your changes are not being picked up, there may be a caching issue. You can bust this by renaming the tarball to a unique name and re-installing it.
|
|
139
145
|
|
|
146
|
+
Additionally, if you are testing source maps and source map generation, you should probably run the react-native apps in release / production mode.
|
|
147
|
+
|
|
140
148
|
## License
|
|
141
149
|
|
|
142
150
|
The Honeybadger React Native library is MIT-licensed. See the [MIT-LICENSE](./MIT-LICENSE) file in this folder for details.
|
package/dist/index.js
CHANGED
|
@@ -84,7 +84,7 @@ function __generator(thisArg, body) {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
var name = "@honeybadger-io/react-native";
|
|
87
|
-
var version = "6.4.
|
|
87
|
+
var version = "6.4.5";
|
|
88
88
|
|
|
89
89
|
var Transport = /** @class */ (function () {
|
|
90
90
|
function Transport() {
|
|
@@ -286,7 +286,7 @@ var Honeybadger = /** @class */ (function (_super) {
|
|
|
286
286
|
_this.__notifier = {
|
|
287
287
|
name: '@honeybadger-io/react-native',
|
|
288
288
|
url: 'https://github.com/honeybadger-io/honeybadger-js/tree/master/packages/react-native',
|
|
289
|
-
version: '6.4.
|
|
289
|
+
version: '6.4.5'
|
|
290
290
|
};
|
|
291
291
|
_this.__jsHandlerInitialized = false;
|
|
292
292
|
_this.__nativeHandlerInitialized = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@honeybadger-io/react-native",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.5",
|
|
4
4
|
"description": "Honeybadger.io for React Native.",
|
|
5
5
|
"author": "Andrey Butov <andreybutov@antair.com> (https://andreybutov.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"node": ">=14"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@honeybadger-io/core": "^6.7.
|
|
51
|
+
"@honeybadger-io/core": "^6.7.1"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "37acb88dc9698026229a6fee604b299911859b85"
|
|
54
54
|
}
|
|
@@ -5,18 +5,21 @@
|
|
|
5
5
|
# Generate and upload sourcemaps to Honeybadger
|
|
6
6
|
#
|
|
7
7
|
# USAGE:
|
|
8
|
-
# npx honeybadger-upload-sourcemaps [--no-hermes] [--skip-upload] --apiKey <project-api-key> --revision <build-revision>
|
|
8
|
+
# npx honeybadger-upload-sourcemaps [--expo] [--no-hermes] [--skip-upload] --apiKey <project-api-key> --revision <build-revision>
|
|
9
|
+
#
|
|
10
|
+
# For Expo projects, the script will automatically detect Expo by checking for app.json, app.config.js, or expo in package.json.
|
|
11
|
+
# You can still use the --expo flag to explicitly specify Expo, or override auto-detection if needed.
|
|
9
12
|
#
|
|
10
13
|
# Hermes is enabled by default in React Native projects as of React Native 0.70.
|
|
11
|
-
# This script assumes that Hermes is being used. If you are not using Hermes in
|
|
14
|
+
# This script assumes that Hermes is being used. If you are not using Hermes in
|
|
12
15
|
# your React Native project, use the "--no-hermes" flag.
|
|
13
16
|
#
|
|
14
|
-
# If you just need to generate the sourcemaps without uploading them to
|
|
17
|
+
# If you just need to generate the sourcemaps without uploading them to
|
|
15
18
|
# Honeybadger, use the --skip-upload flag.
|
|
16
19
|
#
|
|
17
20
|
# ----------------------------------------------------------------------------
|
|
18
21
|
|
|
19
|
-
USAGE="npx honeybadger-upload-sourcemaps [--no-hermes] [--skip-upload] --apiKey <project-api-key> --revision <build-revision>"
|
|
22
|
+
USAGE="npx honeybadger-upload-sourcemaps [--expo] [--no-hermes] [--skip-upload] --apiKey <project-api-key> --revision <build-revision>"
|
|
20
23
|
|
|
21
24
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
22
25
|
PROJECT_ROOT_DIR="$SCRIPT_DIR/../.."
|
|
@@ -40,11 +43,13 @@ EMPTY_FILE="$PROJECT_ROOT_DIR/empty_file.txt"
|
|
|
40
43
|
API_KEY=""
|
|
41
44
|
REVISION=""
|
|
42
45
|
USE_HERMES=true
|
|
46
|
+
IS_EXPO_PROJECT=false
|
|
43
47
|
SKIP_UPLOAD=false
|
|
44
48
|
|
|
45
49
|
OS_BIN=""
|
|
46
50
|
|
|
47
51
|
|
|
52
|
+
|
|
48
53
|
#
|
|
49
54
|
# Parse the command line variables.
|
|
50
55
|
# We need the apiKey, and the build revision.
|
|
@@ -53,6 +58,10 @@ OS_BIN=""
|
|
|
53
58
|
|
|
54
59
|
while [[ $# -gt 0 ]]; do
|
|
55
60
|
case "$1" in
|
|
61
|
+
--expo)
|
|
62
|
+
IS_EXPO_PROJECT=true
|
|
63
|
+
shift
|
|
64
|
+
;;
|
|
56
65
|
--no-hermes)
|
|
57
66
|
USE_HERMES=false
|
|
58
67
|
shift
|
|
@@ -111,7 +120,7 @@ fi
|
|
|
111
120
|
|
|
112
121
|
|
|
113
122
|
#
|
|
114
|
-
# Determine what the operating system is. This is needed to find the path
|
|
123
|
+
# Determine what the operating system is. This is needed to find the path
|
|
115
124
|
# to the Hermes executable.
|
|
116
125
|
#
|
|
117
126
|
|
|
@@ -136,12 +145,39 @@ if $USE_HERMES; then
|
|
|
136
145
|
fi
|
|
137
146
|
|
|
138
147
|
|
|
148
|
+
ENTRY_FILE="$PROJECT_ROOT_DIR/index.js"
|
|
149
|
+
BUNDLE_COMMAND="react-native bundle"
|
|
150
|
+
|
|
151
|
+
# Auto-detect Expo project if not explicitly set by flag
|
|
152
|
+
if [ -f "$PROJECT_ROOT_DIR/app.json" ] || [ -f "$PROJECT_ROOT_DIR/app.config.js" ] || grep -q '"expo"' "$PROJECT_ROOT_DIR/package.json"; then
|
|
153
|
+
IS_EXPO_PROJECT=true
|
|
154
|
+
echo "Expo project detected automatically."
|
|
155
|
+
fi
|
|
156
|
+
|
|
157
|
+
if $IS_EXPO_PROJECT; then
|
|
158
|
+
if [ -f "$NODE_MODULES/expo-router/entry.js" ]; then
|
|
159
|
+
ENTRY_FILE="$NODE_MODULES/expo-router/entry.js"
|
|
160
|
+
elif [ -f "$NODE_MODULES/expo/AppEntry.js" ]; then
|
|
161
|
+
ENTRY_FILE="$NODE_MODULES/expo/AppEntry.js"
|
|
162
|
+
else
|
|
163
|
+
echo "Error: Could not find Expo entry file (expo-router/entry.js or expo/AppEntry.js)."
|
|
164
|
+
exit 1
|
|
165
|
+
fi
|
|
166
|
+
BUNDLE_COMMAND="expo export:embed"
|
|
167
|
+
fi
|
|
168
|
+
|
|
169
|
+
echo "Using entry file: $ENTRY_FILE"
|
|
170
|
+
if [ ! -f "$ENTRY_FILE" ]; then
|
|
171
|
+
echo "Error: Entry file '$ENTRY_FILE' does not exist."
|
|
172
|
+
exit 1
|
|
173
|
+
fi
|
|
174
|
+
|
|
139
175
|
echo "Generating the Android source map ..."
|
|
140
176
|
|
|
141
|
-
npx
|
|
177
|
+
npx $BUNDLE_COMMAND \
|
|
142
178
|
--platform android \
|
|
143
179
|
--dev false \
|
|
144
|
-
--entry-file "$
|
|
180
|
+
--entry-file "$ENTRY_FILE" \
|
|
145
181
|
--reset-cache \
|
|
146
182
|
--bundle-output "$ANDROID_PACKAGER_BUNDLE" \
|
|
147
183
|
--sourcemap-output "$ANDROID_PACKAGER_SOURCE_MAP" \
|
|
@@ -150,16 +186,15 @@ npx react-native bundle \
|
|
|
150
186
|
|
|
151
187
|
echo "Generating the iOS source map ..."
|
|
152
188
|
|
|
153
|
-
npx
|
|
189
|
+
npx $BUNDLE_COMMAND \
|
|
154
190
|
--platform ios \
|
|
155
191
|
--dev false \
|
|
156
|
-
--entry-file
|
|
192
|
+
--entry-file "$ENTRY_FILE" \
|
|
157
193
|
--reset-cache \
|
|
158
194
|
--bundle-output "$IOS_PACKAGER_BUNDLE" \
|
|
159
195
|
--sourcemap-output "$IOS_PACKAGER_SOURCE_MAP" \
|
|
160
196
|
--minify false > /dev/null 2>&1
|
|
161
197
|
|
|
162
|
-
|
|
163
198
|
if $USE_HERMES; then
|
|
164
199
|
|
|
165
200
|
echo "Hermes is enabled ..."
|
|
@@ -205,7 +240,7 @@ if $USE_HERMES; then
|
|
|
205
240
|
|
|
206
241
|
|
|
207
242
|
#
|
|
208
|
-
# For iOS, we're no longer using the hermes output concatenation,
|
|
243
|
+
# For iOS, we're no longer using the hermes output concatenation,
|
|
209
244
|
# even for hermes builds, as it produces incorrect sourcemaps.
|
|
210
245
|
#
|
|
211
246
|
|
|
@@ -220,7 +255,7 @@ if $USE_HERMES; then
|
|
|
220
255
|
|
|
221
256
|
#
|
|
222
257
|
# Compile the iOS code to bytecode and generate the Hermes sourcemap.
|
|
223
|
-
#
|
|
258
|
+
#
|
|
224
259
|
|
|
225
260
|
# "$HERMES_EXECUTABLE" \
|
|
226
261
|
# -O \
|
|
@@ -306,11 +341,11 @@ curl https://api.honeybadger.io/v1/source_maps \
|
|
|
306
341
|
-F minified_url="*/main.jsbundle" \
|
|
307
342
|
-F source_map=@"$IOS_FINAL_SOURCE_MAP" \
|
|
308
343
|
-F minified_file=@"$EMPTY_FILE" > /dev/null 2>&1
|
|
309
|
-
|
|
344
|
+
|
|
310
345
|
#
|
|
311
346
|
# Cleanup
|
|
312
347
|
#
|
|
313
348
|
|
|
314
349
|
rm -f "$ANDROID_FINAL_SOURCE_MAP" "$IOS_FINAL_SOURCE_MAP" "$EMPTY_FILE"
|
|
315
350
|
|
|
316
|
-
echo "Source maps uploaded to Honeybadger."
|
|
351
|
+
echo "Source maps uploaded to Honeybadger."
|