(path)
| 336 | } |
| 337 | }, |
| 338 | Import(path) { |
| 339 | let call = path.parentPath; |
| 340 | if (!call?.isCallExpression()) { |
| 341 | return; |
| 342 | } |
| 343 | |
| 344 | let arg = call.node.arguments[0]; |
| 345 | if (arg.type !== 'StringLiteral') { |
| 346 | return; |
| 347 | } |
| 348 | |
| 349 | let isV3ImportSource = |
| 350 | arg.value === '@adobe/react-spectrum' || |
| 351 | (arg.value.startsWith('@react-spectrum/') && arg.value !== '@react-spectrum/s2'); |
| 352 | if (!isV3ImportSource) { |
| 353 | return; |
| 354 | } |
| 355 | |
| 356 | // TODO: implement this. could be a bit challenging. punting for now. |
| 357 | addComment(call.node, ' TODO(S2-upgrade): check this dynamic import'); |
| 358 | }, |
| 359 | JSXOpeningElement(path) { |
| 360 | let name = path.node.name; |
| 361 | if (t.isJSXIdentifier(name) && iconImports.has(name.name)) { |
nothing calls this directly
no test coverage detected