(packages, outPackages, baseUrl, parentMap, parentUrl)
| 126 | } |
| 127 | |
| 128 | function resolveAndComposePackages (packages, outPackages, baseUrl, parentMap, parentUrl) { |
| 129 | for (var p in packages) { |
| 130 | var resolvedLhs = resolveIfNotPlainOrUrl(p, baseUrl) || p; |
| 131 | var rhs = packages[p]; |
| 132 | // package fallbacks not currently supported |
| 133 | if (typeof rhs !== 'string') |
| 134 | continue; |
| 135 | var mapped = resolveImportMap(parentMap, resolveIfNotPlainOrUrl(rhs, baseUrl) || rhs, parentUrl); |
| 136 | if (!mapped) { |
| 137 | if (process.env.SYSTEM_PRODUCTION) |
| 138 | targetWarning('W1', p, rhs); |
| 139 | else |
| 140 | targetWarning('W1', p, rhs, 'bare specifier did not resolve'); |
| 141 | } |
| 142 | else |
| 143 | outPackages[resolvedLhs] = mapped; |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | export function resolveAndComposeImportMap (json, baseUrl, outMap) { |
| 148 | if (json.imports) |
no test coverage detected
searching dependent graphs…