From 77992756b092bdc9e48373318a25233d2ab740dd Mon Sep 17 00:00:00 2001 From: Kirill Belyakov Date: Fri, 7 Aug 2026 18:53:59 +0000 Subject: [PATCH] fix: add explicit extensions in d.ts imports so types resolve under node16/nodenext --- fixup.cjs | 2 +- src/cjs/ecpair.d.ts | 4 ++-- src/cjs/index.d.ts | 2 +- src/cjs/networks.d.ts | 2 +- src/cjs/testecc.d.ts | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fixup.cjs b/fixup.cjs index 91b1830..c813406 100755 --- a/fixup.cjs +++ b/fixup.cjs @@ -24,7 +24,7 @@ const processFiles = (dir) => { processFiles(filePath); } else if (filePath.endsWith('.cjs')) { updateRequires(filePath); - } else if (filePath.endsWith('.js')) { + } else if (filePath.endsWith('.js') || filePath.endsWith('.d.ts')) { updateImports(filePath); } }); diff --git a/src/cjs/ecpair.d.ts b/src/cjs/ecpair.d.ts index 6a2af67..a03b767 100644 --- a/src/cjs/ecpair.d.ts +++ b/src/cjs/ecpair.d.ts @@ -1,5 +1,5 @@ -import { Network } from './networks'; -import * as networks from './networks'; +import { Network } from './networks.js'; +import * as networks from './networks.js'; export { networks }; import * as v from 'valibot'; declare const ECPairOptionsSchema: v.OptionalSchema; export declare const bitcoin: Network; export declare const testnet: Network; diff --git a/src/cjs/testecc.d.ts b/src/cjs/testecc.d.ts index bff8d27..d568e57 100644 --- a/src/cjs/testecc.d.ts +++ b/src/cjs/testecc.d.ts @@ -1,2 +1,2 @@ -import { TinySecp256k1Interface } from './ecpair'; +import { TinySecp256k1Interface } from './ecpair.js'; export declare function testEcc(ecc: TinySecp256k1Interface): void;