From 69e0fde44ac2985ae0985a643ca23d7aee742378 Mon Sep 17 00:00:00 2001 From: iChenLei Date: Mon, 16 May 2022 22:15:31 +0800 Subject: [PATCH 1/2] deps: drop safer-buffer --- lib/functions/image.js | 2 +- package-lock.json | 5 ----- package.json | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/functions/image.js b/lib/functions/image.js index 4b4789b2a..94f7a0660 100644 --- a/lib/functions/image.js +++ b/lib/functions/image.js @@ -12,7 +12,7 @@ var utils = require('../utils') , nodes = require('../nodes') - , Buffer = require('safer-buffer').Buffer + , Buffer = require('buffer').Buffer , fs = require('fs') , path = require('path') , sax = require('sax'); diff --git a/package-lock.json b/package-lock.json index 41283c8d9..9866b7a95 100644 --- a/package-lock.json +++ b/package-lock.json @@ -595,11 +595,6 @@ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", diff --git a/package.json b/package.json index 5a1cf168a..f76fdc456 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "css": "^3.0.0", "debug": "^4.3.2", "glob": "^7.1.6", - "safer-buffer": "^2.1.2", "sax": "~1.2.4", "source-map": "^0.7.3" }, From ee98bd8f0a8e9f5074305907caedbd9a4332e441 Mon Sep 17 00:00:00 2001 From: iChenLei Date: Mon, 16 May 2022 22:20:05 +0800 Subject: [PATCH 2/2] fix: missing require for buffer --- lib/visitor/sourcemapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/visitor/sourcemapper.js b/lib/visitor/sourcemapper.js index d01db98f1..0e081104d 100644 --- a/lib/visitor/sourcemapper.js +++ b/lib/visitor/sourcemapper.js @@ -9,7 +9,7 @@ */ var Compiler = require('./compiler') - , Buffer = require('safer-buffer').Buffer + , Buffer = require('buffer').Buffer , SourceMapGenerator = require('source-map').SourceMapGenerator , basename = require('path').basename , extname = require('path').extname