backlog-exporter 0.2.1 → 0.2.3

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
@@ -38,7 +38,6 @@ Backlog のデータをエクスポートするためのコマンドラインツ
38
38
  * [課題のタイトル](#課題のタイトル)
39
39
  * [Wiki のタイトル](#wiki-のタイトル)
40
40
  * [その他の特徴](#その他の特徴)
41
- * [最近の変更点](#最近の変更点)
42
41
  <!-- tocstop -->
43
42
 
44
43
  # 概要
@@ -59,7 +58,7 @@ $ npm install -g backlog-exporter
59
58
  $ backlog-exporter COMMAND
60
59
  running command...
61
60
  $ backlog-exporter (--version)
62
- backlog-exporter/0.2.1 linux-x64 node-v23.9.0
61
+ backlog-exporter/0.2.3 linux-x64 node-v23.9.0
63
62
  $ backlog-exporter --help [COMMAND]
64
63
  USAGE
65
64
  $ backlog-exporter COMMAND
@@ -220,7 +219,7 @@ EXAMPLES
220
219
  最大1000件の課題を取得する(デフォルトは100件)
221
220
  ```
222
221
 
223
- _See code: [src/commands/all/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.2.1/src/commands/all/index.ts)_
222
+ _See code: [src/commands/all/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.2.3/src/commands/all/index.ts)_
224
223
 
225
224
  ## `backlog-exporter help [COMMAND]`
226
225
 
@@ -276,7 +275,7 @@ EXAMPLES
276
275
  最大10000件の課題を取得する(デフォルトは5000件)
277
276
  ```
278
277
 
279
- _See code: [src/commands/issue/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.2.1/src/commands/issue/index.ts)_
278
+ _See code: [src/commands/issue/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.2.3/src/commands/issue/index.ts)_
280
279
 
281
280
  ## `backlog-exporter plugins`
282
281
 
@@ -605,7 +604,7 @@ EXAMPLES
605
604
  指定したディレクトリの設定を使用して更新する
606
605
  ```
607
606
 
608
- _See code: [src/commands/update/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.2.1/src/commands/update/index.ts)_
607
+ _See code: [src/commands/update/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.2.3/src/commands/update/index.ts)_
609
608
 
610
609
  ## `backlog-exporter wiki`
611
610
 
@@ -632,7 +631,7 @@ EXAMPLES
632
631
  指定したディレクトリにWikiを保存する
633
632
  ```
634
633
 
635
- _See code: [src/commands/wiki/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.2.1/src/commands/wiki/index.ts)_
634
+ _See code: [src/commands/wiki/index.ts](https://github.com/ShuntaToda/backlog-exporter/blob/v0.2.3/src/commands/wiki/index.ts)_
636
635
  <!-- commandsstop -->
637
636
 
638
637
  # 出力形式
@@ -697,16 +696,3 @@ Backlog の書式がそのまま保持されます。
697
696
  - **並列処理**: 並列処理による高速なダウンロード
698
697
  - **ファイル名サニタイズ**: ファイル名の自動サニタイズ(不正な文字の除去)
699
698
  - **階層構造の保持**: Wiki の階層構造を保持したエクスポート
700
-
701
- # 最近の変更点
702
-
703
- ## 2023-07-XX - v0.0.7
704
-
705
- - `update`コマンドの改善:
706
- - ディレクトリ内の`backlog-settings.json`ファイルを再帰的に探索し、見つかったディレクトリでデータを更新
707
- - 親フォルダ内のファイルを直接上書きするように変更(サブフォルダを作成しない)
708
- - コードの改善:メソッドのパラメータをオブジェクト形式に変更し、コードの可読性を向上
709
- - 確認プロンプトの追加:更新前に確認メッセージを表示し、ユーザーの承認を得るように変更
710
- - ドキュメントの改善:
711
- - README に各コマンドの詳細な説明を追加
712
- - `npx`を使った実行方法の説明を追加
@@ -159,6 +159,8 @@ async function fetchAllCommentsForIssue({ apiKey, baseUrl, command, issueKey, ra
159
159
  };
160
160
  try {
161
161
  await fetchComments();
162
+ // コメントを古い順(昇順)に並び替える
163
+ allComments.sort((a, b) => new Date(a.created).getTime() - new Date(b.created).getTime());
162
164
  return { comments: allComments };
163
165
  }
164
166
  catch (error) {
@@ -52,9 +52,11 @@ export async function saveSettings(directory, settings) {
52
52
  export async function updateSettings(directory, newSettings) {
53
53
  // 既存の設定を読み込む
54
54
  const currentSettings = await loadSettings(directory);
55
- // 新しい設定で更新
56
- const updatedSettings = { ...currentSettings, ...newSettings };
55
+ // 新しい設定で更新(apiKeyは除外)
56
+ const { apiKey, ...settingsToSave } = newSettings;
57
+ const updatedSettings = { ...currentSettings, ...settingsToSave };
57
58
  // 更新した設定を保存
58
59
  await saveSettings(directory, updatedSettings);
59
- return updatedSettings;
60
+ // apiKeyは戻り値には含める
61
+ return { ...updatedSettings, apiKey };
60
62
  }
@@ -289,5 +289,5 @@
289
289
  ]
290
290
  }
291
291
  },
292
- "version": "0.2.1"
292
+ "version": "0.2.3"
293
293
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "backlog-exporter",
3
3
  "description": "A new CLI generated with oclif",
4
- "version": "0.2.1",
4
+ "version": "0.2.3",
5
5
  "author": "ShuntaToda",
6
6
  "bin": {
7
7
  "backlog-exporter": "bin/run.js"