bare-module-traverse 1.3.2 → 1.3.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 +0 -18
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -257,8 +257,6 @@ exports.imports = function* (
257
257
 
258
258
  if (value.package) {
259
259
  next = resolver.next(JSON.parse(yield { module: value.package }))
260
- } else if (hasResolution(imports, specifier, matchedConditions)) {
261
- next = resolver.next(false)
262
260
  } else {
263
261
  const url = value.resolution
264
262
 
@@ -497,22 +495,6 @@ function removeURL(array, url) {
497
495
  if (array[lo].href === url.href) array.splice(lo, 1)
498
496
  }
499
497
 
500
- function hasResolution(imports, specifier, conditions) {
501
- if (specifier in imports === false) return false
502
-
503
- let current = imports[specifier]
504
-
505
- for (const key of conditions) {
506
- if (key in current === false || typeof current[key] !== 'object') {
507
- return false
508
- }
509
-
510
- current = current[key]
511
- }
512
-
513
- return true
514
- }
515
-
516
498
  function addResolution(imports, specifier, conditions, url) {
517
499
  imports[specifier] = imports[specifier] || {}
518
500
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-module-traverse",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Low-level module graph traversal for Bare",
5
5
  "exports": {
6
6
  ".": "./index.js",