From 53604b14dd86c398d012a8113fd459d9087d8ea2 Mon Sep 17 00:00:00 2001 From: PeterYinusa Date: Thu, 5 Jan 2023 20:27:06 +0000 Subject: [PATCH] Update policies policy updates Remove fast-json-patch exclusion run lavamoat:auto --- .iyarc | 10 ---------- lavamoat/browserify/beta/policy.json | 8 -------- lavamoat/browserify/flask/policy.json | 8 -------- lavamoat/browserify/main/policy.json | 8 -------- ...sactions-controller++fast-json-patch+3.1.0.patch | 13 ------------- patches/fast-json-patch+3.1.1.patch | 13 +++++++++++++ yarn.lock | 7 +------ 7 files changed, 14 insertions(+), 53 deletions(-) delete mode 100644 patches/@metamask+smart-transactions-controller++fast-json-patch+3.1.0.patch create mode 100644 patches/fast-json-patch+3.1.1.patch diff --git a/.iyarc b/.iyarc index 1d0f2111f..316510d7d 100644 --- a/.iyarc +++ b/.iyarc @@ -1,12 +1,2 @@ # improved-yarn-audit advisory exclusions GHSA-257v-vj4p-3w2h - -# yarn npm audit reports on a fast-json-patch version < 3.1.1 but due to patch -# resolution, the only version of fast-json-patch that we use is 3.1.1. We also -# have 2.2.1 installed but it is a dev only dependency. The "violation" reports -# smart-transacton-controller as the culprit but if you run -# `yarn info -A -R dependents fast-json-patch` you can see that only 2.2.1 and -# 3.3.1 are installed and that smart-transaction-controller resolves to the -# patched version of 3.3.1. We can remove this once the -# smart-transaction-controller updates its dependency. -GHSA-8gh8-hqwg-xf34 diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index de032a2d2..5d249535f 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -1306,14 +1306,6 @@ "define": true } }, - "@metamask/smart-transactions-controller>fast-json-patch": { - "globals": { - "addEventListener": true, - "clearTimeout": true, - "removeEventListener": true, - "setTimeout": true - } - }, "@metamask/snap-controllers>nanoid": { "globals": { "crypto.getRandomValues": true diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 79c338ab4..1c77e477d 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -1551,14 +1551,6 @@ "define": true } }, - "@metamask/smart-transactions-controller>fast-json-patch": { - "globals": { - "addEventListener": true, - "clearTimeout": true, - "removeEventListener": true, - "setTimeout": true - } - }, "@metamask/snap-controllers": { "globals": { "URL": true, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index de032a2d2..5d249535f 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -1306,14 +1306,6 @@ "define": true } }, - "@metamask/smart-transactions-controller>fast-json-patch": { - "globals": { - "addEventListener": true, - "clearTimeout": true, - "removeEventListener": true, - "setTimeout": true - } - }, "@metamask/snap-controllers>nanoid": { "globals": { "crypto.getRandomValues": true diff --git a/patches/@metamask+smart-transactions-controller++fast-json-patch+3.1.0.patch b/patches/@metamask+smart-transactions-controller++fast-json-patch+3.1.0.patch deleted file mode 100644 index 97762d5a9..000000000 --- a/patches/@metamask+smart-transactions-controller++fast-json-patch+3.1.0.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/node_modules/@metamask/smart-transactions-controller/node_modules/fast-json-patch/commonjs/helpers.js b/node_modules/@metamask/smart-transactions-controller/node_modules/fast-json-patch/commonjs/helpers.js -index 0ac28b4..d048c0a 100644 ---- a/node_modules/@metamask/smart-transactions-controller/node_modules/fast-json-patch/commonjs/helpers.js -+++ b/node_modules/@metamask/smart-transactions-controller/node_modules/fast-json-patch/commonjs/helpers.js -@@ -21,7 +21,7 @@ var _hasOwnProperty = Object.prototype.hasOwnProperty; - function hasOwnProperty(obj, key) { - return _hasOwnProperty.call(obj, key); - } --exports.hasOwnProperty = hasOwnProperty; -+Object.defineProperty(exports, "hasOwnProperty", { value: hasOwnProperty }); - function _objectKeys(obj) { - if (Array.isArray(obj)) { - var keys = new Array(obj.length); diff --git a/patches/fast-json-patch+3.1.1.patch b/patches/fast-json-patch+3.1.1.patch new file mode 100644 index 000000000..9a481f0cd --- /dev/null +++ b/patches/fast-json-patch+3.1.1.patch @@ -0,0 +1,13 @@ +diff --git a/node_modules/fast-json-patch/commonjs/helpers.js b/node_modules/fast-json-patch/commonjs/helpers.js +index 5f2350e..8894686 100644 +--- a/node_modules/fast-json-patch/commonjs/helpers.js ++++ b/node_modules/fast-json-patch/commonjs/helpers.js +@@ -21,7 +21,7 @@ var _hasOwnProperty = Object.prototype.hasOwnProperty; + function hasOwnProperty(obj, key) { + return _hasOwnProperty.call(obj, key); + } +-exports.hasOwnProperty = hasOwnProperty; ++Object.defineProperty(exports, "hasOwnProperty", { value: hasOwnProperty }); + function _objectKeys(obj) { + if (Array.isArray(obj)) { + var keys_1 = new Array(obj.length); diff --git a/yarn.lock b/yarn.lock index 04cafe80d..ca67a7279 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12119,12 +12119,7 @@ fast-json-patch@^2.0.6: dependencies: fast-deep-equal "^2.0.1" -fast-json-patch@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.0.tgz#ec8cd9b9c4c564250ec8b9140ef7a55f70acaee6" - integrity sha512-IhpytlsVTRndz0hU5t0/MGzS/etxLlfrpG5V5M9mVbuj9TrJLWaMfsox9REM5rkuGX0T+5qjpe8XA1o0gZ42nA== - -fast-json-patch@^3.1.1: +fast-json-patch@^3.1.0, fast-json-patch@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/fast-json-patch/-/fast-json-patch-3.1.1.tgz#85064ea1b1ebf97a3f7ad01e23f9337e72c66947" integrity sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==