bananareporter 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -67,7 +67,30 @@ sources:
67
67
  bananareporter --from 2023-01-01 --to 2023-03-01 -c bananareporter.yaml
68
68
  ```
69
69
 
70
- In the current directory you will find the output as `bananareporter_$FROM__$TO.json`, can be cahnged with `--out`
70
+ In the current directory you will find the output as `bananareporter_$FROM__$TO.json`, can be changed with `--out`
71
+
72
+ Example of output (json) with gitlab and github sources:
73
+
74
+ ```json
75
+ [
76
+ {
77
+ "date": "2022-07-13T07:51:21.730Z",
78
+ "username": "johndoe",
79
+ "description": "chore: update changelog and swagger branch:work git:aa33b04",
80
+ "projectId": "3318214",
81
+ "projectName": "awesome-frontend",
82
+ "type": "gitlab"
83
+ },
84
+ {
85
+ "date": "2022-07-14T10:50:10.230Z",
86
+ "username": "johndoe2",
87
+ "description": "refactor: compare date function branch:work git:ia1f241",
88
+ "projectId": "928544",
89
+ "projectName": "awesome-backend",
90
+ "type": "github"
91
+ }
92
+ ]
93
+ ```
71
94
 
72
95
 
73
96
  # Usage
@@ -77,7 +100,7 @@ $ npm install -g bananareporter
77
100
  $ bananareporter COMMAND
78
101
  running command...
79
102
  $ bananareporter (--version)
80
- bananareporter/0.1.1 linux-x64 node-v18.14.2
103
+ bananareporter/0.2.0 linux-x64 node-v18.14.2
81
104
  $ bananareporter --help [COMMAND]
82
105
  USAGE
83
106
  $ bananareporter COMMAND
@@ -136,5 +159,5 @@ EXAMPLES
136
159
  report with 138 entries saved to ./bananareporter.json
137
160
  ```
138
161
 
139
- _See code: [dist/commands/run/index.ts](https://github.com/nya1/bananareporter/blob/v0.1.1/dist/commands/run/index.ts)_
162
+ _See code: [dist/commands/run/index.ts](https://github.com/nya1/bananareporter/blob/v0.2.0/dist/commands/run/index.ts)_
140
163
  <!-- commandsstop -->
@@ -72,6 +72,10 @@ class Run extends core_1.Command {
72
72
  this.warn('no entries found, make sure the date range provided and the sources are correct');
73
73
  return;
74
74
  }
75
+ // re order by date ASC
76
+ reportList.sort((a, b) => {
77
+ return dayjs(a.date).diff(b.date);
78
+ });
75
79
  // output
76
80
  let outputStr = '';
77
81
  // eslint-disable-next-line unicorn/prefer-switch
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.1",
2
+ "version": "0.2.0",
3
3
  "commands": {
4
4
  "run": {
5
5
  "id": "run",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bananareporter",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Easily generate a report from multiple sources",
5
5
  "author": "nya1",
6
6
  "bin": {