Skip to content

Commit

Permalink
chore(version): sort pkgs by name
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Apr 13, 2024
1 parent c231503 commit 0ad13b7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/cli",
"version": "4.15.0",
"version": "4.16.0",
"description": "Athenna CLI to create new Athenna projects.",
"license": "MIT",
"author": "João Lenon <[email protected]>",
Expand Down
10 changes: 9 additions & 1 deletion src/commands/version.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export class VersionCommand extends BaseCommand {

public async getTableVersionFor(...pkgs: string[]) {
const table = this.logger.table().head('Package', 'Version')
let rows = []

await Exec.concurrently(pkgs, async pkg => {
if (IGNORE_REPOS.includes(pkg)) {
Expand All @@ -66,12 +67,19 @@ export class VersionCommand extends BaseCommand {
return
}

table.row([
rows.push([
this.paint.yellow(`@athenna/${pkg.toLowerCase()}`),
this.paint.yellow(version),
])
})

rows = rows.athenna
.toCollection()
.sortBy<any>(row => row[0])
.all()

table.row(...rows)

return table
}
}

0 comments on commit 0ad13b7

Please sign in to comment.