code: function findDependencies (target, resolutions) {
    const deps = resolutions.filter(
      resolution => resolution.target === target
    ).map(
      resolution => resolution.ref
    )
    return new Set(deps)
  }
docs: checkForLoop