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: rename "report" to "event" #646

Merged
merged 5 commits into from
Nov 15, 2019
Merged

V7: rename "report" to "event" #646

merged 5 commits into from
Nov 15, 2019

Conversation

bengourley
Copy link
Contributor

The construct represented by the "report" class in this codebase is now called "event" in the spec. This also now matches up with the concept of an "event" in our dashboard and other areas of the product.

There are changes to be made to its interface, but these will be included in subsequent PRs.

No functionality should have been changed here, literally just the naming.

@bugsnagbot
Copy link
Collaborator

bugsnagbot commented Nov 14, 2019

@bugsnag/browser bundle size diff

Minified Minfied + Gzipped
Before 40.62 kB 12.16 kB
After 40.59 kB 12.16 kB
± -26 bytes -3 bytes

Generated by 🚫 dangerJS against 5aa3bf2

This prerelease dependency which is not in git tree meant these packages got installed from npm
rather than symlinking locally – meaning the tests broke after the refactor.
Copy link
Contributor

@djskinner djskinner left a comment

Choose a reason for hiding this comment

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

There looks to be a couple more occurrences of report in the examples that might need looking at e.g. the line "you can record all kinds of events which will be sent along with error reports".

examples/typescript/src/app.ts Outdated Show resolved Hide resolved
packages/core/client.js Outdated Show resolved Hide resolved
packages/core/client.js Outdated Show resolved Hide resolved
packages/core/test/client.test.js Outdated Show resolved Hide resolved
packages/core/test/client.test.js Outdated Show resolved Hide resolved
sendReport: (report) => {
const evt = report.events[0]
sendEvent: (event) => {
const evt = event.events[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can an event can contain sub-events or is this a kind of naming conflict?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's a poor choice of name – the argument should be called payload

@@ -20,7 +20,7 @@
"author": "Bugsnag",
"license": "MIT",
"devDependencies": {
"@bugsnag/core": "^7.0.0-pre-alpha-ben.6",
"@bugsnag/core": "^6.4.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be part of this PR?

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 the explanation is in this commit: c342609

It was needed to ensure the tests pass.

@@ -20,7 +20,7 @@
"author": "Bugsnag",
"license": "MIT",
"devDependencies": {
"@bugsnag/core": "^7.0.0-pre-alpha-ben.6",
"@bugsnag/core": "^6.4.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be part of this PR?

packages/plugin-server-session/session.js Outdated Show resolved Hide resolved
@bengourley
Copy link
Contributor Author

There looks to be a couple more occurrences of report in the examples that might need looking at

I left these in on purpose – we still "report errors" (the spec even has a section called "reporting errors") – it's just the construct in code which has changed.

I'll address all your other comments though, they're useful 👍

- disambiguate event/payload sendEvent argument in tests
- fix grammar
- fix overzealous find and
replaces
@bengourley bengourley merged commit b6749e4 into v7 Nov 15, 2019
@bengourley bengourley deleted the v7-rename-report-event branch November 15, 2019 16:13
@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.

3 participants