From 3f6159e9f2b46cdd634d07589f7a8ddb9cff8c69 Mon Sep 17 00:00:00 2001 From: Benoit Tremblay Date: Mon, 1 Apr 2024 14:11:15 -0400 Subject: [PATCH] Fix TypeScript definition for ESM (#483) --- tools/fix-typescript-typedef.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/fix-typescript-typedef.mjs b/tools/fix-typescript-typedef.mjs index fd26ae3..e1bf5ec 100644 --- a/tools/fix-typescript-typedef.mjs +++ b/tools/fix-typescript-typedef.mjs @@ -21,8 +21,8 @@ const promises = files const content = (await fs.readFile(newFullFile)).toString(); const newContent = content.replaceAll( - / from \'([^']+)\'/g, - ` from '$1.d.mts'`, + / from \'\.([^']+)\'/g, + ` from '.$1.d.mts'`, ); await fs.writeFile(newFullFile, newContent);