How to use the @lerna/project.getPackages function in @lerna/project

To help you get started, we’ve selected a few @lerna/project 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 jsxstyle / jsxstyle / tests / meta.spec.ts View on Github external
it('only publishes the intended files', async () => {
    const packages: Package[] = await getPackages(JSXSTYLE_ROOT);
    const packagePromises = packages
      // exclude private packages
      .filter(pkg => !pkg.private)
      .sort((a, b) => a.name.localeCompare(b.name))
      .map(pkg =>
        // fetch file list and format it into something
        packlist({ path: pkg.location }).then(
          fileList => `
${pkg.name}
${pkg.name.replace(/./g, '=')}
${fileList
  .sort(legacySort)
  .map(f => `- ${f}`)
  .join('\n')}
`
        )
github pixijs / pixi.js / test / packages.js View on Github external
async function getSortedPackages()
{
    // Standard Lerna plumbing getting packages
    const packages = await getPackages(path.dirname(__dirname));

    return batchPackages(packages)
        .reduce((arr, batch) => arr.concat(batch), []);
}
github pixijs / pixi-filters / rollup.config.js View on Github external
async function getSortedPackages() {
    // Support --scope and --ignore globs
    const {scope, ignore} = minimist(process.argv.slice(2));

    // Standard Lerna plumbing getting packages
    const packages = await getPackages(__dirname);
    const filtered = filterPackages(
        packages,
        scope,
        ignore,
        false
    );

    return batchPackages(filtered)
        .reduce((arr, batch) => arr.concat(batch), []);
}
github ifiokjr / remirror / support / scripts / helpers / index.js View on Github external
const getAllDependencies = () => {
  if (!packages) {
    packages = getPackages().then(pkgs =>
      pkgs.map(pkg => ({
        ...pkg.toJSON(),
        location: pkg.location,
        rootPath: pkg.rootPath,
      })),
    );
  }

  return packages;
};
github pixijs / pixi.js / rollup.config.js View on Github external
async function getSortedPackages(scope, ignore)
{
    const packages = await getPackages(__dirname);
    const filtered = filterPackages(
        packages,
        scope,
        ignore,
        false
    );

    return batchPackages(filtered)
        .reduce((arr, batch) => arr.concat(batch), []);
}

@lerna/project

Lerna project configuration

MIT
Latest version published 1 year ago

Package Health Score

70 / 100
Full package analysis

Popular @lerna/project functions