1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00
metamask-extension/patches/inline-source-map+0.6.2.patch
Mark Stacey 506fa2d744
Fix Buffer warnings during build (#10495)
The warnings about use of the unsafe Buffer constructor have been
addressed by package updates and patches.

The updates were:
 * `gulp-sourcemaps` was updated from v2 to v3, and was patched to
replace remaining uses of the `Buffer` constructor
   * Upstream PR: https://github.com/gulp-sourcemaps/gulp-sourcemaps/pull/388
 * The transitive dependency `yazl` was updated from v2.4.3 to v2.5.1
in the lockfile.
 * The abandoned packages `combine-source-map` and `inline-source-map`
were patched.
2021-09-27 19:05:35 -02:30

14 lines
503 B
Diff

diff --git a/node_modules/inline-source-map/index.js b/node_modules/inline-source-map/index.js
index df74d61..7641aad 100644
--- a/node_modules/inline-source-map/index.js
+++ b/node_modules/inline-source-map/index.js
@@ -91,7 +91,7 @@ Generator.prototype.addSourceContent = function (sourceFile, sourcesContent) {
*/
Generator.prototype.base64Encode = function () {
var map = this.toString();
- return new Buffer(map).toString('base64');
+ return Buffer.from(map).toString('base64');
};
/**