_getBundledPackageInfos(pkgInfoToStartAt) {
    let pkgInfos = this._bundledPackageInfoCache.get(pkgInfoToStartAt);

    if (pkgInfos) {
      return pkgInfos;
    }

    if (!pkgInfoToStartAt.isForBundleHost()) {
      throw new Error(
        `[ember-cli] \`${pkgInfoToStartAt.name}\` is not a bundle host; \`getBundledPackageInfos\` should only be used to find bundled package infos for a project or lazy engine`
      );
    }

    pkgInfos = new Set();
    this._bundledPackageInfoCache.set(pkgInfoToStartAt, pkgInfos);

    let findAddons = (currentPkgInfo) => {
      if (!currentPkgInfo.valid || !currentPkgInfo.addonMainPath) {
        return;
      }

      if (pkgInfos.has(currentPkgInfo)) {
        return;
      }

      if (currentPkgInfo.isForBundleHost()) {
        return;
      }

      pkgInfos.add(currentPkgInfo);

      let addonPackageList = currentPkgInfo.discoverAddonAddons();
      addonPackageList.forEach((pkgInfo) => findAddons(pkgInfo));
    };

    let addonPackageList = pkgInfoToStartAt.project
      ? pkgInfoToStartAt.discoverProjectAddons()
      : pkgInfoToStartAt.discoverAddonAddons();

    addonPackageList.forEach((pkgInfo) => findAddons(pkgInfo));

    return pkgInfos;
  }
Returns a `Set` of package-info objects that a given bundle host is
_directly_ responsible for bundling (i.e., it excludes other bundle
hosts/lazy engines when it encounters these)

@method _getBundledPackageInfos
@param {PackageInfo} pkgInfoToStartAt
@return {Set<PackageInfo>}
@private