bare-module-traverse 1.8.1 → 1.8.3

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.
Files changed (2) hide show
  1. package/index.js +8 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -248,6 +248,12 @@ exports.module = function* (url, source, attributes, artifacts, visited, opts =
248
248
  exports.package = function* (url, source, artifacts, visited, opts = {}) {
249
249
  if (visited.has(url.href)) return false
250
250
 
251
+ if (source === null) {
252
+ source = yield { module: url }
253
+
254
+ if (source === null) return false
255
+ }
256
+
251
257
  visited.add(url.href)
252
258
 
253
259
  const info = JSON.parse(source)
@@ -417,10 +423,10 @@ exports.imports = function* (parentURL, source, imports, artifacts, lexer, visit
417
423
  if (source !== null) {
418
424
  addResolution(imports, specifier, matchedConditions, url)
419
425
 
420
- const attributes = entry.attributes
426
+ let attributes = entry.attributes
421
427
 
422
428
  if (attributes.imports) {
423
- attributes.imports = imports[attributes.imports].default
429
+ attributes = { ...attributes, imports: imports[attributes.imports].default }
424
430
  }
425
431
 
426
432
  yield {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-module-traverse",
3
- "version": "1.8.1",
3
+ "version": "1.8.3",
4
4
  "description": "Low-level module graph traversal for Bare",
5
5
  "exports": {
6
6
  ".": {