Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Dec 27, 2020
1 parent c33026b commit e4fe55a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
11 changes: 6 additions & 5 deletions interactive.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const psList = require('ps-list');
const numSort = require('num-sort');
const escExit = require('esc-exit');
const cliTruncate = require('cli-truncate');
const pidFromPort = require('pid-from-port');
const pidFromPort = require('pid-port');
const fkill = require('fkill');

const isWindows = process.platform === 'win32';
Expand Down Expand Up @@ -81,13 +81,14 @@ const filterProcesses = (input, processes, flags) => {
process_.name.endsWith('Helper') ||
process_.name.endsWith('HelperApp')
))
// eslint-disable-next-line unicorn/no-fn-reference-in-iterator
.filter(flags.verbose ? filters.verbose : filters.name)
.sort(preferHeurisicallyInterestingProcesses)
.map(process_ => {
const renderPercentage = percents => {
const digits = Math.floor(percents * 10).toString().padStart(2, '0');
const whole = digits.slice(0, digits.length - 1);
const fraction = digits.slice(digits.length - 1);
const whole = digits.slice(0, -1);
const fraction = digits.slice(-1);
return fraction === '0' ? `${whole}%` : `${whole}.${fraction}%`;
};

Expand Down Expand Up @@ -143,7 +144,7 @@ const listProcesses = async (processes, flags) => {

try {
await fkill(answer.processes);
} catch (_) {
} catch {
handleFkillError(answer.processes);
}
};
Expand All @@ -164,7 +165,7 @@ const init = async flags => {
};

const [pids, processes] = await Promise.all([
pidFromPort.list(),
pidFromPort.all(),
psList({all: false})
]);

Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,24 @@
"proc"
],
"dependencies": {
"chalk": "^3.0.0",
"chalk": "^4.1.0",
"cli-truncate": "^2.1.0",
"esc-exit": "^2.0.0",
"fkill": "^7.0.0",
"inquirer": "^7.0.4",
"inquirer-autocomplete-prompt": "^1.0.1",
"meow": "^6.0.0",
"num-sort": "^2.0.0",
"pid-from-port": "^1.1.1",
"ps-list": "^6.2.0"
"esc-exit": "^2.0.2",
"fkill": "^7.1.0",
"inquirer": "^7.3.3",
"inquirer-autocomplete-prompt": "^1.3.0",
"meow": "^8.1.0",
"num-sort": "^2.1.0",
"pid-port": "^0.1.0",
"ps-list": "^7.2.0"
},
"devDependencies": {
"ava": "^1.4.0",
"delay": "^4.1.0",
"execa": "^4.0.0",
"ava": "^2.4.0",
"delay": "^4.4.0",
"execa": "^5.0.0",
"get-port": "^5.1.1",
"noop-process": "^4.0.0",
"process-exists": "^4.0.0",
"xo": "^0.25.4"
"xo": "^0.36.1"
}
}

0 comments on commit e4fe55a

Please sign in to comment.