Skip to content

Commit 47938bd

Browse files
committed
refactor: use version string in reports
1 parent 47f4de2 commit 47938bd

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

lib/commands/ls.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export default class extends Command {
6060
const table = new Table( {
6161
"columns": {
6262
"packageName": { "title": ansi.hl( "PACKAGE NAME" ), "headerAlign": "center", "headerValign": "end" },
63-
"branch": { "title": ansi.hl( "BRANCH" ), "width": 15, "headerAlign": "center", "headerValign": "end" },
63+
"branchName": { "title": ansi.hl( "BRANCH NAME" ), "width": 15, "headerAlign": "center", "headerValign": "end" },
6464
"dirty": { "title": ansi.hl( "IS\nDIRTY" ), "width": 7, "align": "center", "format": value => ( value
6565
? ansi.error( " DIRTY " )
6666
: "-" ) },
@@ -113,7 +113,7 @@ export default class extends Command {
113113
"packageName": ( pkg.isPrivate
114114
? "🔒"
115115
: " " ) + " " + this.#prepareName( pkg ),
116-
"branch": status.head.branch
116+
"branchName": status.head.branch
117117
? status.head.branch
118118
: ansi.error( status.head.abbrev ),
119119
"dirty": status.isDirty,

lib/commands/status.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Publishable: ${ pkg.isPrivate
3939
Stable release (latest): ${ ansi.hl( status.releases.lastStableRelease?.versionString || "-" ) }
4040
Last release (next): ${ ansi.hl( status.releases.lastRelease?.versionString || "-" ) }
4141
42-
Branch: ${ ansi.hl( status.head.branch ) }
42+
Branch name: ${ ansi.hl( status.head.branch ) }
4343
Current release: ${ ansi.hl( status.currentRelease?.versionString || "-" ) }${ status.currentRelease && status.releases.lastRelease?.eq( status.currentRelease )
4444
? " 🚩"
4545
: "" }
@@ -88,8 +88,8 @@ Clone wiki: ${ ansi.hl( upstream.wikiSshCloneUrl ) }
8888
"ansi": true,
8989
"width": 90,
9090
"columns": {
91-
"branch": {
92-
"title": ansi.hl( "BRANCH" ),
91+
"branchName": {
92+
"title": ansi.hl( "BRANCH NAME" ),
9393
"headerAlign": "center",
9494
"headerValign": "end",
9595
"format": branch => {
@@ -173,12 +173,12 @@ Clone wiki: ${ ansi.hl( upstream.wikiSshCloneUrl ) }
173173
},
174174
} );
175175

176-
for ( const branch of Object.keys( status.branchStatus ).sort() ) {
177-
const res = await pkg.git.getCurrentRelease( { "commitRef": branch } );
176+
for ( const branchName of Object.keys( status.branchStatus ).sort() ) {
177+
const res = await pkg.git.getCurrentRelease( { "commitRef": branchName } );
178178

179179
table.write( {
180-
branch,
181-
"syncStatus": status.branchStatus[ branch ],
180+
branchName,
181+
"syncStatus": status.branchStatus[ branchName ],
182182
"currentRelease": res.data,
183183
"unreleasedCommits": res.data,
184184
} );

0 commit comments

Comments
 (0)