From 18b720077b3cc74655078334d5448d41f09c0c06 Mon Sep 17 00:00:00 2001 From: Chris Blossom Date: Mon, 15 Jul 2019 11:51:23 -0700 Subject: [PATCH] Sort removed files --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 953359b..f9637f0 100644 --- a/index.js +++ b/index.js @@ -47,7 +47,7 @@ module.exports = async (patterns, {force, dryRun, cwd = process.cwd(), ...option const removedFiles = await pMap(files, mapper, options); - removedFiles.reverse(); + removedFiles.sort((a, b) => a.localeCompare(b)); return removedFiles; }; @@ -78,7 +78,7 @@ module.exports.sync = (patterns, {force, dryRun, cwd = process.cwd(), ...options return file; }); - removedFiles.reverse(); + removedFiles.sort((a, b) => a.localeCompare(b)); return removedFiles; };