poi-plugin-item-improvement2-beta 1.0.25 → 1.0.26

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/CHANGELOG.md CHANGED
@@ -9,6 +9,35 @@ All notable changes to `poi-plugin-item-improvement2-beta` are documented here.
9
9
  - Add consumer views for equipment acquisition sources and special ship bonuses from `@sakura2333/kancolle-data`.
10
10
  - Remove the remaining local compatibility icon after the shared data package contains it.
11
11
 
12
+ ## [1.0.26] - 2026-06-28
13
+
14
+ ### Fixed
15
+
16
+ - Ensured the local use-item 71 compatibility PNG is explicitly included in official and beta npm packages.
17
+ - Re-encoded the unchanged icon pixels so Git patches and repository updates physically carry the binary asset instead of relying on an existing working-tree copy.
18
+
19
+ ### Changed
20
+
21
+ - Added an explicit npm `files` allowlist covering runtime JavaScript, localized resources, styles, and all icon assets.
22
+
23
+ ### Validation
24
+
25
+ - Added a package dry-run assertion that fails when `assets/icon/71.png` is absent from the npm tarball file list.
26
+ - Added PNG signature validation for the compatibility icon.
27
+
28
+ ## [1.0.25] - 2026-06-28
29
+
30
+ ### Changed
31
+
32
+ - Rewrote the in-app release notes to describe user-visible behavior instead of npm, schema, repository, and packaging implementation details.
33
+ - Added localized user-facing release-note copy for Simplified Chinese, Traditional Chinese, Japanese, and English.
34
+ - Kept detailed engineering changes in this repository `CHANGELOG.md` for development and release auditing.
35
+
36
+ ### Validation
37
+
38
+ - Added coverage that every in-app changelog key exists in all supported locales.
39
+ - Added coverage preventing technical package terminology from leaking back into the Simplified Chinese in-app release notes.
40
+
12
41
  ## [1.0.24] - 2026-06-28
13
42
 
14
43
  ### Changed
Binary file
package/i18n/en-US.json CHANGED
@@ -48,13 +48,15 @@
48
48
  "What's New": "What's New",
49
49
  "Release Notes": "Release Notes",
50
50
  "Close": "Close",
51
- "changelog_1_0_22_release_dialog": "Added a release notes dialog that appears once after a plugin update.",
52
- "changelog_1_0_22_manual_entry": "Added a What's New button so release notes can be opened again at any time.",
53
- "changelog_1_0_21_split_data": "Separated improvement list data from detailed route data and enabled independent data updates.",
54
- "changelog_1_0_21_route_tables": "Improvement routes with different materials, costs, or upgrade targets are now shown in separate tables.",
55
- "changelog_1_0_21_tamanami": "Added support for Tamanami Kai Ni's assistant-specific improvement material route.",
56
- "changelog_1_0_23_data_package": "Improvement data now comes from the versioned @sakura2333/kancolle-data package.",
57
- "changelog_1_0_23_no_runtime_sync": "Removed runtime GitHub synchronization; data is installed together with the plugin through npm.",
58
- "changelog_1_0_23_shared_icons": "Use-item PNG assets are now shared through the data package by both official and beta plugins.",
59
- "changelog_1_0_24_data_patch_range": "Compatible 0.1.x data-package patches can now be resolved during plugin installation or dependency refresh."
51
+ "changelog_1_0_26_useitem_icon": "Fixed a missing material icon after installation so the affected item now displays correctly.",
52
+ "changelog_1_0_25_user_focused": "Release notes now focus on visible features and usability, while implementation details stay out of the in-app dialog.",
53
+ "changelog_1_0_24_compatible_data_updates": "Compatible improvement-data updates can now be picked up when the plugin is installed or updated, reducing the need for frequent plugin releases.",
54
+ "changelog_1_0_23_offline_ready": "Improvement data and material icons are now installed with the plugin, so startup no longer waits for an online sync.",
55
+ "changelog_1_0_23_network_resilience": "The improvement view remains available when the network is unstable or temporarily offline.",
56
+ "changelog_1_0_23_consistent_data": "Stable and test releases now use the same improvement data for more consistent results.",
57
+ "changelog_1_0_22_auto_notes": "The plugin now shows the latest changes once after an update.",
58
+ "changelog_1_0_22_reopen_notes": "A What’s New button was added to the toolbar so release notes can be reopened at any time.",
59
+ "changelog_1_0_21_stable_data": "Improvement information now loads and updates more reliably.",
60
+ "changelog_1_0_21_separate_routes": "Improvement routes with different materials, costs, or upgrade targets are now shown in separate tables.",
61
+ "changelog_1_0_21_tamanami_route": "Added Tamanami Kai Ni’s dedicated material route and kept it separate from the normal route."
60
62
  }
