From e63fc8d27fbf11d1b46ee8b7dab8a2f57fdf2fe4 Mon Sep 17 00:00:00 2001 From: Wilson Lin Date: Wed, 22 Jun 2022 02:31:10 +1000 Subject: [PATCH] Fix Node.js postinstall --- nodejs/package.json | 4 +++- nodejs/postinstall.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nodejs/package.json b/nodejs/package.json index c32afa5..f87b0de 100644 --- a/nodejs/package.json +++ b/nodejs/package.json @@ -32,9 +32,11 @@ "node": ">= 8.6.0" }, "homepage": "https://github.com/wilsonzlin/minify-html#readme", + "dependencies": { + "cargo-cp-artifact": "^0.1" + }, "devDependencies": { "@types/node": "^14.6.0", - "cargo-cp-artifact": "^0.1", "shx": "^0.3.4" }, "keywords": [ diff --git a/nodejs/postinstall.js b/nodejs/postinstall.js index b83fb22..1d096ee 100644 --- a/nodejs/postinstall.js +++ b/nodejs/postinstall.js @@ -46,7 +46,7 @@ const downloadNativeBinary = async () => { throw e; } - fs.writeFileSync(binaryPath, zlib.gunzipSync(binary)); + fs.writeFileSync(binaryPath, binary); break; } };