From d8dbc882a54808e2e072c486d9486168bd34fa3c Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 13 Mar 2024 10:36:43 -0400 Subject: [PATCH] fix: add patch for tsc-alias --- patches/tsc-alias+1.8.8.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 patches/tsc-alias+1.8.8.patch diff --git a/patches/tsc-alias+1.8.8.patch b/patches/tsc-alias+1.8.8.patch new file mode 100644 index 0000000..f75d2da --- /dev/null +++ b/patches/tsc-alias+1.8.8.patch @@ -0,0 +1,15 @@ +diff --git a/node_modules/tsc-alias/dist/utils/import-path-resolver.js b/node_modules/tsc-alias/dist/utils/import-path-resolver.js +index ebaf620..227d4c7 100644 +--- a/node_modules/tsc-alias/dist/utils/import-path-resolver.js ++++ b/node_modules/tsc-alias/dist/utils/import-path-resolver.js +@@ -5,8 +5,9 @@ const normalizePath = require("normalize-path"); + const fs_1 = require("fs"); + const path_1 = require("path"); + const anyQuote = `["']`; ++const excludeLocalImportSyntax = `[(?!\.)]`; + const pathStringContent = `[^"'\r\n]+`; +-const importString = `(?:${anyQuote}${pathStringContent}${anyQuote})`; ++const importString = `(?:${anyQuote}${excludeLocalImportSyntax}${pathStringContent}${anyQuote})`; + const funcStyle = `(?:\\b(?:import|require)\\s*\\(\\s*(\\/\\*.*\\*\\/\\s*)?${importString}\\s*\\))`; + const globalStyle = `(?:\\bimport\\s+${importString})`; + const fromStyle = `(?:\\bfrom\\s+${importString})`;