How to use @lerna/query-graph - 2 common examples

To help you get started, we’ve selected a few @lerna/query-graph examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lerna / lerna / utils / listable / lib / listable-format.js View on Github external
function filterResultList(pkgList, viewOptions) {
  let result = viewOptions.showAll ? pkgList.slice() : pkgList.filter(pkg => !pkg.private);

  if (viewOptions.isTopological) {
    // allow cycles, output needs to be usable for debugging circularity
    result = QueryGraph.toposort(result);
  }

  return result;
}
github terascope / teraslice / packages / scripts / src / helpers / packages.ts View on Github external
const e2eDir = getE2EDir();
    if (e2eDir) {
        extraPaths.push(e2eDir);
    }

    const packages = fs
        .readdirSync(packagesPath)
        .map((fileName) => path.join(packagesPath, fileName))
        .concat(extraPaths)
        .filter((filePath: string) => {
            if (!fs.statSync(filePath).isDirectory()) return false;
            return fs.existsSync(path.join(filePath, 'package.json'));
        })
        .map((filePath) => readPackageInfo(filePath));

    _packages = QueryGraph.toposort(packages);
    return _packages;
}

@lerna/query-graph

An internal Lerna tool

MIT
Latest version published 2 years ago

Package Health Score

70 / 100
Full package analysis

Popular @lerna/query-graph functions