Skip to content
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

Create web-worker package #1896

Merged
merged 18 commits into from
Jan 20, 2023

Conversation

gingerbenw
Copy link
Member

Goal

To support the ability to use bugsnag within a web worker or service worker, including background scripts in chrome extensions

Design

The browser notifier is bundled with many plugins which are either unnecessary, or would need to be rewritten to support service workers, so a new simple worker notifier provides the opportunity to define worker related features off of a stable base

Changeset

  • new web-worker notifier package

Testing

  • Added unit tests web-worker package
  • Added end to end tests for web-worker package

@github-actions
Copy link

github-actions bot commented Jan 9, 2023

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 43.43 kB 13.34 kB
After 43.45 kB 13.36 kB
± ⚠️ +17 bytes ⚠️ +20 bytes

code coverage diff

<temporarily disabled>

Generated by 🚫 dangerJS against a8a9f32

@gingerbenw gingerbenw force-pushed the web-worker-package branch 2 times, most recently from 62d9486 to 544af03 Compare January 9, 2023 16:25
@gingerbenw gingerbenw marked this pull request as ready for review January 9, 2023 16:33
packages/plugin-browser-device/device.js Outdated Show resolved Hide resolved
packages/web-worker/README.md Outdated Show resolved Hide resolved
packages/web-worker/README.md Outdated Show resolved Hide resolved
packages/web-worker/README.md Outdated Show resolved Hide resolved
packages/web-worker/TODO.md Outdated Show resolved Hide resolved
packages/web-worker/package.json Outdated Show resolved Hide resolved
packages/web-worker/src/notifier.js Outdated Show resolved Hide resolved
packages/web-worker/types/notifier.ts Outdated Show resolved Hide resolved
@gingerbenw gingerbenw changed the base branch from fetch-delivery-plugin to integration/service-worker-support January 17, 2023 17:38
packages/plugin-browser-device/device.js Outdated Show resolved Hide resolved
packages/plugin-browser-device/device.js Outdated Show resolved Hide resolved
packages/web-worker/README.md Outdated Show resolved Hide resolved
}
```

Within a web worker, unhandled errors will also bubble up to the script that initialized the worker, so if you are also using BugSnag in the parent script, you may wish to prevent these errors from being reported a second time:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth just replacing this paragraph and snippet with a link to the docs.

gingerbenw and others added 2 commits January 19, 2023 15:04
Co-authored-by: Joe Haines <hello@joehaines.co.uk>
@gingerbenw gingerbenw merged commit 03af027 into integration/service-worker-support Jan 20, 2023
@gingerbenw gingerbenw mentioned this pull request Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants