@@ -74,22 +74,25 @@ function output(data, argv) {
74
74
dateFormatter = Style . dateDiff ;
75
75
break ;
76
76
default :
77
- dateFormatter = input => input instanceof Date ? moment ( input ) . format ( dateFormat ) : input ;
77
+ dateFormatter = input => input instanceof Date ? moment ( input )
78
+ . format ( dateFormat ) : input ;
78
79
}
79
80
80
81
info = _ . mapValues ( info , dateFormatter ) ;
81
82
}
82
83
83
- // if no pretty flag and no dateFormat - force apply specific entity date format
84
- if ( ! pretty && ( ! dateFormat || dateFormat === 'default' ) ) {
85
- const formatter = FormatterRegistry . get ( entities [ 0 ] . constructor . name ) ;
86
- _ . keys ( info ) . forEach ( ( key ) => {
87
- const prop = info [ key ] ;
88
- if ( prop instanceof Date ) {
89
- info [ key ] = formatter . applyStyles ( key , prop ) ;
90
- }
91
- } ) ;
92
- }
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
+ // }
93
96
94
97
if ( pretty ) {
95
98
const formatter = FormatterRegistry . get ( entities [ 0 ] . constructor . name ) ;
0 commit comments