Skip to content

Commit 1035146

Browse files
committed
fix: remove eval from lodash
1 parent df683b5 commit 1035146

4 files changed

Lines changed: 31 additions & 15 deletions

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@
8484
},
8585
"pnpm": {
8686
"patchedDependencies": {
87-
"lodash-es": "patches/lodash-es.patch"
87+
"lodash-es": "patches/lodash-es.patch",
88+
"lodash": "patches/lodash.patch"
8889
}
8990
}
9091
}

patches/lodash-es.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
diff --git a/_root.js b/_root.js
2-
index 281f81280ec9ea137b644ba60b9f5c6ccede4f88..50794b2f18753bc10862ab0d67a6119a9210453e 100644
2+
index 281f81280ec9ea137b644ba60b9f5c6ccede4f88..0cba20dc0f35d7a883a2f90684230ad3dc40c197 100644
33
--- a/_root.js
44
+++ b/_root.js
55
@@ -4,6 +4,6 @@ import freeGlobal from './_freeGlobal.js';
66
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
77

88
/** Used as a reference to the global object. */
99
-var root = freeGlobal || freeSelf || Function('return this')();
10-
+var root = freeGlobal || freeSelf;
10+
+var root = freeGlobal || freeSelf || window;
1111

1212
export default root;

patches/lodash.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/_root.js b/_root.js
2+
index d2852bed4d2e469b3b87ed31df2350047e005ff4..6ea47914730240d0a3a02b0cab58a2622ffae456 100644
3+
--- a/_root.js
4+
+++ b/_root.js
5+
@@ -4,6 +4,6 @@ var freeGlobal = require('./_freeGlobal');
6+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
7+
8+
/** Used as a reference to the global object. */
9+
-var root = freeGlobal || freeSelf || Function('return this')();
10+
+var root = freeGlobal || freeSelf || window;
11+
12+
module.exports = root;

pnpm-lock.yaml

Lines changed: 15 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)