bare-module-traverse 1.7.1 → 1.7.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.
Files changed (2) hide show
  1. package/index.js +11 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -271,6 +271,12 @@ exports.package = function* (url, source, artifacts, visited, opts = {}) {
271
271
  }
272
272
 
273
273
  exports.preresolved = function* (url, source, resolutions, artifacts, visited, opts = {}) {
274
+ const {
275
+ builtinProtocol = 'builtin:',
276
+ linkedProtocol = 'linked:',
277
+ deferredProtocol = 'deferred:'
278
+ } = opts
279
+
274
280
  const imports = resolutions[url.href]
275
281
 
276
282
  if (typeof imports !== 'object' || imports === null) return false
@@ -288,7 +294,11 @@ exports.preresolved = function* (url, source, resolutions, artifacts, visited, o
288
294
  yield {
289
295
  children: exports.package(url, null, artifacts, visited, opts)
290
296
  }
291
- } else {
297
+ } else if (
298
+ url.protocol !== builtinProtocol &&
299
+ url.protocol !== linkedProtocol &&
300
+ url.protocol !== deferredProtocol
301
+ ) {
292
302
  yield {
293
303
  children: exports.module(url, null, {}, artifacts, visited, opts)
294
304
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-module-traverse",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "Low-level module graph traversal for Bare",
5
5
  "exports": {
6
6
  ".": {