function loadAllProjectDependencies(projectPath: string) {
  // Get a fresh copy of the dependencies from the project's package.json
  return loadPackageJson(projectPath).then(
    packageJson =>
      new Promise((resolve, reject) => {
        // Check for existence of both dependencies and devDependencies
        // We can reasonably assume all projects have dependencies
        // but some may not have devDependencies
        const deps = Object.keys(packageJson.dependencies);
        const devDeps = Object.keys(packageJson.devDependencies || {});
        const dependencies = [...deps, ...devDeps].map(name => ({
          name,
          location: devDeps.includes(name) ? 'devDependencies' : 'dependencies',
        }));

        loadProjectDependencies(projectPath, dependencies)
          .then(dependenciesFromPackageJson => {
            // The results will be an array of package.jsons.
            // I want a database-style map.
            const dependenciesByName = dependenciesFromPackageJson.reduce(
              (dependenciesMap, dependency) => ({
                ...dependenciesMap,
                [dependency.name]: dependency,
              }),
              {}
            );

            resolve(dependenciesByName);
          })
          .catch(err => {
            reject(err);
          });
      })
  );
}
Wrapper around `loadProjectDependency` that fetches all dependencies for
a specific project.

NOTE: I wonder how this would perform on a project with 100+ top-level
dependencies... might need to set up a streaming service that can communicate
loading status if it takes more than a few hundred ms.