package/i18n/ja-JP.json CHANGED
@@ -48,13 +48,15 @@
48
48
  "What's New": "更新履歴",
49
49
  "Release Notes": "更新履歴",
50
50
  "Close": "閉じる",
51
- "changelog_1_0_22_release_dialog": "プラグイン更新後に一度だけ表示される更新履歴ダイアログを追加しました。",
52
- "changelog_1_0_22_manual_entry": "更新履歴をいつでも再表示できるボタンを追加しました。",
53
- "changelog_1_0_21_split_data": "改修一覧データと詳細ルートデータを分離し、データを独立して更新できるようにしました。",
54
- "changelog_1_0_21_route_tables": "必要装備、資材、更新先が異なる改修ルートを別々の表で表示するようにしました。",
55
- "changelog_1_0_21_tamanami": "玉波改二限定の改修素材ルートに対応しました。",
56
- "changelog_1_0_23_data_package": "改修データをバージョン管理された @sakura2333/kancolle-data パッケージから読み込むようにしました。",
57
- "changelog_1_0_23_no_runtime_sync": "起動時の GitHub 同期を廃止し、npm 依存関係としてデータをインストールするようにしました。",
58
- "changelog_1_0_23_shared_icons": "アイテム PNG をデータパッケージに移し、正式版とベータ版で共用するようにしました。",
59
- "changelog_1_0_24_data_patch_range": "プラグインのインストールまたは依存関係の更新時に、互換性のある 0.1.x データパッケージ更新を取得できるようにしました。"
51
+ "changelog_1_0_26_useitem_icon": "インストール後に一部の資材アイコンが欠ける問題を修正し、正しく表示されるようになりました。",
52
+ "changelog_1_0_25_user_focused": "更新履歴を機能変更と使い勝手の内容に整理し、開発やデータ構造の詳細は表示しないようにしました。",
53
+ "changelog_1_0_24_compatible_data_updates": "プラグインのインストールや更新時に互換性のある新しい改修データを取得できるようになり、データ更新のたびにプラグインを更新する必要が減りました。",
54
+ "changelog_1_0_23_offline_ready": "改修データと資材アイコンをプラグインと一緒にインストールするようにし、起動時のオンライン同期待ちをなくしました。",
55
+ "changelog_1_0_23_network_resilience": "通信が不安定な場合や一時的にオフラインの場合でも、改修画面を利用できます。",
56
+ "changelog_1_0_23_consistent_data": "正式版とテスト版で同じ改修データを使用し、表示内容を統一しました。",
57
+ "changelog_1_0_22_auto_notes": "プラグイン更新後に、そのバージョンの変更内容を一度だけ自動表示するようにしました。",
58
+ "changelog_1_0_22_reopen_notes": "ツールバーに「更新履歴」ボタンを追加し、いつでも変更内容を確認できるようにしました。",
59
+ "changelog_1_0_21_stable_data": "改修情報の読み込みと更新をより安定させました。",
60
+ "changelog_1_0_21_separate_routes": "必要装備、資材、更新先が異なる改修ルートを別々の表で表示するようにしました。",
61
+ "changelog_1_0_21_tamanami_route": "玉波改二専用の改修素材ルートを追加し、通常ルートと混在しないようにしました。"
60
62
  }
package/i18n/zh-CN.json CHANGED
@@ -48,13 +48,15 @@
48
48
  "What's New": "更新日志",
49
49
  "Release Notes": "更新日志",
50
50
  "Close": "关闭",
