From 904b672c7ea0717ff315d4609f7057ce4c7b5448 Mon Sep 17 00:00:00 2001 From: tawseefnabi Date: Sat, 9 Aug 2025 11:52:23 +0530 Subject: [PATCH] fix(typescript): resolve TS2595 import error by updating config and imports --- test/transport/module-link.test.js | 4 ++-- tsconfig.json | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/transport/module-link.test.js b/test/transport/module-link.test.js index 2210b8735..44748812e 100644 --- a/test/transport/module-link.test.js +++ b/test/transport/module-link.test.js @@ -121,7 +121,7 @@ test('pino({ transport })', { skip: isWin || isYarnPnp }, async ({ same, teardow const toRun = join(folder, 'index.js') const toRunContent = ` - const pino = require('pino') + const pino = require('pino').default const logger = pino({ transport: { target: 'transport', @@ -198,7 +198,7 @@ test('pino({ transport }) from a wrapped dependency', { skip: isWin || isYarnPnp const wrapped = join(wrappedFolder, 'index.js') const wrappedContent = ` - const pino = require('pino') + const pino = require('pino').default const getCaller = require('get-caller-file') module.exports = function build () { diff --git a/tsconfig.json b/tsconfig.json index 9c80d8f11..52d3ae547 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,14 @@ { "compilerOptions": { "target": "es6", - "lib": [ "es2015", "dom" ], + "lib": ["es2015", "dom"], "module": "commonjs", + "moduleResolution": "node", "noEmit": true, "strict": true, - "esModuleInterop": true + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true }, "exclude": [ "./test/types/*.test-d.ts",