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

feat(browser): Integrate maxEvents functionality with new interface #727

Merged
merged 1 commit into from Feb 5, 2020

Conversation

bengourley
Copy link
Contributor

  • Ensure counts can be reset via the static interface as well as the client instance
  • Rename refresh->resetEventCount
  • Add method to type definitions

- Ensure counts can be reset via the static interface as well as the client instance
- Rename refresh->resetEventCount
- Add method to type definitions
@@ -68,6 +68,9 @@ declare class Client {
public use(plugin: Plugin, ...args: any[]): Client;
public getPlugin(name: string): any;

// implemented on the browser notifier only
public resetEventCount?(): void;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This seemed like the most reasonable way to implement this. If I did something like class BrowserClient extends Client to add the method only for the browser, it upsets the "universal" interface. Specifically it upset the Angular plugin which does import { Client } from '@bugsnag/js' – it doesn't know if Client should be a Client or BrowserClient since it can be run in Node or Browser.

@bugsnagbot
Copy link
Collaborator

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 41.83 kB 12.60 kB
After 41.88 kB 12.61 kB
± ⚠️ +52 bytes ⚠️ +11 bytes

Generated by 🚫 dangerJS against f0828bd

@bengourley bengourley merged commit f976738 into v7 Feb 5, 2020
@bengourley bengourley deleted the v7-max-events branch February 5, 2020 10:21
@bengourley bengourley mentioned this pull request Apr 14, 2020
Merged
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