51
- "changelog_1_0_22_release_dialog": "新增插件升级后仅显示一次的更新日志弹窗。",
52
- "changelog_1_0_22_manual_entry": "新增“更新日志”按钮,可随时再次查看版本变化。",
53
- "changelog_1_0_21_split_data": "分离改修列表数据与详细路线数据,并支持数据独立更新。",
54
- "changelog_1_0_21_route_tables": "材料、资材或升级目标不同的改修路线现在会分表展示。",
55
- "changelog_1_0_21_tamanami": "新增玉波改二限定改修材料路线支持。",
56
- "changelog_1_0_23_data_package": "改修数据改为从版本化的 @sakura2333/kancolle-data 数据包读取。",
57
- "changelog_1_0_23_no_runtime_sync": "移除运行时 GitHub 同步,数据会通过 npm 依赖随插件安装。",
58
- "changelog_1_0_23_shared_icons": "资材 PNG 已迁移到数据包,并由正式版与 Beta 版共同使用。",
59
- "changelog_1_0_24_data_patch_range": "插件安装或刷新依赖时,现在可以自动解析兼容的 0.1.x 数据包补丁版本。"
51
+ "changelog_1_0_26_useitem_icon": "修复部分资材图标在安装后的插件中缺失,相关资材现在可以正常显示。",
52
+ "changelog_1_0_25_user_focused": "更新日志现在只展示功能变化和使用体验,开发与数据结构细节不再打扰日常使用。",
53
+ "changelog_1_0_24_compatible_data_updates": "改修资料会在安装或更新插件时获取兼容的新版本,后续资料更新不必频繁升级插件。",
54
+ "changelog_1_0_23_offline_ready": "改修资料和资材图标现在会随插件一起安装,启动时无需再等待在线同步。",
55
+ "changelog_1_0_23_network_resilience": "网络不稳定或暂时离线时,改修页面仍可正常使用。",
56
+ "changelog_1_0_23_consistent_data": "正式版与测试版共用同一套改修资料,显示结果更加一致。",
57
+ "changelog_1_0_22_auto_notes": "插件更新后会自动展示一次本次版本变化。",
58
+ "changelog_1_0_22_reopen_notes": "工具栏新增“更新日志”按钮,可随时回看版本变化。",
59
+ "changelog_1_0_21_stable_data": "改修信息的加载和更新更加稳定。",
60
+ "changelog_1_0_21_separate_routes": "材料、资材或升级目标不同的改修路线现在会分表展示。",
61
+ "changelog_1_0_21_tamanami_route": "补充玉波改二专属的改修材料路线,避免与普通路线混在一起。"
60
62
  }
package/i18n/zh-TW.json CHANGED
@@ -48,13 +48,15 @@
48
48
  "What's New": "更新日誌",
49
49
  "Release Notes": "更新日誌",
50
50
  "Close": "關閉",
51
- "changelog_1_0_22_release_dialog": "新增外掛升級後僅顯示一次的更新日誌視窗。",
52
- "changelog_1_0_22_manual_entry": "新增「更新日誌」按鈕,可隨時再次查看版本變更。",
53
- "changelog_1_0_21_split_data": "分離改修列表資料與詳細路線資料,並支援資料獨立更新。",
54
- "changelog_1_0_21_route_tables": "材料、資材或升級目標不同的改修路線現在會分表顯示。",
55
- "changelog_1_0_21_tamanami": "新增玉波改二限定改修材料路線支援。",
56
- "changelog_1_0_23_data_package": "改修資料改為從版本化的 @sakura2333/kancolle-data 資料包讀取。",
57
- "changelog_1_0_23_no_runtime_sync": "移除執行時 GitHub 同步,資料會透過 npm 相依套件隨外掛安裝。",
58
- "changelog_1_0_23_shared_icons": "資材 PNG 已遷移到資料包,並由正式版與 Beta 版共同使用。",
59
- "changelog_1_0_24_data_patch_range": "外掛安裝或重新整理相依套件時,現在可以自動解析相容的 0.1.x 資料包修補版本。"
51
+ "changelog_1_0_26_useitem_icon": "修正部分資材圖示在安裝後的插件中缺失,相關資材現在可以正常顯示。",
52
+ "changelog_1_0_25_user_focused": "更新日誌現在只顯示功能變化與使用體驗,開發及資料結構細節不再干擾日常使用。",
53
+ "changelog_1_0_24_compatible_data_updates": "改修資料會在安裝或更新外掛時取得相容的新版本,後續資料更新不必頻繁升級外掛。",
54
+ "changelog_1_0_23_offline_ready": "改修資料與資材圖示現在會隨外掛一同安裝,啟動時不必再等待線上同步。",
55
+ "changelog_1_0_23_network_resilience": "網路不穩定或暫時離線時,改修頁面仍可正常使用。",
56
+ "changelog_1_0_23_consistent_data": "正式版與測試版共用同一套改修資料,顯示結果更加一致。",
57
+ "changelog_1_0_22_auto_notes": "外掛更新後會自動顯示一次本次版本變更。",
58
+ "changelog_1_0_22_reopen_notes": "工具列新增「更新日誌」按鈕,可隨時回看版本變更。",
59
+ "changelog_1_0_21_stable_data": "改修資訊的載入與更新更加穩定。",
60
+ "changelog_1_0_21_separate_routes": "材料、資材或升級目標不同的改修路線現在會分表顯示。",
61
+ "changelog_1_0_21_tamanami_route": "補充玉波改二專屬的改修材料路線,避免與一般路線混在一起。"
60
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poi-plugin-item-improvement2-beta",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "use new data source",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -57,5 +57,16 @@
57
57
  "8.0.99": "5.0.6",
