Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove padend dependency #242

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ sudo: false

language: node_js
node_js:
- "4.0.0"
- "4"
- "6"
- "8"
- "10"
- "11"
- "14"
- "16"
- "18"

script:
- npm test
Expand Down
3 changes: 1 addition & 2 deletions lib/run-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
const path = require("path")
const chalk = require("chalk")
const parseArgs = require("shell-quote").parse
const padEnd = require("string.prototype.padend")
const createHeader = require("./create-header")
const createPrefixTransform = require("./create-prefix-transform-stream")
const spawn = require("./spawn")
Expand Down Expand Up @@ -56,7 +55,7 @@ function wrapLabeling(taskName, source, labelState) {
return source
}

const label = padEnd(taskName, labelState.width)
const label = taskName.padEnd(labelState.width)
const color = source.isTTY ? selectColor(taskName) : (x) => x
const prefix = color(`[${label}] `)
const stream = createPrefixTransform(prefix, labelState)
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"docs"
],
"engines": {
"node": ">= 4"
"node": ">= 14"
},
"scripts": {
"_mocha": "mocha \"test/*.js\" --timeout 120000",
Expand All @@ -36,8 +36,7 @@
"minimatch": "^3.0.4",
"pidtree": "^0.3.0",
"read-pkg": "^3.0.0",
"shell-quote": "^1.6.1",
"string.prototype.padend": "^3.0.0"
"shell-quote": "^1.6.1"
},
"devDependencies": {
"@types/node": "^4.9.1",
Expand Down