Skip to content

Commit

Permalink
Merge branch 'next' into je/plat-11399-bugsnag-cli-rn-ios
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Edney committed Jan 30, 2024
2 parents 676cf2a + 2115ba1 commit ecf659b
Show file tree
Hide file tree
Showing 287 changed files with 64,284 additions and 17,936 deletions.
4 changes: 4 additions & 0 deletions .buildkite/basic/react-native-android-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ steps:
service-ports: true
command:
- --app=build/rn0.72-old-arch.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_12
- --a11y-locator
Expand All @@ -105,6 +107,8 @@ steps:
service-ports: true
command:
- --app=build/rn0.72-new-arch.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_12
- --a11y-locator
Expand Down
22 changes: 22 additions & 0 deletions .buildkite/full/react-native-android-pipeline.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ steps:
service-ports: true
command:
- --app=build/rn0.60.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -257,6 +259,8 @@ steps:
service-ports: true
command:
- --app=build/rn0.66.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -282,6 +286,8 @@ steps:
service-ports: true
command:
- --app=build/rn0.67.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -308,6 +314,8 @@ steps:
service-ports: true
command:
- --app=build/rn0.69.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -334,6 +342,8 @@ steps:
service-ports: true
command:
- --app=build/rn0.68-hermes.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -360,6 +370,8 @@ steps:
service-ports: true
command:
- --app=build/rn0.71-old-arch.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_12
- --a11y-locator
Expand All @@ -386,6 +398,8 @@ steps:
service-ports: true
command:
- --app=build/rn0.71-new-arch.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_12
- --a11y-locator
Expand All @@ -412,6 +426,8 @@ steps:
service-ports: true
command:
- --app=build/r_navigation_0.60.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -436,6 +452,8 @@ steps:
service-ports: true
command:
- --app=build/r_navigation_0.69.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -460,6 +478,8 @@ steps:
service-ports: true
command:
- --app=build/r_native_navigation_0.60.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -484,6 +504,8 @@ steps:
service-ports: true
command:
- --app=build/r_native_navigation_0.66.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand Down
20 changes: 20 additions & 0 deletions .buildkite/full/react-native-cli-pipeline.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,8 @@ steps:
service-ports: true
command:
- --app=build/rn0_60.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -610,6 +612,8 @@ steps:
service-ports: true
command:
- --app=build/rn0_61.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -633,6 +637,8 @@ steps:
service-ports: true
command:
- --app=build/rn0_62.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -656,6 +662,8 @@ steps:
service-ports: true
command:
- --app=build/rn0_63.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -679,6 +687,8 @@ steps:
service-ports: true
command:
- --app=build/rn0_63_expo_ejected.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -702,6 +712,8 @@ steps:
service-ports: true
command:
- --app=build/rn0_64.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -725,6 +737,8 @@ steps:
service-ports: true
command:
- --app=build/rn0_65.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -748,6 +762,8 @@ steps:
service-ports: true
command:
- --app=build/rn0_66.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -771,6 +787,8 @@ steps:
service-ports: true
command:
- --app=build/rn0_67.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand All @@ -794,6 +812,8 @@ steps:
service-ports: true
command:
- --app=build/rn0_69.apk
- --app-activity=com.reactnative.MainActivity
- --app-package=com.reactnative
- --farm=bb
- --device=ANDROID_10|ANDROID_11|ANDROID_12
- --a11y-locator
Expand Down
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,24 @@

## TBD

