Skip to content

Commit

Permalink
fix: use localeCompare to sort packages by path
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Mar 2, 2018
1 parent 2288513 commit 2ead310
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/collect-packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function collectPackages({ packageConfigs, rootPath }) {
{ concurrency: 4 }
).then(results => {
// fast-glob does not respect pattern order, so we re-sort by absolute path
const lexicalByLocation = (a, b) => b.location < a.location;
const lexicalByLocation = (a, b) => a.location.localeCompare(b.location);

return results.reduce((pkgs, result) => pkgs.concat(result.sort(lexicalByLocation)), []);
});
Expand Down

0 comments on commit 2ead310

Please sign in to comment.