-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When updating our codebase to TypeScript we found instances where the usages regex was not comprehensive enough to find all usages. While ideally we would move to an AST based approach, in the meantime @MonicaOlejniczak provided a patch that enhanced the regex to cover more usages.
react-loosely-lazy/packages/plugins/parcel-transformer/src/utils.ts
Lines 58 to 59 in 2a9cbc6
// This is going to assume you call the library, with an optional generic type parameter, and no whitespace... | |
const usageStartRe = new RegExp(`${importSpecifier}(?:<.+>)?\\(`); |
- const usageStartRe = new RegExp(`${importSpecifier}(?:<.+>)?\\(`);
+ const usageStartRe = new RegExp(`${importSpecifier}(?:<[^>]+[>\s]+)?\\(`);
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working