From 5725cebec015b90a33c17a8f684bd345dc239934 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Sun, 24 Apr 2022 20:11:21 +0200 Subject: chore(deps): remove ms to reduce dependency count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We can trivially do what it does, and removing it reduces the amount of external dependencies running in the security-sensitive context of the main process. Signed-off-by: Kristóf Marussy --- packages/main/src/reactions/synchronizeConfig.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'packages/main/src/reactions/synchronizeConfig.ts') diff --git a/packages/main/src/reactions/synchronizeConfig.ts b/packages/main/src/reactions/synchronizeConfig.ts index 9436c16..adbe712 100644 --- a/packages/main/src/reactions/synchronizeConfig.ts +++ b/packages/main/src/reactions/synchronizeConfig.ts @@ -21,7 +21,6 @@ import deepEqual from 'deep-equal'; import { debounce } from 'lodash-es'; import { reaction } from 'mobx'; -import ms from 'ms'; import type ConfigRepository from '../infrastructure/config/ConfigRepository'; import type SharedStore from '../stores/SharedStore'; @@ -29,14 +28,14 @@ import type Config from '../stores/config/Config'; import type Disposer from '../utils/Disposer'; import { getLogger } from '../utils/log'; -const DEFAULT_CONFIG_DEBOUNCE_TIME = ms('1s'); +const DEFAULT_CONFIG_DEBOUNCE_TIME_MS = 1000; const log = getLogger('synchronizeConfig'); export default async function synchronizeConfig( sharedStore: SharedStore, repository: ConfigRepository, - debounceTime: number = DEFAULT_CONFIG_DEBOUNCE_TIME, + debounceTime: number = DEFAULT_CONFIG_DEBOUNCE_TIME_MS, ): Promise { let lastConfigOnDisk: Config | undefined; -- cgit v1.2.3-70-g09d2