58
58
  "8.3.0": "6.0.1"
59
59
  }
60
- }
60
+ },
61
+ "files": [
62
+ "index.js",
63
+ "views/**/*.js",
64
+ "assets/**/*",
65
+ "i18n/*.json",
66
+ "scripts/publish-beta.js",
67
+ "tests/improvement-data.test.js",
68
+ "CHANGELOG.md",
69
+ "README.md",
70
+ "REFACTOR_NOTES.md"
71
+ ]
61
72
  }
@@ -1,4 +1,7 @@
1
1
  const assert = require('assert')
2
+ const fs = require('fs')
3
+ const path = require('path')
4
+ const { execFileSync } = require('child_process')
2
5
  const {
3
6
  buildAssistantTextByDay,
4
7
  buildImprovementItem,
@@ -10,6 +13,7 @@ const {
10
13
 
11
14
 
12
15
  const {
16
+ CHANGELOG,
13
17
  compareVersions,
14
18
  getChangelogEntriesSince,
15
19
  } = require('../views/changelog.js')
@@ -19,13 +23,80 @@ assert.strictEqual(compareVersions('1.0.21', '1.0.21'), 0)
19
23
  assert.strictEqual(compareVersions('1.0.20', '1.0.21'), -1)
20
24
  assert.deepStrictEqual(
21
25
  getChangelogEntriesSince('1.0.21').map(entry => entry.version),
22
- ['1.0.24', '1.0.23', '1.0.22']
26
+ ['1.0.26', '1.0.25', '1.0.24', '1.0.23', '1.0.22']
23
27
  )
24
28
  assert.deepStrictEqual(
25
29
  getChangelogEntriesSince(null).map(entry => entry.version),
26
- ['1.0.24', '1.0.23', '1.0.22', '1.0.21']
30
+ ['1.0.26', '1.0.25', '1.0.24', '1.0.23', '1.0.22', '1.0.21']
31
+ )
32
+
33
+ const localeNames = ['zh-CN', 'zh-TW', 'ja-JP', 'en-US']
34
+ const locales = localeNames.reduce((result, localeName) => {
35
+ const localePath = path.join(__dirname, '..', 'i18n', `${localeName}.json`)
36
+ result[localeName] = JSON.parse(fs.readFileSync(localePath, 'utf8'))
37
+ return result
38
+ }, {})
39
+
40
+ const changelogKeys = CHANGELOG.reduce(
41
+ (keys, entry) => keys.concat(entry.items),
42
+ []
43
+ )
44
+
45
+ localeNames.forEach(localeName => {
46
+ changelogKeys.forEach(key => {
47
+ assert.strictEqual(
48
+ typeof locales[localeName][key],
49
+ 'string',
50
+ `${localeName} is missing changelog entry ${key}`
51
+ )
52
+ assert.ok(
53
+ locales[localeName][key].trim().length > 0,
54
+ `${localeName} has an empty changelog entry ${key}`
55
+ )
56
+ })
57
+ })
58
+
59
+ const technicalTerms = [
60
+ '@sakura2333/kancolle-data',
61
+ 'npm',
62
+ 'Schema',
63
+ '0.1.x',
64
+ 'PNG',
65
+ 'GitHub',
66
+ ]
67
+ const simplifiedChineseNotes = changelogKeys
68
+ .map(key => locales['zh-CN'][key])
69
+ .join('\n')
70
+ technicalTerms.forEach(term => {
71
+ assert.strictEqual(
72
+ simplifiedChineseNotes.includes(term),
73
+ false,
74
+ `user-facing changelog should not contain technical term: ${term}`
75
+ )
76
+ })
77
+
78
+ const projectRoot = path.join(__dirname, '..')
79
+ const compatibilityIconPath = path.join(projectRoot, 'assets', 'icon', '71.png')
80
+ const pngSignature = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a])
81
+ assert.ok(fs.existsSync(compatibilityIconPath), 'compatibility icon 71.png is missing')
82
+ assert.ok(
83
+ fs.readFileSync(compatibilityIconPath).subarray(0, 8).equals(pngSignature),
84
+ 'compatibility icon 71.png is not a valid PNG'
85
+ )
86
+
87
+ const dryRunOutput = execFileSync(
88
+ process.platform === 'win32' ? 'npm.cmd' : 'npm',
89
+ ['pack', '--dry-run', '--json', '--ignore-scripts'],
90
+ { cwd: projectRoot, encoding: 'utf8' }
91
+ )
92
+ const dryRun = JSON.parse(dryRunOutput)
93
+ const packedFiles = new Set(dryRun[0].files.map(file => file.path))
94
+ assert.ok(
95
+ packedFiles.has('assets/icon/71.png'),
96
+ 'npm package is missing assets/icon/71.png'
27
97
  )
