From 6b1b61bfdf29ef2987547864df34a4ff08cc80de Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Tue, 28 May 2024 21:04:30 +0100 Subject: [PATCH 1/2] fix: ffi process.stdout._handle.setBlocking(true) --- package.json | 2 +- src/ffi/index.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d255b459..9953dc44 100644 --- a/package.json +++ b/package.json @@ -134,7 +134,7 @@ "build": "tsc --project tsconfig.build.json", "prerelease": "npm run snyk-protect", "release": "commit-and-tag-version", - "test": "cross-env LOG_LEVEL=debug PACT_DO_NOT_TRACK=true mocha \"{src,test,bin,standalone}/**/*.spec.ts\"", + "test": "cross-env LOG_LEVEL=trace PACT_DO_NOT_TRACK=true mocha \"{src,test,bin,standalone}/**/*.spec.ts\"", "snyk-protect": "snyk-protect", "format:base": "prettier --parser typescript", "format:check": "npm run format:base -- --list-different \"{src,standalone,bin,test}/**/*.{ts,tsx}\"", diff --git a/src/ffi/index.ts b/src/ffi/index.ts index 14b7bd98..fcb86875 100644 --- a/src/ffi/index.ts +++ b/src/ffi/index.ts @@ -88,6 +88,9 @@ let ffi: typeof ffiLib; let ffiLogLevel: LogLevel; const initialiseFfi = (logLevel: LogLevel): typeof ffi => { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + process.stdout._handle.setBlocking(true) logger.debug(`Initalising native core at log level '${logLevel}'`); ffiLogLevel = logLevel; try { From 3733314635f2c47d4b2b7e73a7522753da581821 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Tue, 28 May 2024 21:11:27 +0100 Subject: [PATCH 2/2] chore: format fix --- src/ffi/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ffi/index.ts b/src/ffi/index.ts index fcb86875..7dc5e975 100644 --- a/src/ffi/index.ts +++ b/src/ffi/index.ts @@ -89,8 +89,8 @@ let ffiLogLevel: LogLevel; const initialiseFfi = (logLevel: LogLevel): typeof ffi => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore - process.stdout._handle.setBlocking(true) + // @ts-ignore + process.stdout._handle.setBlocking(true); logger.debug(`Initalising native core at log level '${logLevel}'`); ffiLogLevel = logLevel; try {