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

V7: Move context and breadcrumbs to private properties #681

Merged
merged 3 commits into from Dec 20, 2019

Conversation

bengourley
Copy link
Contributor

Per the spec, context and breadcrumbs should be private.

@bugsnagbot
Copy link
Collaborator

bugsnagbot commented Dec 19, 2019

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 40.45 kB 12.27 kB
After 40.70 kB 12.30 kB
± ⚠️ +252 bytes ⚠️ +34 bytes

Generated by 🚫 dangerJS against f4594c5

@bengourley bengourley marked this pull request as ready for review December 20, 2019 11:50
user: {
defaultValue: () => null,
message: '(object) user should be an object',
message: 'user should be an object',
Copy link
Contributor

Choose a reason for hiding this comment

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

Could remove 'user' here? I guess the context would be sufficient to know it was user? Also makes it consistent with the other messages and may save a byte if we're lucky!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

6 bytes after minification!

Comment on lines +82 to +88
getContext () {
return this._context
}

setContext (c) {
this._context = c
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these need adding to the public interface typedefs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah – I was in the middle of a big types refactor when I realised this change was needed, so they are in #682 to save a conflict!

@bengourley bengourley merged commit ab9478c into v7 Dec 20, 2019
@bengourley bengourley deleted the v7-client-state branch December 20, 2019 15:24
@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