File tree Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -82,17 +82,16 @@ function output(data, argv) {
82
82
}
83
83
84
84
85
- // TODO: this formatter do sort by date, we can`t change output because customers can grep it
86
- // // if no pretty flag and no dateFormat - force apply specific entity date format
87
- // if (!pretty && (!dateFormat || dateFormat === 'default')) {
88
- // const formatter = FormatterRegistry.get(entities[0].constructor.name);
89
- // _.keys(info).forEach((key) => {
90
- // const prop = info[key];
91
- // if (prop instanceof Date) {
92
- // info[key] = formatter.applyStyles(key, prop);
93
- // }
94
- // });
95
- // }
85
+ // if no pretty flag and no dateFormat - force apply specific entity date format
86
+ if ( ! pretty && ( ! dateFormat || dateFormat === 'default' ) ) {
87
+ const formatter = FormatterRegistry . get ( entities [ 0 ] . constructor . name ) ;
88
+ _ . keys ( info ) . forEach ( ( key ) => {
89
+ const prop = info [ key ] ;
90
+ if ( prop instanceof Date ) {
91
+ info [ key ] = formatter . applyStyles ( key , prop ) ;
92
+ }
93
+ } ) ;
94
+ }
96
95
97
96
if ( pretty ) {
98
97
const formatter = FormatterRegistry . get ( entities [ 0 ] . constructor . name ) ;
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ class TestEntity extends Entity {
39
39
40
40
41
41
// todo: add other tests on coverage
42
- describe . skip ( 'table output' , ( ) => {
42
+ describe ( 'table output' , ( ) => {
43
43
describe ( 'date format' , ( ) => {
44
44
it ( 'should apply default entity date format when no pretty flag and no date format are passed' , ( ) => {
45
45
const argv = { } ; // no pretty flag
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " codefresh" ,
3
- "version" : " 0.11.0 " ,
3
+ "version" : " 0.11.1 " ,
4
4
"description" : " Codefresh command line utility" ,
5
5
"main" : " index.js" ,
6
6
"preferGlobal" : true ,
You can’t perform that action at this time.
0 commit comments