kill-tabs 4.1.1 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli.js CHANGED
@@ -7,10 +7,11 @@ const cli = meow(`
7
7
  $ kill-tabs
8
8
 
9
9
  Options
10
- --no-chromium Don't kill tabs in Chromium
11
- --no-chrome Don't kill tabs in Chrome
12
- --no-brave Don't kill tabs in Brave
13
- --no-edge Don't kill tabs in Edge
10
+ --no-chromium Don't kill tabs in Chromium
11
+ --no-chrome Don't kill tabs in Chrome
12
+ --no-chrome-canary Don't kill tabs in Chrome Canary
13
+ --no-brave Don't kill tabs in Brave
14
+ --no-edge Don't kill tabs in Edge
14
15
  `, {
15
16
  importMeta: import.meta,
16
17
  flags: {
@@ -22,6 +23,10 @@ const cli = meow(`
22
23
  type: 'boolean',
23
24
  default: true,
24
25
  },
26
+ chromeCanary: {
27
+ type: 'boolean',
28
+ default: true,
29
+ },
25
30
  brave: {
26
31
  type: 'boolean',
27
32
  default: true,
package/index.js CHANGED
@@ -8,6 +8,7 @@ export default async function killTabs(options = {}) {
8
8
 
9
9
  const processes = {
10
10
  chrome: process.platform === 'darwin' ? 'Chrome Helper' : 'chrome',
11
+ chromeCanary: process.platform === 'darwin' ? 'Chrome Canary Helper' : 'chrome',
11
12
  chromium: process.platform === 'darwin' ? 'Chromium Helper' : 'chromium',
12
13
  brave: process.platform === 'darwin' ? 'Brave Browser Helper' : 'brave',
13
14
  edge: process.platform === 'darwin' ? 'Microsoft Edge Helper' : 'edge',
@@ -21,6 +22,10 @@ export default async function killTabs(options = {}) {
21
22
  delete processes.chrome;
22
23
  }
23
24
 
25
+ if (options.chromeCanary === false) {
26
+ delete processes.chromeCanary;
27
+ }
28
+
24
29
  if (options.brave === false) {
25
30
  delete processes.brave;
26
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kill-tabs",
3
- "version": "4.1.1",
3
+ "version": "4.2.0",
4
4
  "description": "Kill all Chrome tabs to improve performance, decrease battery usage, and save memory",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/kill-tabs",
@@ -13,6 +13,7 @@
13
13
  "type": "module",
14
14
  "bin": "./cli.js",
15
15
  "exports": "./index.js",
16
+ "sideEffects": false,
16
17
  "engines": {
17
18
  "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
18
19
  },
package/readme.md CHANGED
@@ -23,10 +23,11 @@ $ kill-tabs --help
23
23
  $ kill-tabs
24
24
 
25
25
  Options
26
- --no-chromium Don't kill tabs in Chromium
27
- --no-chrome Don't kill tabs in Chrome
28
- --no-brave Don't kill tabs in Brave
29
- --no-edge Don't kill tabs in Edge
26
+ --no-chromium Don't kill tabs in Chromium
27
+ --no-chrome Don't kill tabs in Chrome
28
+ --no-chrome-canary Don't kill tabs in Chrome Canary
29
+ --no-brave Don't kill tabs in Brave
30
+ --no-edge Don't kill tabs in Edge
30
31
  ```
31
32
 
32
33
  ## API
package/windows.js CHANGED
@@ -15,6 +15,10 @@ export default async function killTabs(options) {
15
15
  browsers.push('Caption=\'chrome.exe\'');
16
16
  }
17
17
 
18
+ if (options.chromeCanary && !options.chrome) {
19
+ browsers.push('Caption=\'chrome.exe\'');
20
+ }
21
+
18
22
  if (options.brave) {
19
23
  browsers.push('Caption=\'brave.exe\'');
20
24
  }