-
Notifications
You must be signed in to change notification settings - Fork 251
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: Metadata refactor #658
Conversation
0121ff2
to
0673f15
Compare
0673f15
to
30718ae
Compare
30718ae
to
75de94c
Compare
CHANGELOG.md
Outdated
@@ -12,6 +12,7 @@ | |||
- Update signature of `notify(err, opts?, cb?)` -> `notify(err, onError?, cb?)` for a canonical way to update events [#655](https://github.com/bugsnag/bugsnag-js/pull/655) | |||
- Simplify client configuration, and store resulting config privately [#656](https://github.com/bugsnag/bugsnag-js/pull/656) | |||
- User is now stored privately on `client` and `event` and updated via get/set methods [#657](https://github.com/bugsnag/bugsnag-js/pull/657) | |||
- Rename `metaData` -> `metadata` and add consistent `add/get/clearMetaData()` methods to `Client`/`Event` for manipulating metadata explicitly, rather than mutating a property [#658](https://github.com/bugsnag/bugsnag-js/pull/658) |
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.
add/get/clearMetaData()
-> add/get/clearMetadata()
packages/core/test/event.test.js
Outdated
}) | ||
}) | ||
|
||
describe('event.clearMetadata()', () => { |
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.
describe('event.clearMetadata()'
-> describe('event.addMetadata()'
export interface NotifyOpts { | ||
context?: string; | ||
device?: object; | ||
request?: object; | ||
user?: object; | ||
metaData?: object; | ||
severity?: "info" | "warning" | "error"; | ||
onError?: OnError; | ||
} |
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.
Is this removal intended as part of this PR?
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.
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.
Can leave it in this PR for me, just wanted to be sure it was right.
metaData
->metadata
_metadata
and remove from the public interfaceadd/get/clearMetadata()
methods via a shared delegate toEvent
andClient