bare-module-traverse 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +8 -12
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -268,20 +268,20 @@ exports.imports = function* (
|
|
|
268
268
|
url.protocol === builtinProtocol ||
|
|
269
269
|
url.protocol === linkedProtocol
|
|
270
270
|
) {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
271
|
+
addResolution(imports, specifier, matchedConditions, url)
|
|
272
|
+
|
|
273
|
+
resolved = yielded = true
|
|
274
274
|
} else {
|
|
275
275
|
const source = yield { module: url }
|
|
276
276
|
|
|
277
277
|
if (source !== null) {
|
|
278
|
-
|
|
279
|
-
yield {
|
|
280
|
-
children: exports.module(url, source, artifacts, visited, opts)
|
|
281
|
-
}
|
|
278
|
+
addResolution(imports, specifier, matchedConditions, url)
|
|
282
279
|
|
|
283
|
-
|
|
280
|
+
yield {
|
|
281
|
+
children: exports.module(url, source, artifacts, visited, opts)
|
|
284
282
|
}
|
|
283
|
+
|
|
284
|
+
resolved = yielded = true
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
|
|
@@ -532,8 +532,6 @@ function addResolution(imports, specifier, conditions, url) {
|
|
|
532
532
|
|
|
533
533
|
const last = conditions[conditions.length - 1]
|
|
534
534
|
|
|
535
|
-
if (last in current) return false
|
|
536
|
-
|
|
537
535
|
current[last] = url.href
|
|
538
536
|
|
|
539
537
|
if ('default' in current) {
|
|
@@ -543,8 +541,6 @@ function addResolution(imports, specifier, conditions, url) {
|
|
|
543
541
|
|
|
544
542
|
current.default = value
|
|
545
543
|
}
|
|
546
|
-
|
|
547
|
-
return true
|
|
548
544
|
}
|
|
549
545
|
|
|
550
546
|
function compressImportsMap(imports) {
|