MCPcopy
hub / github.com/systemjs/systemjs / resolveAndComposePackages

Function resolveAndComposePackages

src/common.js:128–145  ·  view source on GitHub ↗
(packages, outPackages, baseUrl, parentMap, parentUrl)

Source from the content-addressed store, hash-verified

126}
127
128function 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
147export function resolveAndComposeImportMap (json, baseUrl, outMap) {
148 if (json.imports)

Callers 1

Calls 3

resolveIfNotPlainOrUrlFunction · 0.85
resolveImportMapFunction · 0.85
targetWarningFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…