Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fkill

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fkill - npm Package Compare versions

Comparing version 7.2.1 to 8.0.0

70

index.d.ts

@@ -1,40 +0,38 @@

declare namespace fkill {
interface Options {
/**
Force kill the processes.
export interface Options {
/**
Force kill the processes.
@default false
*/
readonly force?: boolean;
@default false
*/
readonly force?: boolean;
/**
Force kill processes that did not exit within the given number of milliseconds.
/**
Force kill processes that did not exit within the given number of milliseconds.
@default undefined
*/
readonly forceAfterTimeout?: number;
@default undefined
*/
readonly forceAfterTimeout?: number;
/**
Kill all child processes along with the parent process. _(Windows only)_
/**
Kill all child processes along with the parent process. _(Windows only)_
@default true
*/
readonly tree?: boolean;
@default true
*/
readonly tree?: boolean;
/**
Ignore capitalization when killing a process.
/**
Ignore capitalization when killing a process.
Note that the case is always ignored on Windows.
Note that the case is always ignored on Windows.
@default false
*/
readonly ignoreCase?: boolean;
@default false
*/
readonly ignoreCase?: boolean;
/**
Suppress all error messages. For example: `Process doesn't exist`.
/**
Suppress all error messages. For example: `Process doesn't exist`.
@default false
*/
readonly silent?: boolean;
}
@default false
*/
readonly silent?: boolean;
}

@@ -49,8 +47,6 @@

```
import fkill = require('fkill');
import fkill from 'fkill';
(async () => {
await fkill(1337);
console.log('Killed process');
})();
await fkill(1337);
console.log('Killed process');

@@ -63,7 +59,5 @@ fkill('Safari');

*/
declare function fkill(
export default function fkill(
input: number | string | ReadonlyArray<string | number>,
options?: fkill.Options
options?: Options
): Promise<void>;
export = fkill;

@@ -1,9 +0,8 @@

'use strict';
const arrify = require('arrify');
const taskkill = require('taskkill');
const execa = require('execa');
const AggregateError = require('aggregate-error');
const pidPort = require('pid-port');
const processExists = require('process-exists');
const psList = require('ps-list');
import process from 'node:process';
import taskkill from 'taskkill';
import execa from 'execa';
import AggregateError from 'aggregate-error';
import {portToPid} from 'pid-port';
import processExists from 'process-exists';
import psList from 'ps-list';

@@ -40,3 +39,3 @@ // If we check too soon, we're unlikely to see process killed so we essentially wait 3*ALIVE_CHECK_MIN_INTERVAL before the second check while producing unnecessary load.

force: options.force,
tree: typeof options.tree === 'undefined' ? true : options.tree
tree: typeof options.tree === 'undefined' ? true : options.tree,
});

@@ -102,3 +101,3 @@ } catch (error) {

if (typeof input === 'string' && input[0] === ':') {
return pidPort.portToPid(Number.parseInt(input.slice(1), 10));
return portToPid(Number.parseInt(input.slice(1), 10));
}

@@ -129,4 +128,4 @@

const fkill = async (inputs, options = {}) => {
inputs = arrify(inputs);
export default async function fkill(inputs, options = {}) {
inputs = [inputs].flat();

@@ -150,5 +149,3 @@ const exists = await processExists.all(inputs);

await Promise.all(
inputs.map(input => handleKill(input))
);
await Promise.all(inputs.map(input => handleKill(input)));

@@ -190,4 +187,2 @@ if (errors.length > 0 && !options.silent) {

}
};
module.exports = fkill;
}
{
"name": "fkill",
"version": "7.2.1",
"version": "8.0.0",
"description": "Fabulously kill processes. Cross-platform.",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
},
"repository": "sindresorhus/fkill",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {

@@ -15,4 +13,6 @@ "name": "Sindre Sorhus",

},
"type": "module",
"exports": "./index.js",
"engines": {
"node": ">=10"
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},

@@ -44,18 +44,17 @@ "scripts": {

"dependencies": {
"aggregate-error": "^3.1.0",
"arrify": "^2.0.1",
"execa": "^5.0.0",
"pid-port": "^0.1.0",
"process-exists": "^4.0.0",
"aggregate-error": "^4.0.0",
"execa": "^5.1.1",
"pid-port": "^0.2.0",
"process-exists": "^4.1.0",
"ps-list": "^7.2.0",
"taskkill": "^3.1.0"
"taskkill": "^4.0.0"
},
"devDependencies": {
"ava": "^2.4.0",
"delay": "^4.4.0",
"get-port": "^5.1.1",
"noop-process": "^4.0.0",
"tsd": "^0.14.0",
"xo": "^0.36.1"
"ava": "^3.15.0",
"delay": "^5.0.0",
"get-port": "^6.0.0",
"noop-process": "^5.0.0",
"tsd": "^0.18.0",
"xo": "^0.45.0"
}
}

@@ -15,5 +15,5 @@ <h1 align="center">

```sh
npm install fkill
```
$ npm install fkill
```

@@ -23,8 +23,6 @@ ## Usage

```js
const fkill = require('fkill');
import fkill from 'fkill';
(async () => {
await fkill(1337);
console.log('Killed process');
})();
await fkill(1337);
console.log('Killed process');

@@ -31,0 +29,0 @@ fkill('Safari');

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc