There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix(electron): use tree-kill for electron dev (#5252)
Peng Xiaoe8cfc807ea2c
diff --git a/packages/frontend/electron/package.json b/packages/frontend/electron/package.jsonindex 4eb74bdc3b..c71646a3d7 100644--- a/packages/frontend/electron/package.json+++ b/packages/frontend/electron/package.json@@ -63,6 +63,7 @@"rxjs": "^7.8.1","semver": "^7.5.4","tinykeys": "^2.1.0",+ "tree-kill": "^1.2.2","ts-node": "^10.9.1","undici": "^6.0.0","uuid": "^9.0.1",diff --git a/packages/frontend/electron/scripts/dev.ts b/packages/frontend/electron/scripts/dev.tsindex fa22326a49..afba0df2df 100644--- a/packages/frontend/electron/scripts/dev.ts+++ b/packages/frontend/electron/scripts/dev.ts@@ -4,6 +4,7 @@ import { resolve } from 'node:path';import type { ChildProcessWithoutNullStreams } from 'child_process';import type { BuildContext } from 'esbuild';import * as esbuild from 'esbuild';+import kill from 'tree-kill';import { config, electronDir, rootDir } from './common';@@ -24,9 +25,9 @@ function spawnOrReloadElectron() {if (watchMode) {return;}- if (spawnProcess !== null) {+ if (spawnProcess !== null && spawnProcess.pid) {spawnProcess.off('exit', process.exit);- spawnProcess.kill('SIGINT');+ kill(spawnProcess.pid);spawnProcess = null;}diff --git a/yarn.lock b/yarn.lockindex e3055874a6..8b8fb22c56 100644--- a/yarn.lock+++ b/yarn.lock@@ -499,6 +499,7 @@ __metadata:rxjs: "npm:^7.8.1"semver: "npm:^7.5.4"tinykeys: "npm:^2.1.0"+ tree-kill: "npm:^1.2.2"ts-node: "npm:^10.9.1"undici: "npm:^6.0.0"uuid: "npm:^9.0.1"