Skip to content

Commit

Permalink
fix(internal): STATIC_IMPORT_REGEX matches import in module speci…
Browse files Browse the repository at this point in the history
…fiers

Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
  • Loading branch information
unicornware committed Oct 22, 2022
1 parent 0266ca9 commit a58ec20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/internal/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ export const REQUIRE_STATEMENT_REGEX: RegExp =
* @const {RegExp} STATIC_IMPORT_REGEX
*/
export const STATIC_IMPORT_REGEX: RegExp =
/(?<!(?:\/\/|\*).*)import\s*(?:[\s"']*(?<imports>[\w\t\n\r $*,/{}]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s":](?=\s*")|(?<=["']\s*)[^']*[^\s':](?=\s*'))\s*["']\s*/gm
/(?<!(?:\/\/|\*).*)(?<=\s|^|;)import\s*([\s"']*(?<imports>[\w\t\n\r $*,/{}]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gm

0 comments on commit a58ec20

Please sign in to comment.