From 5be4f01bc746b5b4cfb1df10def3abc5632c44ee Mon Sep 17 00:00:00 2001 From: "S. Amir Mohammad Najafi" Date: Wed, 3 Jan 2024 14:36:32 +0330 Subject: [PATCH] feat(engine): use alwatr exit hook --- packages/engine/package.json | 4 ++-- packages/engine/src/alwatr-store.ts | 2 +- yarn.lock | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/engine/package.json b/packages/engine/package.json index e5979ec5..edb997d7 100644 --- a/packages/engine/package.json +++ b/packages/engine/package.json @@ -60,12 +60,12 @@ "clean": "rm -rfv dist *.tsbuildinfo" }, "dependencies": { + "@alwatr/exit-hook": "^1.0.1", "@alwatr/flat-string": "^1.0.10", "@alwatr/logger": "^2.4.1", "@alwatr/store-reference": "workspace:^", "@alwatr/store-types": "workspace:^", - "@alwatr/wait": "^1.1.1", - "exit-hook": "^4.0.0" + "@alwatr/wait": "^1.1.1" }, "devDependencies": { "@alwatr/nano-build": "^1.2.2", diff --git a/packages/engine/src/alwatr-store.ts b/packages/engine/src/alwatr-store.ts index 025e1726..f8ab845a 100644 --- a/packages/engine/src/alwatr-store.ts +++ b/packages/engine/src/alwatr-store.ts @@ -1,3 +1,4 @@ +import {exitHook} from '@alwatr/exit-hook'; import {CollectionReference, DocumentReference, getStoreId, getStorePath} from '@alwatr/store-reference'; import { StoreFileType, @@ -11,7 +12,6 @@ import { } from '@alwatr/store-types'; import {Dictionary} from '@alwatr/type-helper'; import {waitForTimeout} from '@alwatr/wait'; -import exitHook from 'exit-hook'; import {WriteFileMode, existsSync, readJsonFile, resolve, unlink, writeJsonFile} from './lib/node-fs.js'; import {logger} from './logger.js'; diff --git a/yarn.lock b/yarn.lock index ceb5021f..a128aff6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -27,6 +27,13 @@ __metadata: languageName: node linkType: hard +"@alwatr/exit-hook@npm:^1.0.1": + version: 1.0.1 + resolution: "@alwatr/exit-hook@npm:1.0.1" + checksum: 1ebb2d3fb6e764bf08c9dec89dcf622139253b35a8a08cca8bb9488c0d6ac25f198747d25bd55b76a5aeb8464405813b8f95303842cfdb4e2acb92eb39c63283 + languageName: node + linkType: hard + "@alwatr/flat-string@npm:^1.0.10": version: 1.0.10 resolution: "@alwatr/flat-string@npm:1.0.10" @@ -70,6 +77,7 @@ __metadata: version: 0.0.0-use.local resolution: "@alwatr/store-engine@workspace:packages/engine" dependencies: + "@alwatr/exit-hook": "npm:^1.0.1" "@alwatr/flat-string": "npm:^1.0.10" "@alwatr/logger": "npm:^2.4.1" "@alwatr/nano-build": "npm:^1.2.2" @@ -80,7 +88,6 @@ __metadata: "@alwatr/type-helper": "npm:^1.0.1" "@alwatr/wait": "npm:^1.1.1" "@types/node": "npm:^20.10.6" - exit-hook: "npm:^4.0.0" typescript: "npm:^5.3.3" languageName: unknown linkType: soft @@ -2658,13 +2665,6 @@ __metadata: languageName: node linkType: hard -"exit-hook@npm:^4.0.0": - version: 4.0.0 - resolution: "exit-hook@npm:4.0.0" - checksum: 7fb33eaeb9050aee9479da9c93d42b796fb409c40e1d2b6ea2f40786ae7d7db6dc6a0f6ecc7bc24e479f957b7844bcb880044ded73320334743c64e3ecef48d7 - languageName: node - linkType: hard - "exponential-backoff@npm:^3.1.1": version: 3.1.1 resolution: "exponential-backoff@npm:3.1.1"