From 9f04070e71d0bb645cc400c024faa060628733f9 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Fri, 23 Feb 2024 06:25:33 +0000 Subject: [PATCH] chore(test): remove polyfill-crypto.getrandomvalues --- package.json | 1 - test/helpers/setup-helper.js | 2 +- yarn.lock | 12 +----------- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 46fe970bb36c..a1a7028ad2de 100644 --- a/package.json +++ b/package.json @@ -572,7 +572,6 @@ "nock": "^13.2.9", "node-fetch": "^2.6.1", "nyc": "^15.1.0", - "polyfill-crypto.getrandomvalues": "^1.0.0", "postcss": "^8.4.32", "postcss-rtlcss": "^4.0.9", "prettier": "^2.7.1", diff --git a/test/helpers/setup-helper.js b/test/helpers/setup-helper.js index a5597f4d431c..98994a8fe037 100644 --- a/test/helpers/setup-helper.js +++ b/test/helpers/setup-helper.js @@ -111,7 +111,7 @@ if (!window.crypto) { } if (!window.crypto.getRandomValues) { // eslint-disable-next-line node/global-require - window.crypto.getRandomValues = require('polyfill-crypto.getrandomvalues'); + window.crypto.getRandomValues = require('crypto').webcrypto.getRandomValues; } // TextEncoder/TextDecoder diff --git a/yarn.lock b/yarn.lock index 7452cd7ffde6..191f5edb7f8e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -25436,7 +25436,7 @@ __metadata: languageName: node linkType: hard -"mersenne-twister@npm:^1.0.1, mersenne-twister@npm:^1.1.0": +"mersenne-twister@npm:^1.1.0": version: 1.1.0 resolution: "mersenne-twister@npm:1.1.0" checksum: 1123526199091097102f2f91639ad7d5b3df4b098de9a4a72c835920e11ef0ce08e25737d5af1d363325a60da8804365eae8a41e03b7a46a1acc22e18fa8f261 @@ -25739,7 +25739,6 @@ __metadata: nyc: "npm:^15.1.0" obj-multiplex: "npm:^1.0.0" pify: "npm:^5.0.0" - polyfill-crypto.getrandomvalues: "npm:^1.0.0" postcss: "npm:^8.4.32" postcss-rtlcss: "npm:^4.0.9" prettier: "npm:^2.7.1" @@ -28682,15 +28681,6 @@ __metadata: languageName: node linkType: hard -"polyfill-crypto.getrandomvalues@npm:^1.0.0": - version: 1.0.0 - resolution: "polyfill-crypto.getrandomvalues@npm:1.0.0" - dependencies: - mersenne-twister: "npm:^1.0.1" - checksum: 73f0880b022af0c5930ef2d34a83a25e03196081082d8ceb204a3e5609a1a3d0dd1656a183073b17bc069a2c5749e44689cebdc4254dae6ed7e4e8b83f451964 - languageName: node - linkType: hard - "pony-cause@npm:^2.1.10": version: 2.1.10 resolution: "pony-cause@npm:2.1.10"