diff --git a/index.js b/index.js index 94aa03a..c72c82d 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,5 @@ const fs = require('fs') const path = require('path') -const fromEntries = require('fromentries') // Update package.json function updatePkg(dir, fn) { @@ -26,7 +25,7 @@ function updatePkg(dir, fn) { // Update pkg.scripts names function updateScripts(pkg, fn) { - pkg.scripts = fromEntries( + pkg.scripts = Object.fromEntries( Object.entries(pkg.scripts).map(([key, value]) => [fn(key), value]) ) } diff --git a/package-lock.json b/package-lock.json index 46077bd..f3f43da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,6 @@ "version": "2.1.6", "hasInstallScript": true, "license": "MIT", - "dependencies": { - "fromentries": "^1.3.2" - }, "bin": { "pinst": "bin.js" }, @@ -3046,25 +3043,6 @@ "node": ">=0.10.0" } }, - "node_modules/fromentries": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", - "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -9521,11 +9499,6 @@ "map-cache": "^0.2.2" } }, - "fromentries": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", - "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==" - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", diff --git a/package.json b/package.json index b4d89ef..e0c7403 100644 --- a/package.json +++ b/package.json @@ -37,9 +37,6 @@ "url": "https://github.com/typicode/pinst/issues" }, "homepage": "https://github.com/typicode/pinst#readme", - "dependencies": { - "fromentries": "^1.3.2" - }, "devDependencies": { "eslint": "^7.18.0", "eslint-config-prettier": "^8.0.0", @@ -52,7 +49,7 @@ "tempy": "^1.0.0" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.0.0" }, "jest": { "testURL": "http://localhost/"