()
| 25 | packageName = '@tanstack/react-query', |
| 26 | ) => { |
| 27 | const findNamespaceImportIdentifier = () => { |
| 28 | const specifier = root |
| 29 | .find(jscodeshift.ImportDeclaration, { |
| 30 | source: { |
| 31 | value: packageName, |
| 32 | }, |
| 33 | }) |
| 34 | .find(jscodeshift.ImportNamespaceSpecifier) |
| 35 | .paths() |
| 36 | |
| 37 | return specifier.length > 0 ? specifier[0].value.local : null |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * First, we search for the namespace import identifier because if we have any, we assume the consumer uses |
no test coverage detected
searching dependent graphs…