(path)
| 279 | } |
| 280 | }, |
| 281 | CallExpression(path) { |
| 282 | if (t.isImport(path.node.callee) || (t.isIdentifier(path.node.callee) && path.node.callee.name === 'import')) { |
| 283 | const first = path.node.arguments[0]; |
| 284 | if (t.isStringLiteral(first)) { |
| 285 | if (isVueLike(first.value)) { |
| 286 | path.node.arguments[0] = t.stringLiteral('/ns/rt'); |
| 287 | } else if (isNsCorePackage(first.value)) { |
| 288 | path.node.arguments[0] = t.stringLiteral('/ns/core'); |
| 289 | } |
| 290 | } |
| 291 | return; |
| 292 | } |
| 293 | if (t.isIdentifier(path.node.callee) && path.node.callee.name === 'require') { |
| 294 | const first = path.node.arguments[0]; |
| 295 | if (t.isStringLiteral(first)) { |
| 296 | const v = first.value; |
| 297 | if (isVueLike(v)) { |
| 298 | path.node.arguments[0] = t.stringLiteral('/ns/rt'); |
| 299 | } else if (isNsCorePackage(v)) { |
| 300 | path.node.arguments[0] = t.stringLiteral('/ns/core'); |
| 301 | } |
| 302 | } |
| 303 | } |
| 304 | }, |
| 305 | VariableDeclarator(path) { |
| 306 | const id = path.node.id; |
| 307 | if (t.isIdentifier(id)) { |
nothing calls this directly
no test coverage detected