From 622f8ceab8bea15a568ef974d3f0d794312ad29d Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Thu, 5 Sep 2019 19:57:35 +0200 Subject: [PATCH] chore: remove extra hash-sum dependency --- lib/manifest/module.js | 2 +- lib/onesignal/module.js | 4 ++-- package.json | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/manifest/module.js b/lib/manifest/module.js index d1b56125..e9641441 100755 --- a/lib/manifest/module.js +++ b/lib/manifest/module.js @@ -1,4 +1,4 @@ -const hash = require('hash-sum') +const hash = require('hasha') const { joinUrl, getRouteParams, find } = require('../utils') diff --git a/lib/onesignal/module.js b/lib/onesignal/module.js index b5ae7aa2..a9261f4a 100755 --- a/lib/onesignal/module.js +++ b/lib/onesignal/module.js @@ -1,6 +1,6 @@ const path = require('path') const { writeFileSync, readFileSync } = require('fs') -const hashSum = require('hash-sum') +const hasha = require('hasha') const defu = require('defu') const { getRouteParams, joinUrl } = require('../utils') @@ -52,7 +52,7 @@ function addOneSignal (oneSignalOptions) { } else { // Use OneSignalSDK.js from Dist const OneSignalSDKJS = readFileSync(path.resolve(__dirname, 'dist/OneSignalSDK.js')) - const OneSignalSDKHash = hashSum(OneSignalSDKJS) + const OneSignalSDKHash = hasha(OneSignalSDKJS) const OneSignalSDKFile = `ons.${OneSignalSDKHash}.js` options.OneSignalSDK = joinUrl(publicPath, OneSignalSDKFile) diff --git a/package.json b/package.json index 86aa1013..2a96d411 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "defu": "^0.0.3", "execa": "^1.0.0", "fs-extra": "^8.1.0", - "hash-sum": "^2.0.0", "hasha": "^5.0.0", "jimp-compact": "^0.6.8", "lodash.template": "^4.5.0",