(source: string)
| 93 | let specifiersByPackage = getSpecifiersByPackage(file.path); |
| 94 | let j = api.jscodeshift.withParser({ |
| 95 | parse(source: string) { |
| 96 | return recastParse(source, { |
| 97 | parser: { |
| 98 | parse(innerSource: string) { |
| 99 | return parse(innerSource, { |
| 100 | sourceType: 'module', |
| 101 | plugins: [ |
| 102 | 'jsx', |
| 103 | 'typescript', |
| 104 | 'importAssertions', |
| 105 | 'dynamicImport', |
| 106 | 'decorators-legacy', |
| 107 | 'classProperties', |
| 108 | 'classPrivateProperties', |
| 109 | 'classPrivateMethods', |
| 110 | 'exportDefaultFrom', |
| 111 | 'exportNamespaceFrom', |
| 112 | 'objectRestSpread', |
| 113 | 'optionalChaining', |
| 114 | 'nullishCoalescingOperator', |
| 115 | 'topLevelAwait' |
| 116 | ], |
| 117 | tokens: true, |
| 118 | errorRecovery: true |
| 119 | }); |
| 120 | } |
| 121 | } |
| 122 | }); |
| 123 | } |
| 124 | }); |
| 125 | |
| 126 | let root = j(file.source); |
no outgoing calls
no test coverage detected