(file)
| 717 | } |
| 718 | |
| 719 | function rewriteMdx(file) { |
| 720 | let contents = fs.readFileSync(file, 'utf8'); |
| 721 | contents = contents |
| 722 | .replace( |
| 723 | /\/packages\/@(react-aria|react-spectrum|react-stately)\/(.+?)\/docs\/(.+\.svg)/g, |
| 724 | (_, scope, pkg, file) => { |
| 725 | let monopackage = scope === 'react-spectrum' ? '@adobe/react-spectrum' : scope; |
| 726 | return `/packages/${monopackage}/docs/${pkg}/${file}`; |
| 727 | } |
| 728 | ) |
| 729 | .replace( |
| 730 | /(['"])@(react-aria|react-spectrum|react-stately)\/(.+?)\/docs\/(.+\.svg)/g, |
| 731 | (_, q, scope, pkg, file) => { |
| 732 | let monopackage = scope === 'react-spectrum' ? '@adobe/react-spectrum' : scope; |
| 733 | return `${q}/packages/${monopackage}/docs/${pkg}/${file}`; |
| 734 | } |
| 735 | ); |
| 736 | |
| 737 | fs.writeFileSync(file, contents); |
| 738 | } |
| 739 | |
| 740 | function getImportStatements(node, file, relative = true) { |
| 741 | let source = node.source.value; |
no outgoing calls
no test coverage detected