scripts/list-deprecations: allow args to be passed to filter packages

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-11-21 15:09:42 +01:00
parent 05ccc8276c
commit 08dc0d6788
+12 -7
View File
@@ -100,14 +100,19 @@ class ReleaseProvider {
}
async function main() {
let packageDirQueue = process.argv.slice(2);
const rootPath = resolvePath(__dirname, '..');
const packageDirQueue = await Promise.all([
fs.readdir(resolvePath(rootPath, 'packages')),
fs.readdir(resolvePath(rootPath, 'plugins')),
]).then(([packages, plugins]) => [
...packages.map(dir => `packages/${dir}`),
...plugins.map(dir => `plugins/${dir}`),
]);
if (packageDirQueue.length === 0) {
packageDirQueue = await Promise.all([
fs.readdir(resolvePath(rootPath, 'packages')),
fs.readdir(resolvePath(rootPath, 'plugins')),
]).then(([packages, plugins]) => [
...packages.map(dir => `packages/${dir}`),
...plugins.map(dir => `plugins/${dir}`),
]);
}
const fileQueue = [];
const deprecationQueue = [];