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
Conversation
68c2370
to
9e32476
Compare
packages/core/config.js
Outdated
user: { | ||
defaultValue: () => null, | ||
message: '(object) user should be an object', | ||
message: 'user should be an object', |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6 bytes after minification!
getContext () { | ||
return this._context | ||
} | ||
|
||
setContext (c) { | ||
this._context = c | ||
} |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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!
Per the spec, context and breadcrumbs should be private.