From 23ad6a1150377afcd0e805e8dbea5406a433f26b Mon Sep 17 00:00:00 2001 From: Ofer <12687466+CptSchnitz@users.noreply.github.com> Date: Sun, 22 Dec 2024 09:55:48 +0200 Subject: [PATCH 1/2] build!: added engine setting to package.json --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index a684724..bfc848e 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,9 @@ "publishConfig": { "access": "public" }, + "engines": { + "node": ">=20" + }, "homepage": "https://github.com/MapColonies/js-logger#readme", "devDependencies": { "@commitlint/cli": "^19.5.0", From b74ccbdaa7247748dcca9038cd061da51c40b4ee Mon Sep 17 00:00:00 2001 From: CptSchnitz <12687466+CptSchnitz@users.noreply.github.com> Date: Sun, 22 Dec 2024 15:00:16 +0200 Subject: [PATCH 2/2] test: increased timeout to ensure tests pass --- tests/index.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/index.spec.ts b/tests/index.spec.ts index d95d1a6..bc63913 100644 --- a/tests/index.spec.ts +++ b/tests/index.spec.ts @@ -16,7 +16,7 @@ describe('jsLogger', function () { logger.info('avi'); // Wait for the log to be written - await setTimeout(0); + await setTimeout(0.1); const logLine = JSON.parse(readFileSync('avi.log', { encoding: 'utf-8' })) as Record; expect(logLine).toHaveProperty('msg', 'avi'); @@ -28,7 +28,7 @@ describe('jsLogger', function () { logger.info('avi'); // Wait for the log to be written - await setTimeout(0); + await setTimeout(0.1); const logLine = JSON.parse(readFileSync('avi-base.log', { encoding: 'utf-8' })) as Record; @@ -42,7 +42,7 @@ describe('jsLogger', function () { logger.info('avi'); // Wait for the log to be written - await setTimeout(0); + await setTimeout(0.1); const logLine = JSON.parse(readFileSync('avi-caller.log', { encoding: 'utf-8' })) as Record;