28
98
 
99
+
29
100
  const ships = {
30
101
  89: { api_id: 89, api_name: '鳳翔' },
31
102
  622: { api_id: 622, api_name: '夕張改二' },
@@ -145,7 +216,6 @@ assert.deepStrictEqual(listProjection.itemIdsByDay[0], [19])
145
216
  assert.strictEqual(listProjection.assistantTextByItemId[19][-1], '鳳翔 / 鳳翔改二')
146
217
  assert.strictEqual(listProjection.assistantTextByItemId[19][0], '鳳翔')
147
218
 
148
- const fs = require('fs')
149
219
  const kancolleData = require('@sakura2333/kancolle-data')
150
220
 
151
221
  const {
@@ -9,20 +9,27 @@ const CURRENT_VERSION = pluginPackage.version;
9
9
  exports.CURRENT_VERSION = CURRENT_VERSION;
10
10
  const CHANGELOG_CONFIG_KEY = 'poi-plugin-item-improvement2-beta.lastSeenChangelogVersion';
11
11
  exports.CHANGELOG_CONFIG_KEY = CHANGELOG_CONFIG_KEY;
12
- const CHANGELOG_BASELINE_VERSION = '1.0.20';
12
+ const CHANGELOG_BASELINE_VERSION = '1.0.20'; // Keep in-app notes focused on user-visible behavior. Engineering details belong in CHANGELOG.md.
13
+
13
14
  exports.CHANGELOG_BASELINE_VERSION = CHANGELOG_BASELINE_VERSION;
14
15
  const CHANGELOG = [{
16
+ version: '1.0.26',
17
+ items: ['changelog_1_0_26_useitem_icon']
18
+ }, {
19
+ version: '1.0.25',
20
+ items: ['changelog_1_0_25_user_focused']
21
+ }, {
15
22
  version: '1.0.24',
16
- items: ['changelog_1_0_24_data_patch_range']
23
+ items: ['changelog_1_0_24_compatible_data_updates']
17
24
  }, {
18
25
  version: '1.0.23',
19
- items: ['changelog_1_0_23_data_package', 'changelog_1_0_23_no_runtime_sync', 'changelog_1_0_23_shared_icons']
26
+ items: ['changelog_1_0_23_offline_ready', 'changelog_1_0_23_network_resilience', 'changelog_1_0_23_consistent_data']
20
27
  }, {
21
28
  version: '1.0.22',
22
- items: ['changelog_1_0_22_release_dialog', 'changelog_1_0_22_manual_entry']
29
+ items: ['changelog_1_0_22_auto_notes', 'changelog_1_0_22_reopen_notes']
23
30
  }, {
24
31
  version: '1.0.21',
25
- items: ['changelog_1_0_21_split_data', 'changelog_1_0_21_route_tables', 'changelog_1_0_21_tamanami']
32
+ items: ['changelog_1_0_21_stable_data', 'changelog_1_0_21_separate_routes', 'changelog_1_0_21_tamanami_route']
26
33
  }];
27
34
  exports.CHANGELOG = CHANGELOG;
28
35