From 0ba097b117000a3a2c2b4f2feaa683585b7ab0ab Mon Sep 17 00:00:00 2001 From: Iain Reid Date: Tue, 21 Apr 2020 20:52:42 +0000 Subject: [PATCH 1/2] chore: Remove right-pad as a dependency Given that "padEnd()" has been around for a while, this is a housekeeping commit to remove an extraneous dependency. --- package-lock.json | 8 ++++++++ package.json | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 751dfbe4..8173160f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -551,10 +551,18 @@ "requires": { "@commitlint/load": ">6.1.1", "chalk": "^2.4.1", + "conventional-commit-types": "^2.0.0", "lodash.map": "^4.5.1", "longest": "^2.0.1", "right-pad": "^1.0.1", "word-wrap": "^1.0.3" + }, + "dependencies": { + "conventional-commit-types": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/conventional-commit-types/-/conventional-commit-types-2.3.0.tgz", + "integrity": "sha512-6iB39PrcGYdz0n3z31kj6/Km6mK9hm9oMRhwcLnKxE7WNoeRKZbTAobliKrbYZ5jqyCvtcVEfjCiaEzhL3AVmQ==" + } } }, "debug": { diff --git a/package.json b/package.json index c477e4fa..87ffbd5e 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "conventional-commit-types": "^3.0.0", "lodash.map": "^4.5.1", "longest": "^2.0.1", - "right-pad": "^1.0.1", "word-wrap": "^1.0.3" }, "devDependencies": { From 47b946406fba5a08cff04dd750d0609ae8c4a0c4 Mon Sep 17 00:00:00 2001 From: Iain Reid Date: Tue, 21 Apr 2020 20:55:31 +0000 Subject: [PATCH 2/2] chore: Remove usage of right-pad Replace the usage of the right-pad dependency with "padEnd()". --- engine.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/engine.js b/engine.js index 873778a4..75dac053 100644 --- a/engine.js +++ b/engine.js @@ -3,7 +3,6 @@ var wrap = require('word-wrap'); var map = require('lodash.map'); var longest = require('longest'); -var rightPad = require('right-pad'); var chalk = require('chalk'); var filter = function(array) { @@ -43,7 +42,7 @@ module.exports = function(options) { var length = longest(Object.keys(types)).length + 1; var choices = map(types, function(type, key) { return { - name: rightPad(key + ':', length) + ' ' + type.description, + name: (key + ':').padEnd(length) + ' ' + type.description, value: key }; });