Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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')}
`
)
async function getSortedPackages()
{
// Standard Lerna plumbing getting packages
const packages = await getPackages(path.dirname(__dirname));
return batchPackages(packages)
.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), []);
}
const getAllDependencies = () => {
if (!packages) {
packages = getPackages().then(pkgs =>
pkgs.map(pkg => ({
...pkg.toJSON(),
location: pkg.location,
rootPath: pkg.rootPath,
})),
);
}
return packages;
};
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), []);
}