From d78fe00138b734e3ef24068e1552b1768923ccec Mon Sep 17 00:00:00 2001 From: Caroline Russell Date: Mon, 9 Oct 2023 18:45:26 -0400 Subject: [PATCH] feat: sort components Signed-off-by: Caroline Russell --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 22b6a92c7c..b970a0cdf5 100644 --- a/index.js +++ b/index.js @@ -631,6 +631,7 @@ export function listComponents( const compMap = {}; const isRootPkg = ptype === "npm"; if (Array.isArray(pkg)) { + pkg.sort((a, b) => a.name.localeCompare(b.name)); pkg.forEach((p) => { addComponent(options, allImports, p, ptype, compMap, false, format); });