-
Notifications
You must be signed in to change notification settings - Fork 396
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
Add the ReportCallback
type back but deprecate it
#483
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tunetheweb
approved these changes
May 20, 2024
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.
LGTM with one suggestion.
reefdog
added a commit
to PhilanthropyDataCommons/front-end
that referenced
this pull request
May 20, 2024
Web Vitals v3 deprecated several methods and types, and v4 fully removed them. This commit adapts our code to the breaking changes. Note that the breaking removal of the `ReportHandler` type has been complained about[1] and may return in deprecated form[2], but we should go ahead and replace it anyway with the suggested inline typedef. [1] GoogleChrome/web-vitals#482 [2] GoogleChrome/web-vitals#483 PR #745 Bump web-vitals from 3.5.2 to 4.0.0
Co-authored-by: Barry Pollard <barrypollard@google.com>
brendankenny
approved these changes
May 21, 2024
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.
yutakusuno
added a commit
to yutakusuno/world-weather-map
that referenced
this pull request
May 22, 2024
yutakusuno
added a commit
to yutakusuno/world-weather-map
that referenced
this pull request
May 22, 2024
* --- updated-dependencies: - dependency-name: web-vitals dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build: Fix reportWebVitals to use MetricType type GoogleChrome/web-vitals#483 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Yuta Kusuno <yutakusuno51@gmail.com>
philipwalton
changed the title
Add ReportCallback type back but deprecate it
Add the May 22, 2024
ReportCallback
type back but deprecate it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #482 by re-adding the
ReportCallback
type but marking it as deprecated.In most cases developers should not need to explicitly type their metric function callbacks (e.g. the type can be inferred from usage), but in the event that you do, the recommended replacement for
ReportCallback
is either:(meric: LCPMetric) => void
, or(metric: MetricType) => void
The
MetricType
type can be imported as follows: