loads a component and its dependencies if the key given is a package and a wildcard, loads all of them e.g. `Package/Component` OR `Package/*`
512565
function(key){
			var wildCardMatch = key.match(PACKAGE_DOT_STAR);
			if (wildCardMatch){
				packages[wildCardMatch[1]].forEach(loadComponent);
			} else {
				if (key in registry) resolveDeps(registry[key]);
				else throw new Error('Missing key: ' + key);
			}
		}
13639
def package_depends_on(self, name_a, name_b):
        
        assert self._context
        if self._dependency_lookup is None:
            self._dependency_graph = self._context.get_dependency_graph()
            self._dependency_lookup = accessibility(self._dependency_graph)

        downstream = self._dependency_lookup.get(name_a, [])
        accessible = (name_b in downstream)
        if accessible:
            neighbours = self._dependency_graph.neighbors(name_a)
            return 2 if name_b in neighbours else 1
        else:
            return 0
130298
function Component_getDependency(key) {
        if (this.dependency.hasOwnProperty(key)) {
            return core.copy(this.dependency[key]);
        }
        return false;
    }
1233935
def load_dependencies_to_classpath
      jars = dependencies_classpath.split(File::PATH_SEPARATOR)
      Naether::Java.load_jars(jars)

      jars
    end
1304329
def load(self, _=None):
        
        for k, v in self.layer.iteritems():
            self.add(k, v['module'], v.get('package'))
112196
function(dir) {

        // Load the package.json if it exists (and remove relative refs)
        var pkg;
        dir = Path.resolve(dir);
        try {
          pkg = JSON.parse(FS.readFileSync(dir + '/package.json', 'utf-8'));
        } catch (e) {
          // Report an error if the package.json has a parse problem.  This is
          // good during app development to show why we didn't discover the app.
          if (e.code !== "ENOENT") {
             console.error("Problem parsing " + dir + "/package.json");
          }
          return false;
        }

        // Is this a monitor-dashboard app?
        var isMonitorApp = pkg.dependencies && _.find(_.keys(pkg.dependencies), function(keyword){ return keyword === 'monitor-dashboard'; });
        if (!isMonitorApp) {
          return false;
        }

        // This is a monitor-dashboard app.
        return t.loadApp(dir, pkg);
      }
1190150
function(next) {
            core.allowPackages.forEach(function(pkg) {
                try {
                    var mod = path.dirname(require.resolve(pkg)).replace(/\/lib$/, "");
                    core.packages[pkg] = { path: mod };
                    if (lib.statSync(mod + "/etc").isDirectory()) {
                        core.packages[pkg].etc = 1;
                        var cfg = lib.readFileSync(mod + "/etc/config");
                        if (cfg) {
                            config = cfg + "\n" + config;
                            core.packages[pkg].config = 1;
                            core.parseConfig(cfg, 1);
                        }
                    }
                    ["modules","locales","views","web"].forEach(function(x) {
                        if (lib.statSync(mod + "/" + x).isDirectory()) {
                            core.path[x].unshift(mod + "/" + x);
                            core.packages[pkg][x] = 1;
                        }
                    });
                    logger.debug("init:", "npm package:", pkg, core.packages[pkg]);
                } catch(e) {
                    logger.error("init:", "npm package:", pkg, e);
                }
            });
            next();
        }
1033933
def load_package(package_dir, package=None, exclude=None, default_section=_DEFAULT_SECTION):
    
    init_py = '__init__.py'
    py_ext = '.py'
    files = os.listdir(package_dir)
    if init_py in files:
        files = [f for f in files if f != init_py]
        if package:
            files.insert(0, package)

    def init_package(item):
        if str(item).endswith(py_ext):
            item = item[:-3]
            if package:
                item = '{package}.{item}'.format(package=package, item=item)
        elif _is_conf(item):
            item = '{package_dir}/{item}'.format(package_dir=package_dir, item=item)
        else:
            item = package
        return str(item)

    logger.debug(files)
    files = [init_package(f) for f in files]
    if exclude:
        files = [f for f in files if f not in exclude]

    settings = load(files, default_section)
    return merge(settings)
934172
def run(self):
        
        self.msg.resolving()
        self.repositories()
        if self.find_pkg:
            self.dependencies_list.reverse()
            self.requires = Utils().dimensional_list(self.dependencies_list)
            self.dependencies = Utils().remove_dbs(self.requires)
            if self.dependencies == []:
                self.dependencies = ["No dependencies"]
            if "--graph=" in self.flag:
                self.deps_tree()
            self.msg.done()
            pkg_len = len(self.name) + 24
            print("")    # new line at start
            self.msg.template(pkg_len)
            print("| Package {0}{1}{2} dependencies :".format(
                self.cyan, self.name, self.endc))
            self.msg.template(pkg_len)
            print("\\")
            print(" +---{0}[ Tree of dependencies ]{1}".format(self.yellow,
                                                               self.endc))
            index = 0
            for pkg in self.dependencies:
                if "--check-deps" in self.flag:
                    used = self.check_used(pkg)
                    self.deps_used(pkg, used)
                    used = "{0} {1}{2}{3}".format(
                        "is dependency -->", self.cyan,
                        ", ".join(used), self.endc)
                else:
                    used = ""
                index += 1
                installed = ""
                if find_package(pkg + self.meta.sp, self.meta.pkg_path):
                    if self.meta.use_colors in ["off", "OFF"]:
                        installed = "* "
                    print(" |")
                    print(" {0}{1}: {2}{3}{4} {5}{6}".format(
                        "+--", index, self.green, pkg,
                        self.endc, installed, used))
                else:
                    print(" |")
                    print(" {0}{1}: {2}{3}{4} {5}".format(
                        "+--", index, self.red, pkg,
                        self.endc, installed))
            if self.meta.use_colors in ["off", "OFF"]:
                print("\n * = Installed\n")
            else:
                print("")    # new line at end
            if "--graph=" in self.flag:
                self.graph()
        else:
            self.msg.done()
            print("\nNo package was found to match\n")
            raise SystemExit(1)
369454
function validateDependencies(configDir) {
  const packageJsonPath = path.join(findup.sync(configDir, 'package.json'), 'package.json');
  const packageJson = require(packageJsonPath);
  DEPENDENCIES.forEach(validateDependency.bind(null, packageJson));
}
1100279
function loadComponentFile (meta, key, filepath, messages) {
  const ext = path.extname(filepath).slice(1)
  const loader = fileLoaders[ext] || fileLoaders.DEFAULT

  return loader(meta, key, filepath, messages)
}
447048
private Map<PackageUrl, ComponentReport> requestReports(final Dependency[] dependencies) throws Exception {
        log.debug("Requesting component-reports for {} dependencies", dependencies.length);

        // create requests for each dependency which has a PURL identifier
        List<PackageUrl> packages = new ArrayList<>();
        for (Dependency dependency : dependencies) {
            for (Identifier id : dependency.getSoftwareIdentifiers()) {
                if (id instanceof PurlIdentifier) {
                    PackageUrl purl = parsePackageUrl(id.getValue());
                    if (purl != null) {
                        packages.add(purl);
                    }
                }
            }
        }

        // only attempt if we have been able to collect some packages
        if (!packages.isEmpty()) {
            return client.requestComponentReports(packages);
        }

        log.warn("Unable to determine Package-URL identifiers for {} dependencies", dependencies.length);
        return Collections.emptyMap();
    }
298240
function fetchDependentPackages( $dependencyType, &$failedList )
    {
        $packages = array();
        $provides = $this->Parameters['dependencies'][$dependencyType];

        if ( $provides != null )
        {
            foreach ( $provides as $provide )
            {
                // fetch only dependent packages, not package items.
                if ( $provide['type'] == 'ezpackage' )
                {
                    // TODO: Add fetching from URL (not here ?)
                    $package = $this->fetch( $provide['name'] );

                    if ( !$package )
                    {
                        $failedList[] = $provide['name'];
                        continue;
                    }
                    $packages[] =& $package;
                }
            }
        }
        return $packages;
    }
1144178
def load_dependency(self, module_name, dependencies, recursive, greedy, ismapping = False):
        """"""
        key = module_name.lower()
        if key not in self.modules:
            if key == "fortpy":
                #Manually specify the correct path to the fortpy.f90 that shipped with
                #the distribution
                from fortpy.utility import get_fortpy_templates_dir
                from os import path
                fpy_path = path.join(get_fortpy_templates_dir(), "fortpy.f90")
                self.parse(fpy_path, False, False)
                return
            
            fkey = key + ".f90"
            if fkey in self._pathfiles:
                self.parse(self._pathfiles[fkey], dependencies, recursive)
            elif greedy:
                #The default naming doesn't match for this module
                #we will load all modules until we find the right
                #one
                self._load_greedy(key, dependencies, recursive)
            elif key in self.mappings and self.mappings[key] in self._pathfiles:
                #See if they have a mapping specified to a code file for this module name.
                if self.verbose:
                    msg.info("MAPPING: using {} as the file".format(self.mappings[key]) + 
                             " name for module {}".format(key))
                self.parse(self._pathfiles[self.mappings[key]], dependencies, recursive)
            elif key not in ["mkl_vsl_type", "mkl_vsl", "iso_c_binding"]:
                #The parsing can't continue without the necessary dependency modules.
                msg.err(("could not find module {}. Enable greedy search or"
                       " add a module filename mapping.".format(key)))
                if self.austere:
                    exit(1)
706692
function getDependents(dependencyName) {
  return Object.values(allPackages).filter(({info: pkg}) => {
    return (
      pkg.dependencies &&
      Object.keys(pkg.dependencies).indexOf(dependencyName) !== -1
    );
  });
}
461094
def load_dependencies(req, history=None):
    
    if history is None:
        history = set()
    dist = pkg_resources.get_distribution(req)
    spec = dict(
        requirement=str(req),
        resolved=str(dist),
    )
    if req not in history:
        # traverse into children
        history.add(req)
        extras = parse_extras(req)
        depends = [
            load_dependencies(dep, history=history)
            for dep in dist.requires(extras=extras)
        ]
        if depends:
            spec.update(depends=depends)
    return spec
595883
function (packageName) {
    let result;

    try {
      result = require.resolve(packageName, { basedir: process.cwd() });
      result = require(result);
    } catch (e) {
      try {
        result = require(packageName);
      } catch (e) {
        result = undefined;
      }
    }

    return result;
  }