Update dependency web-vitals to v2.0.1 (#10646)
* Update dependency web-vitals to v2.0.1 * Revert mocks for web-vitals now that the library has been patched Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Mathieu Pillard <mpillard@mozilla.com>
This commit is contained in:
Родитель
87af2abc44
Коммит
0242b29090
|
@ -237,7 +237,7 @@
|
|||
"url-loader": "4.1.1",
|
||||
"utf8": "3.0.0",
|
||||
"uuid": "8.3.2",
|
||||
"web-vitals": "2.0.0",
|
||||
"web-vitals": "2.0.1",
|
||||
"webpack-isomorphic-tools": "4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -88,20 +88,6 @@ global.fetch = (input) => {
|
|||
);
|
||||
};
|
||||
|
||||
// web-vitals library needs window.performance with getEntriesByName()
|
||||
if (global.performance) {
|
||||
if (global.performance.getEntriesByName) {
|
||||
// If global.performance.getEntriesByName exists, that means we probably
|
||||
// no longer need to mock it because it has been implemented in jsdom.
|
||||
// throw an error so we can update the code.
|
||||
throw new Error(
|
||||
`Mocking of performance.getEntriesByName() seems to no longer be
|
||||
necessary and should probably be removed`,
|
||||
);
|
||||
}
|
||||
global.performance.getEntriesByName = jest.fn().mockReturnValue([]);
|
||||
}
|
||||
|
||||
afterEach(() => {
|
||||
global.sinon.restore();
|
||||
});
|
||||
|
|
|
@ -13232,10 +13232,10 @@ watchpack@^2.0.0:
|
|||
glob-to-regexp "^0.4.1"
|
||||
graceful-fs "^4.1.2"
|
||||
|
||||
web-vitals@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-2.0.0.tgz#7fcfb5fd2f439c2936822573cb4d5e8e4caaa22b"
|
||||
integrity sha512-aCB1sYxt2eeBufybFRrDQNBg2cOcq2f6Q1He7T+qPHAwpodDXhAoWwBUavwppQQ4kfUcT5eIAfjPc9PdqAxPEw==
|
||||
web-vitals@2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-2.0.1.tgz#d122720bd9c8dd69792b19c0f6ab0346861a880f"
|
||||
integrity sha512-niqKyp2T6xF9EzSi+xx+V6qitE0YfagzfUmDAa9qeCrIVeyfzQQ85Uy0ykeRlEVDCCqkhYccoUunNf9ZIQcvtA==
|
||||
|
||||
webidl-conversions@^4.0.2:
|
||||
version "4.0.2"
|
||||
|
|
Загрузка…
Ссылка в новой задаче