From 139374acb38dd7fb93bc62b346db5a494feecca3 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Mon, 22 Jul 2024 09:54:59 -0700 Subject: [PATCH] Fix verdaccio --- scripts/verdaccioPkgSize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/verdaccioPkgSize.js b/scripts/verdaccioPkgSize.js index 4f7bf07dc32..e7e35e6ef46 100644 --- a/scripts/verdaccioPkgSize.js +++ b/scripts/verdaccioPkgSize.js @@ -18,7 +18,7 @@ function verdaccioPkgSize() { let verdaccioDBPath = path.join(__dirname, '..', 'storage', '.verdaccio-db.json'); let publishedPackages = JSON.parse(fs.readFileSync(verdaccioDBPath), 'utf').list; for (let pkg of publishedPackages) { - let tarballPath = glob.sync(`**/${pkg}/*.tgz`, {cwd: verdaccioStorePath}); + let tarballPath = glob.sync(`**/${pkg}/*.tgz`, {cwd: verdaccioStorePath}).sort().at(-1); let size = fs.statSync(verdaccioStorePath + tarballPath).size / 1000; json[pkg] = size; }