- (react-native) Update bugsnag-cocoa from v6.27.3 to [v6.28.0](https://github.com/bugsnag/bugsnag-cocoa/blob/master/CHANGELOG.md#6280-2023-12-13)
### Changed

- (react-native) Update bugsnag-android from v5.31.3 to [v5.32.1](https://github.com/bugsnag/bugsnag-android/blob/v5.32.1/CHANGELOG.md#5321-2024-01-23)

### Fixed

- (plugin-vue) Handle updated Vue error info URL [#2068](https://github.com/bugsnag/bugsnag-js/pull/2068)
- (react-native) Publish xcprivacy file from vendored bugsnag-cocoa [#2072](https://github.com/bugsnag/bugsnag-js/pull/2072)

## v7.22.3 (2024-01-03)

### Changed

- (react-native) Update bugsnag-cocoa from v6.27.3 to [v6.28.0](https://github.com/bugsnag/bugsnag-cocoa/blob/master/CHANGELOG.md#6280-2023-12-13) (includes compliance with Apple's Required Reasons API – see [online docs](https://docs.bugsnag.com/platforms/ios/appstore-privacy/#declaring-required-reasons-for-api-usage))

### Fixed

- (plugin-vue) Fix errorInfo metadata in Vue 3.4+ [#2062](https://github.com/bugsnag/bugsnag-js/pull/2062)

## v7.22.2 (2023-11-21)

Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ AWS_ACCESS_KEY_ID=xxx \
AWS_SECRET_ACCESS_KEY=xxx \
RELEASE_BRANCH=master \
VERSION=patch \
DIST_TAG=latest \
docker-compose run release
```

Expand Down Expand Up @@ -142,6 +143,7 @@ AWS_ACCESS_KEY_ID=xxx \
AWS_SECRET_ACCESS_KEY=xxx \
RELEASE_BRANCH=master \
VERSION=preminor \
DIST_TAG=next \
docker-compose run release
```
Expand All @@ -165,6 +167,8 @@ GITHUB_ACCESS_TOKEN=<generate a personal access token> \
AWS_ACCESS_KEY_ID=xxx \
AWS_SECRET_ACCESS_KEY=xxx \
RELEASE_BRANCH=master \
VERSION=patch \
DIST_TAG=latest \
RETRY_PUBLISH=1 \
FORCE_CDN_UPLOAD=1 \
docker-compose run release
Expand Down
31 changes: 17 additions & 14 deletions bin/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ if [[ -z ${GITHUB_USER:-} ]]; then error_missing_field "GITHUB_USER"; fi
if [[ -z ${GITHUB_ACCESS_TOKEN:-} ]]; then error_missing_field "GITHUB_ACCESS_TOKEN"; fi
if [[ -z ${RELEASE_BRANCH:-} ]]; then error_missing_field "RELEASE_BRANCH"; fi
if [[ -z ${VERSION:-} ]]; then error_missing_field "VERSION"; fi
if [[ -z ${DIST_TAG:-} ]]; then error_missing_field "DIST_TAG"; fi
if [[ -z ${AWS_ACCESS_KEY_ID:-} ]]; then error_missing_field "AWS_ACCESS_KEY_ID"; fi
if [[ -z ${AWS_SECRET_ACCESS_KEY:-} ]]; then error_missing_field "AWS_SECRET_ACCESS_KEY"; fi
if [[ -z ${AWS_SESSION_TOKEN:-} ]]; then error_missing_field "AWS_SESSION_TOKEN"; fi
Expand All @@ -26,6 +27,16 @@ cd /app/bugsnag-js
npm ci
npm run bootstrap -- --ci

# check if CDN packages changed – if they didn't we don't need to upload to the CDN
BROWSER_PACKAGE_CHANGED=$(npx lerna changed --parseable | grep -c packages/js$ || test $? = 1;)
WORKER_PACKAGE_CHANGED=$(npx lerna changed --parseable | grep -c packages/web-worker$ || test $? = 1;)

# increment package version numbers
if [ -z "${RETRY_PUBLISH:-}" ]; then
npx lerna version "$VERSION" --no-push
fi

# build packages
npx lerna run build \
--scope @bugsnag/node \
--scope @bugsnag/browser
Expand All @@ -36,22 +47,14 @@ npx lerna run build \
--ignore @bugsnag/plugin-electron-app \
--ignore @bugsnag/plugin-electron-client-state-persistence

# check if CDN packages changed – if they didn't we don't need to upload to the CDN
BROWSER_PACKAGE_CHANGED=$(npx lerna changed --parseable | grep -c packages/js$ || test $? = 1;)
WORKER_PACKAGE_CHANGED=$(npx lerna changed --parseable | grep -c packages/web-worker$ || test $? = 1;)
# push local changes and tags
git push origin --follow-tags

# publish
if [ -v RETRY_PUBLISH ]; then
npx lerna publish from-package
else
case $VERSION in
"prerelease" | "prepatch" | "preminor" | "premajor")
npx lerna publish "$VERSION" --dist-tag next
;;

*)
npx lerna publish "$VERSION"
;;
esac
npx lerna publish from-package --dist-tag "$DIST_TAG"
else
npx lerna publish from-git --dist-tag "$DIST_TAG"
fi

if [ "$BROWSER_PACKAGE_CHANGED" -eq 1 ] || [ -v FORCE_CDN_UPLOAD ]; then
Expand Down
3 changes: 3 additions & 0 deletions examples/js/gatsby/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.cache
public
4 changes: 4 additions & 0 deletions examples/js/gatsby/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
.cache/
public
src/gatsby-types.d.ts
12 changes: 12 additions & 0 deletions examples/js/gatsby/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:18
ARG GATSBY_BUGSNAG_API_KEY

WORKDIR /usr/src/app

COPY package* /usr/src/app/
RUN npm install

COPY . /usr/src/app/
RUN npm run build

CMD npm run serve -- --host 0.0.0.0
40 changes: 40 additions & 0 deletions examples/js/gatsby/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Gatsby

This is an example project showing how to use `@bugsnag/js` with a Gatsby application.

In this example the Bugsnag notifier is only initialized in the browser using the `onClientEntry` hook. Uploading of source maps is also demonstrated using the `onCreateWebpackConfig` hook.

## Usage

Clone the repo and `cd` into the directory of this example:

```
git clone [email protected]:bugsnag/bugsnag-js.git --recursive
cd bugsnag-js/examples/js/gatsby
```

Use the instructions below to run the application.

Once started, it will serve a page at http://localhost:9000 with buttons that cause the app to send various errors.

### With docker

The project includes a `Dockerfile`. If you're familiar with docker, this is the easiest way to start the example. Otherwise, skip ahead to the [without docker](#without-docker) section.

```
docker build --build-arg GATSBY_BUGSNAG_API_KEY=YOUR_API_KEY -t bugsnag-js-example-gatsby .
docker run -p 9000:9000 -it bugsnag-js-example-gatsby
```

__Note__: remember to replace `YOUR_API_KEY` in the command with your own!

### Without docker

Ensure you have a version of Node.js >=14 on your machine.

```
npm install
GATSBY_BUGSNAG_API_KEY=YOUR_API_KEY npm start
```

__Note__: remember to replace `YOUR_API_KEY` in the command with your own!
Loading

0 comments on commit ecf659b

Please sign in to comment.