From c7ed3329de423f81154f7248bc2ee048ed9c3651 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Wed, 8 Jan 2025 13:58:17 +0800 Subject: [PATCH] fix: avoid using `.toSorted` to improve node compatibility, close #117 --- src/configs.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/configs.ts b/src/configs.ts index fdc761e..92474af 100644 --- a/src/configs.ts +++ b/src/configs.ts @@ -242,10 +242,12 @@ export async function globMatchedFiles( ): Promise { console.log(MARK_INFO, 'Globing matched files') - const files = (await configArrayFindFiles({ - basePath, - configs: buildConfigArray(rawConfigs, basePath), - })).toSorted() + const files = [ + ...await configArrayFindFiles({ + basePath, + configs: buildConfigArray(rawConfigs, basePath), + }), + ].sort() return files .map((filepath) => {