Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .yarn/patches/lodash-npm-4.17.21-6382451519.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
diff --git a/_PATCH.txt b/_PATCH.txt
new file mode 100644
index 0000000000000000000000000000000000000000..94d9729bdc09c57a213683e048f1edb9b0d8fe42
--- /dev/null
+++ b/_PATCH.txt
@@ -0,0 +1,2 @@
+This patch fixes a bug in Lodash when it's run in a contentscript on Firefox.
+See here for details: https://github.com/lodash/lodash/issues/5934
diff --git a/_freeGlobal.js b/_freeGlobal.js
index bbec998fc8cbaaeec1f848017aa8e232d4d419eb..37addf20c9846f1729b83c67746714e6bcc6565d 100644
--- a/_freeGlobal.js
+++ b/_freeGlobal.js
@@ -1,4 +1,4 @@
/** Detect free variable `global` from Node.js. */
-var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+var freeGlobal = typeof globalThis == 'object' && globalThis && globalThis.Object === Object && globalThis;

module.exports = freeGlobal;
diff --git a/core.js b/core.js
index be1d567d629fdfda05efcaa6adfb480d93702889..c74af2204241654129a4b8d9bc8e1ad235c464f1 100644
--- a/core.js
+++ b/core.js
@@ -62,7 +62,7 @@
};

/** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+ var freeGlobal = typeof globalThis == 'object' && globalThis && globalThis.Object === Object && globalThis;

/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
diff --git a/lodash.js b/lodash.js
index 4131e936cd1e0521ac7be3a9d4bfb9f1fdb35462..5febc1c8b908871a65db4ffcc8ed4a42f9c648be 100644
--- a/lodash.js
+++ b/lodash.js
@@ -427,7 +427,7 @@
freeParseInt = parseInt;

/** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
+ var freeGlobal = typeof globalThis == 'object' && globalThis && globalThis.Object === Object && globalThis;

/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
4 changes: 2 additions & 2 deletions lavamoat/browserify/beta/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -1301,15 +1301,15 @@
"setTimeout": true
},
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/controller-utils>@metamask/ethjs-unit": true,
"@metamask/utils": true,
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"bn.js": true,
"browserify>buffer": true,
"cockatiel": true,
"eth-ens-namehash": true,
"eslint>fast-deep-equal": true
"eslint>fast-deep-equal": true,
"lodash": true
}
},
"@metamask/delegation-controller": {
Expand Down
4 changes: 2 additions & 2 deletions lavamoat/browserify/experimental/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -1301,15 +1301,15 @@
"setTimeout": true
},
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/controller-utils>@metamask/ethjs-unit": true,
"@metamask/utils": true,
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"bn.js": true,
"browserify>buffer": true,
"cockatiel": true,
"eth-ens-namehash": true,
"eslint>fast-deep-equal": true
"eslint>fast-deep-equal": true,
"lodash": true
}
},
"@metamask/delegation-controller": {
Expand Down
4 changes: 2 additions & 2 deletions lavamoat/browserify/flask/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -1301,15 +1301,15 @@
"setTimeout": true
},
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/controller-utils>@metamask/ethjs-unit": true,
"@metamask/utils": true,
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"bn.js": true,
"browserify>buffer": true,
"cockatiel": true,
"eth-ens-namehash": true,
"eslint>fast-deep-equal": true
"eslint>fast-deep-equal": true,
"lodash": true
}
},
"@metamask/delegation-controller": {
Expand Down
4 changes: 2 additions & 2 deletions lavamoat/browserify/main/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -1301,15 +1301,15 @@
"setTimeout": true
},
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/controller-utils>@metamask/ethjs-unit": true,
"@metamask/utils": true,
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"bn.js": true,
"browserify>buffer": true,
"cockatiel": true,
"eth-ens-namehash": true,
"eslint>fast-deep-equal": true
"eslint>fast-deep-equal": true,
"lodash": true
}
},
"@metamask/delegation-controller": {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@
"@ledgerhq/errors": "^6.21.0",
"nanoid@npm:^5.1.5": "^3.3.8",
"tar-fs@npm:^2.1.0": "^2.1.3",
"lodash.memoize@npm:^4.1.2": "patch:lodash.memoize@npm%3A4.1.2#~/.yarn/patches/lodash.memoize-npm-4.1.2-0e6250041f.patch"
"lodash.memoize@npm:^4.1.2": "patch:lodash.memoize@npm%3A4.1.2#~/.yarn/patches/lodash.memoize-npm-4.1.2-0e6250041f.patch",
"lodash": "patch:lodash@npm%3A4.17.21#~/.yarn/patches/lodash-npm-4.17.21-6382451519.patch"
},
"dependencies": {
"@babel/runtime": "patch:@babel/runtime@npm%3A7.25.9#~/.yarn/patches/@babel-runtime-npm-7.25.9-fe8c62510a.patch",
Expand Down Expand Up @@ -271,7 +272,7 @@
"@metamask/browser-passworder": "^4.3.0",
"@metamask/chain-agnostic-permission": "^0.8.0",
"@metamask/contract-metadata": "^2.5.0",
"@metamask/controller-utils": "^11.9.0",
"@metamask/controller-utils": "^11.11.0",
"@metamask/delegation-controller": "^0.4.0",
"@metamask/delegation-deployments": "^0.11.0",
"@metamask/design-system-react": "^0.1.0",
Expand Down
23 changes: 15 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5751,24 +5751,24 @@ __metadata:
languageName: node
linkType: hard

"@metamask/controller-utils@npm:^11.0.0, @metamask/controller-utils@npm:^11.10.0, @metamask/controller-utils@npm:^11.3.0, @metamask/controller-utils@npm:^11.5.0, @metamask/controller-utils@npm:^11.6.0, @metamask/controller-utils@npm:^11.9.0":
version: 11.10.0
resolution: "@metamask/controller-utils@npm:11.10.0"
"@metamask/controller-utils@npm:^11.0.0, @metamask/controller-utils@npm:^11.10.0, @metamask/controller-utils@npm:^11.11.0, @metamask/controller-utils@npm:^11.3.0, @metamask/controller-utils@npm:^11.5.0, @metamask/controller-utils@npm:^11.6.0, @metamask/controller-utils@npm:^11.9.0":
version: 11.11.0
resolution: "@metamask/controller-utils@npm:11.11.0"
dependencies:
"@ethereumjs/util": "npm:^9.1.0"
"@metamask/eth-query": "npm:^4.0.0"
"@metamask/ethjs-unit": "npm:^0.3.0"
"@metamask/utils": "npm:^11.2.0"
"@metamask/utils": "npm:^11.4.2"
"@spruceid/siwe-parser": "npm:2.1.0"
"@types/bn.js": "npm:^5.1.5"
bignumber.js: "npm:^9.1.2"
bn.js: "npm:^5.2.1"
cockatiel: "npm:^3.1.2"
eth-ens-namehash: "npm:^2.0.8"
fast-deep-equal: "npm:^3.1.3"
lodash: "npm:^4.17.21"
peerDependencies:
"@babel/runtime": ^7.0.0
checksum: 10/e563d1705ddba1b4cf2903827bd9a47d95700b150e17d3c5b57dcdd9b51d3f8e2bee9daaa6d2d5718beba3e28498be06d308daba2c294adf0716bb34894d0c96
checksum: 10/9b4ac01beb7359fea6da869117be69f8973d2d0e190469773b5f2726b86ccf0150d455bf8b19e9aa0504228fb2fb5fb7e9334a66df83cd2d02a4c84f250dad5a
languageName: node
linkType: hard

Expand Down Expand Up @@ -31104,13 +31104,20 @@ __metadata:
languageName: node
linkType: hard

"lodash@npm:4.17.21, lodash@npm:^4, lodash@npm:^4.16.4, lodash@npm:^4.17.11, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21, lodash@npm:^4.17.4, lodash@npm:^4.7.0":
"lodash@npm:4.17.21":
version: 4.17.21
resolution: "lodash@npm:4.17.21"
checksum: 10/c08619c038846ea6ac754abd6dd29d2568aa705feb69339e836dfa8d8b09abbb2f859371e86863eda41848221f9af43714491467b5b0299122431e202bb0c532
languageName: node
linkType: hard

"lodash@patch:lodash@npm%3A4.17.21#~/.yarn/patches/lodash-npm-4.17.21-6382451519.patch":
version: 4.17.21
resolution: "lodash@patch:lodash@npm%3A4.17.21#~/.yarn/patches/lodash-npm-4.17.21-6382451519.patch::version=4.17.21&hash=a39172"
checksum: 10/c9fdcf4cf6440e980aaa687aa7a787afb4563502c28e88eb230c3adfac0aa6b2ccb96aaf4a17c0148c3daa2d8cc83edad8ecedd8ed64a615b47f07b0f484cd9c
languageName: node
linkType: hard

"log-symbols@npm:4.1.0, log-symbols@npm:^4.0.0, log-symbols@npm:^4.1.0":
version: 4.1.0
resolution: "log-symbols@npm:4.1.0"
Expand Down Expand Up @@ -31952,7 +31959,7 @@ __metadata:
"@metamask/build-utils": "npm:^3.0.0"
"@metamask/chain-agnostic-permission": "npm:^0.8.0"
"@metamask/contract-metadata": "npm:^2.5.0"
"@metamask/controller-utils": "npm:^11.9.0"
"@metamask/controller-utils": "npm:^11.11.0"
"@metamask/delegation-controller": "npm:^0.4.0"
"@metamask/delegation-deployments": "npm:^0.11.0"
"@metamask/design-system-react": "npm:^0.1.0"
Expand Down
Loading