rollup.config.js
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), []);
}
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), []);
}
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 ) , [ ] ) ; }
Get a list of the non-private sorted packages with Lerna v3
@see https://github.com/lerna/lerna/issues/1848
@return {Promise<Package[]>} List of packages
Get a list of the non - private sorted packages with Lerna v3