Skip to content

Commit d2027f8

Browse files
committed
fix(internal): STATIC_IMPORT_REGEX matches : in ternary statements
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
1 parent 6df4a4b commit d2027f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/internal/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,4 @@ export const REQUIRE_STATEMENT_REGEX: RegExp =
8383
* @const {RegExp} STATIC_IMPORT_REGEX
8484
*/
8585
export const STATIC_IMPORT_REGEX: RegExp =
86-
/(?<!(?:\/\/|\*).*)import\s*(?:[\s"']*(?<imports>[\w\t\n\r $*,/{}]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"']*[^\s"'](?=\s*")|(?<=["']\s*)[^']*[^\s'](?=\s*'))\s*["']\s*/gm
86+
/(?<!(?:\/\/|\*).*)import\s*(?:[\s"']*(?<imports>[\w\t\n\r $*,/{}]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s":](?=\s*")|(?<=["']\s*)[^']*[^\s':](?=\s*'))\s*["']\s*/gm

0 commit comments

Comments
 (0)