diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 40a8c9d..25fe8b5 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -61,37 +61,6 @@ jobs: with: url: https://brewmymac.sh expected_status: '[200]' - bugsnag: - runs-on: ubuntu-latest - needs: - - build - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - - name: Cache dependencies - id: cache-dependencies - uses: actions/cache@v3 - with: - key: ${{ runner.os }}-${{ hashFiles('**/package.json') }} - path: | - node_modules - ~/.npm - - name: Install dependencies - if: ${{ steps.cache-dependencies.outputs.cache-hit == false }} - run: npm i --legacy-peer-deps - - name: Restore the build - uses: actions/download-artifact@v3 - with: - name: build - path: build/ - - name: Upload source maps to Bugsnag - run: npx bugsnag-source-maps upload-browser --api-key ${{ secrets.REACT_APP_BUGSNAG_KEY }} --app-version ${{ github.event.release.tag_name }} --overwrite --directory build/static/js --base-url https://brewmymac.sh/static/js/ - env: - REACT_APP_BUGSNAG_KEY: ${{ secrets.REACT_APP_BUGSNAG_KEY }} sentry: runs-on: ubuntu-latest needs: @@ -120,13 +89,13 @@ jobs: name: build path: build/ - name: Create a new Sentry release - run: ./node_modules/.bin/sentry-cli releases new 1.0.8 + run: ./node_modules/.bin/sentry-cli releases new 1.0.9 env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_ORG: ${{ secrets.SENTRY_ORG }} SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} - name: Upload source maps to Sentry - run: ./node_modules/.bin/sentry-cli releases files 1.0.8 upload-sourcemaps build --rewrite + run: ./node_modules/.bin/sentry-cli releases files 1.0.9 upload-sourcemaps build --rewrite env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_ORG: ${{ secrets.SENTRY_ORG }} diff --git a/README.md b/README.md index 71dde1a..a70384f 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ You need [Node.js](https://nodejs.org) and [npm](https://www.npmjs.com) installe npm i --legacy-peer-deps ``` 2. Change the homepage URL in `package.json` to `.` -3. This app uses [Bugsnag](https://www.bugsnag.com) and [Sentry](https://sentry.io) to track errors and [Mixpanel](https://mixpanel.com) to track usage. You can [create a `.env` file](https://create-react-app.dev/docs/adding-custom-environment-variables/#adding-development-environment-variables-in-env) and adding your own keys by setting the `REACT_APP_MIXPANEL_TOKEN`, `REACT_APP_BUGSNAG_KEY` and `REACT_APP_SENTRY_DSN` environment variables. +3. This app uses [Sentry](https://sentry.io) to track errors and [Mixpanel](https://mixpanel.com) to track usage. You can [create a `.env` file](https://create-react-app.dev/docs/adding-custom-environment-variables/#adding-development-environment-variables-in-env) and adding your own keys by setting the `REACT_APP_MIXPANEL_TOKEN` and `REACT_APP_SENTRY_DSN` environment variables. 4. Start the development server ```bash npm start diff --git a/package.json b/package.json index a520362..bb9a466 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name" : "brew-my-mac", "description" : "Possibly the coolest way to install apps and customize your Mac!", - "version" : "1.0.8", + "version" : "1.0.9", "author" : { "name" : "Alan Tai" }, @@ -32,8 +32,6 @@ "update" : "npx npm-check-updates" }, "dependencies" : { - "@bugsnag/js" : "^7.17.4", - "@bugsnag/plugin-react" : "^7.17.4", "@emotion/react" : "^11.10.4", "@emotion/styled" : "^11.10.4", "@fontsource/inconsolata" : "^4.5.7", @@ -63,7 +61,6 @@ "@babel/preset-env" : "^7.19.1", "@babel/preset-typescript" : "^7.18.6", "@babel/runtime" : "^7.19.0", - "@bugsnag/source-maps" : "^2.3.1", "@sentry/cli" : "^2.5.2", "@testing-library/jest-dom" : "^5.16.5", "@testing-library/react" : "^13.4.0", diff --git a/src/App.tsx b/src/App.tsx index 66c4fec..e95bae6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,3 @@ -import Bugsnag from '@bugsnag/js'; -import BugsnagPluginReact from '@bugsnag/plugin-react'; import { Backdrop, Button, createTheme, CssBaseline, ThemeProvider, Typography, } from '@mui/material'; import * as Sentry from '@sentry/react'; import { BrowserTracing, } from '@sentry/tracing'; @@ -24,13 +22,6 @@ mixpanel.init(process.env.REACT_APP_MIXPANEL_TOKEN!, { debug : process.env.NODE_ENV !== 'production', }); -Bugsnag.start({ - apiKey : process.env.REACT_APP_BUGSNAG_KEY!, - plugins : [ - new BugsnagPluginReact(), - ], -}); - Sentry.init({ dsn : process.env.REACT_APP_SENTRY_DSN, environment : process.env.NODE_ENV, diff --git a/src/setupTests.ts b/src/setupTests.ts index afd5f44..ad05e5f 100644 --- a/src/setupTests.ts +++ b/src/setupTests.ts @@ -4,11 +4,6 @@ import fetchMock from 'jest-fetch-mock'; fetchMock.enableMocks(); -jest.mock('@bugsnag/js', () => ({ - start : () => {}, - notify : () => {}, -})); - jest.mock('mixpanel-browser', () => ({ init : () => {}, track : () => {}, diff --git a/src/utils/index.ts b/src/utils/index.ts index bd6f9e5..d372b79 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,9 +1,7 @@ -import Bugsnag from '@bugsnag/js'; import * as Sentry from '@sentry/react'; export const handleError = (error : any) => { if (process.env.NODE_ENV === 'production') { - Bugsnag.notify(error); Sentry.captureException(error); } else { console.error(error);