From b7e30de65da04c22b63ca2cb1fda9a1690a5e8b1 Mon Sep 17 00:00:00 2001 From: kyeunga25 <49793173+kyeunga25@users.noreply.github.com> Date: Tue, 8 Sep 2026 03:00:37 +0800 Subject: [PATCH] (feat): add 2019 spring Aikatsu Friends themes --- CHANGELOG.md | 6 ++ README.md | 6 +- docs/DATA_PROVENANCE.md | 4 +- docs/DATA_SOURCES.md | 4 +- docs/PROJECT_PLAN.md | 5 +- docs/QA_V1_53_2019_SPRING_AIKATSU_FRIENDS.md | 27 ++++++ package-lock.json | 4 +- package.json | 2 +- src/data/curated-data.ts | 6 ++ src/data/curated-season-registry.ts | 2 +- src/data/curated-seeds/2019/spring.ts | 45 +++++++++ src/data/curated-theme-sources/2019/spring.ts | 21 +++- tests/e2e/phase1.spec.ts | 95 ++++++++++++++++--- tests/unit/api-smoke.test.ts | 2 +- tests/unit/catalog-navigation.test.ts | 2 +- tests/unit/curated-2019-spring.test.ts | 66 ++++++++++++- tests/unit/curated-catalog.test.ts | 12 +-- tests/unit/curated-season-registry.test.ts | 2 +- .../curated-theme-source-registry.test.ts | 4 +- tests/unit/page-data.test.ts | 6 +- 20 files changed, 276 insertions(+), 45 deletions(-) create mode 100644 docs/QA_V1_53_2019_SPRING_AIKATSU_FRIENDS.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 69b299c..2d83792 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable public product changes are recorded here. Release notes contain only product scope and reproducible validation; platform identifiers and private operational details are excluded. +## v1.53.0 — 2019 春季《偶像學園Friends! 第二季》 + +- 收錄 TV 第二季與 OP〈ひとりじゃない!〉、一般 ED〈Be star〉,保留四人角色合唱、ひびき獨唱名義及共同詞曲編曲。 +- 每首歌使用相符的交叉來源,區分雙人改編版、前一季歌曲、遊戲與 TV;衝突 CD 日期、未核對聲優歌唱署名、特殊片尾及媒體維持空白。 +- 春季共 37 套作品、115 筆 OP/ED;本季與夏季仍在補充,2025 秋季尚未收錄。 + ## v1.52.0 — 2019 春季《星光王子》TV 歌曲 - 收錄《KING OF PRISM -Shiny Seven Stars-》TV 正篇、OP〈Shiny Seven Stars!〉及十一首 TRF 翻唱 ED,保留七人合唱與角色歌唱者。 diff --git a/README.md b/README.md index af786b8..01dd74a 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ Anisonary 是以 Astro + strict TypeScript 建立的動畫歌曲目錄,按季度與日本編輯播出日瀏覽作品、OP 與 ED。網站輸出為純靜態資產,正式交付使用 **Cloudflare Workers Static Assets**;它不是 Cloudflare Pages,也沒有 application Worker backend。下方同時保留 English technical notes。 -This repository contains the completed static product: season directory, anime detail pages, traceable OP/ED credits and links, per-song source ledgers, source-attributed media, local-only cross-season search, privacy-bounded offline reading, a GitHub correction flow, and deployment through Cloudflare Workers Static Assets. The default catalogue covers twenty-nine reviewed snapshots across 2019–2026, with 1,953 unique titles and 4,342 known OP/ED records. The 2019 spring snapshot contains thirty-six TV titles, including television shorts and a TV recut; summer contains 38 TV titles and four web series. Both quarters are still being expanded, and 2025 fall is not yet included. Fictional Mock Data remains test-only. +This repository contains the completed static product: season directory, anime detail pages, traceable OP/ED credits and links, per-song source ledgers, source-attributed media, local-only cross-season search, privacy-bounded offline reading, a GitHub correction flow, and deployment through Cloudflare Workers Static Assets. The default catalogue covers twenty-nine reviewed snapshots across 2019–2026, with 1,954 unique titles and 4,344 known OP/ED records. The 2019 spring snapshot contains thirty-seven TV titles, including television shorts and a TV recut; summer contains 38 TV titles and four web series. Both quarters are still being expanded, and 2025 fall is not yet included. Fictional Mock Data remains test-only. -目前 source 版本:**v1.52.0**。新增 2019 春季《星光王子 KING OF PRISM -Shiny Seven Stars-》TV 正篇的 OP 與十一首輪替 ED,保留七人合唱及個別歌唱者,區分劇場版、角色插曲與翻唱版本。目錄共有 29 個季度、1,953 套作品與 4,342 筆 OP/ED;春季為 36 套作品、113 筆歌曲,春、夏季仍在補充,2025 秋季尚未收錄。 +目前 source 版本:**v1.53.0**。新增 2019 春季《偶像學園Friends! 第二季》的四人合唱 OP 與一般 ED,保留共同詞曲編曲,分清雙人改編、舊季度歌曲與未核對特殊片尾。目錄共有 29 個季度、1,954 套作品與 4,344 筆 OP/ED;春季為 37 套作品、115 筆歌曲,春、夏季仍在補充,2025 秋季尚未收錄。 導覽延續固定五個入口與年代、年份、季度目錄;搜尋可按動畫、歌曲、創作者、年份、季度及 OP/ED 篩選,每頁顯示 12 套作品。搜尋完全在瀏覽器內進行,YouTube 只於明確操作後連線。網站與同源靜態 JSON API 共用已審閱資料,無 application backend 或 database binding。依賴安全 gate 繼續鎖定 `fast-uri` 3.1.6 並稽核開發依賴。 @@ -12,7 +12,7 @@ Production build 會從最終 HTML 自動產生 hash-based Content Security Poli | 可用性 / Availability | 成熟度 / Maturity | 證據 / Evidence | | -------------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| 公開靜態目錄 / Public static catalogue | Source 版本為 `v1.52.0`;正式發布狀態以對應 Release 驗收摘要為準 | [入口網站 / Live](https://anisonary.k-y.cc) · [版本與驗收 / Releases](https://github.com/kyeunga25/anisonary/releases) · [資料來源 / Sources](docs/DATA_SOURCES.md) · [安全政策 / Security](SECURITY.md) · [授權 / Licence](LICENSING.md) · [版權 / Copyright](COPYRIGHT.md) | +| 公開靜態目錄 / Public static catalogue | Source 版本為 `v1.53.0`;正式發布狀態以對應 Release 驗收摘要為準 | [入口網站 / Live](https://anisonary.k-y.cc) · [版本與驗收 / Releases](https://github.com/kyeunga25/anisonary/releases) · [資料來源 / Sources](docs/DATA_SOURCES.md) · [安全政策 / Security](SECURITY.md) · [授權 / Licence](LICENSING.md) · [版權 / Copyright](COPYRIGHT.md) | ## 技術棧|Technology stack diff --git a/docs/DATA_PROVENANCE.md b/docs/DATA_PROVENANCE.md index 730c137..96aa5ad 100644 --- a/docs/DATA_PROVENANCE.md +++ b/docs/DATA_PROVENANCE.md @@ -31,9 +31,9 @@ API、資料庫、商標或媒體重用權。完整授權邊界見 `first_party` 表示動畫製作/發行方、唱片公司、藝人官方渠道、官方影片或正式播出機構的公開頁面。`cross_check` 表示用於發現缺口及交叉比對的公開索引。兩種角色都是來源分類,不代表數值信心或內容評分。 -2019 春季目前整理 36 套 TV 作品(含電視短篇及重編版),夏季整理 38 套 TV 作品及 4 套網絡連載;兩季的其他作品、跨季延續與特殊歌曲仍待核對;`coverageNote` 會在季度頁及 API 公開說明本季範圍。 +2019 春季目前整理 37 套 TV 作品(含電視短篇及重編版),夏季整理 38 套 TV 作品及 4 套網絡連載;兩季的其他作品、跨季延續與特殊歌曲仍待核對;`coverageNote` 會在季度頁及 API 公開說明本季範圍。 -目前二十九季快照的 season references、1,953 個作品及 4,342 筆 OP/ED 都有結構化 provenance;4,342 筆歌曲全部至少保留一個 `first_party` 與一個 `cross_check` 來源。`tests/unit/curated-catalog.test.ts` 鎖定來源數量、角色、語言、HTTPS、核對日期、Mock URL 禁止條件,以及 legacy labels 與結構化 ledger 的一致性。 +目前二十九季快照的 season references、1,954 個作品及 4,344 筆 OP/ED 都有結構化 provenance;4,344 筆歌曲全部至少保留一個 `first_party` 與一個 `cross_check` 來源。`tests/unit/curated-catalog.test.ts` 鎖定來源數量、角色、語言、HTTPS、核對日期、Mock URL 禁止條件,以及 legacy labels 與結構化 ledger 的一致性。 ## 欄位決策 diff --git a/docs/DATA_SOURCES.md b/docs/DATA_SOURCES.md index 2dc3e06..af386bd 100644 --- a/docs/DATA_SOURCES.md +++ b/docs/DATA_SOURCES.md @@ -11,13 +11,13 @@ repository 的 Apache-2.0 軟件授權範圍內,詳見 季度完整性定義為:在日本於該季度日曆月份首播的非成人 `TV`/`WEB` 連載動畫,包含短篇、新季度與分割 cour;排除劇場版、OVA、宣傳短片及 18+ 作品。正式播出/配信的獨立特別篇只有在至少兩個季度來源一致歸入該季、並有可追溯第一方發布時才收錄。若作品在季度開始前數日先行發布,亦須由至少兩個季度目錄或主題曲索引一致歸入該季。同一作品跨季時共用一個詳情頁。 -目前 repository 中已審閱的快照為:2026 夏季 70 套、2026 春季 70 套、2026 冬季 66 套、2025 夏季 75 套、2025 春季 82 套、2025 冬季 59 套、2024 秋季 88 套、2024 夏季 68 套、2024 春季 76 套、2024 冬季 75 套、2023 秋季 100 套、2023 夏季 75 套、2023 春季 79 套、2023 冬季 72 套、2022 秋季 80 套、2022 夏季 69 套、2022 春季 79 套、2022 冬季 58 套、2021 秋季 65 套、2021 夏季 46 套、2021 春季 73 套、2021 冬季 67 套、2020 秋季 67 套、2020 夏季 31 套、2020 春季 61 套、2020 冬季 58 套、2019 秋季 67 套、2019 夏季 42 套(38 套 TV、4 套網絡連載)及 2019 春季 36 套 TV 作品(含電視短篇及重編版),共 1,953 個作品詳情、4,342 筆 OP/ED 與 567 個歌曲層 YouTube 直連;其中 1,812 筆已保留官方或正式授權影片 metadata。 +目前 repository 中已審閱的快照為:2026 夏季 70 套、2026 春季 70 套、2026 冬季 66 套、2025 夏季 75 套、2025 春季 82 套、2025 冬季 59 套、2024 秋季 88 套、2024 夏季 68 套、2024 春季 76 套、2024 冬季 75 套、2023 秋季 100 套、2023 夏季 75 套、2023 春季 79 套、2023 冬季 72 套、2022 秋季 80 套、2022 夏季 69 套、2022 春季 79 套、2022 冬季 58 套、2021 秋季 65 套、2021 夏季 46 套、2021 春季 73 套、2021 冬季 67 套、2020 秋季 67 套、2020 夏季 31 套、2020 春季 61 套、2020 冬季 58 套、2019 秋季 67 套、2019 夏季 42 套(38 套 TV、4 套網絡連載)及 2019 春季 37 套 TV 作品(含電視短篇及重編版),共 1,954 個作品詳情、4,344 筆 OP/ED 與 567 個歌曲層 YouTube 直連;其中 1,812 筆已保留官方或正式授權影片 metadata。 每季先以繁中年度動畫表的對應月份建立日曆清單,再與 Annict、Bangumi 及 AniList identifier 取聯集核對。OP/ED 以作品官網和官方 YouTube 為主,並用 AnimeThemes、UZUREA 與 UtaTen 等季度主題曲表交叉確認;季度歌曲索引未收錄的作品,須返回 Netflix、唱片公司、IP 官網、正式播出機構或製作公司等第一方頁面補證。台港正式代理、串流或出版社名稱優先;未有可確認的繁中名稱時保留原文,不宣稱為正式授權譯名。 2019 春、夏季仍在補充,2025 秋季尚未收錄;季度快照代表已核對範圍,不代表歷史作品或歌曲已全部補齊。 -每首已發布歌曲在 `PublicTheme.sources[]` 留下 URL、語言、`first_party`/`cross_check` 角色及核對日期。二十九季快照的 4,342 筆歌曲都必須同時具備兩種角色;這是公開 provenance gate,不是 confidence score。第三方索引將歌曲標為 OP/ED、但第一方頁面只證實插曲、劇中歌、Victory Dance、其他節目用途、舊季度歌曲、其他改編版本或一般「主題歌」時,不把它升格為官方 OP/ED;在既有導航契約中保留的一般主題曲會明示「主題歌(官方分類)」。完整欄位與媒體邊界見 [`DATA_PROVENANCE.md`](./DATA_PROVENANCE.md)。 +每首已發布歌曲在 `PublicTheme.sources[]` 留下 URL、語言、`first_party`/`cross_check` 角色及核對日期。二十九季快照的 4,344 筆歌曲都必須同時具備兩種角色;這是公開 provenance gate,不是 confidence score。第三方索引將歌曲標為 OP/ED、但第一方頁面只證實插曲、劇中歌、Victory Dance、其他節目用途、舊季度歌曲、其他改編版本或一般「主題歌」時,不把它升格為官方 OP/ED;在既有導航契約中保留的一般主題曲會明示「主題歌(官方分類)」。完整欄位與媒體邊界見 [`DATA_PROVENANCE.md`](./DATA_PROVENANCE.md)。 ## 固定來源 diff --git a/docs/PROJECT_PLAN.md b/docs/PROJECT_PLAN.md index 9b09175..5db3b09 100644 --- a/docs/PROJECT_PLAN.md +++ b/docs/PROJECT_PLAN.md @@ -4,8 +4,8 @@ ## Current product scope -- 2026 夏季 70 套、2026 春季 70 套、2026 冬季 66 套、2025 夏季 75 套、2025 春季 82 套、2025 冬季 59 套、2024 秋季 88 套、2024 夏季 68 套、2024 春季 76 套、2024 冬季 75 套、2023 秋季 100 套、夏季 75 套、春季 79 套、冬季 72 套、2022 秋季 80 套、夏季 69 套、春季 79 套、冬季 58 套、2021 秋季 65 套、夏季 46 套、春季 73 套、冬季 67 套、2020 秋季 67 套、夏季 31 套、春季 61 套、冬季 58 套、2019 秋季 67 套、2019 夏季 42 套及 2019 春季 36 套非成人 TV/網絡連載作品; -- 跨季作品共用詳情頁,共 1,953 個唯一作品及 4,342 筆已審閱 OP/ED; +- 2026 夏季 70 套、2026 春季 70 套、2026 冬季 66 套、2025 夏季 75 套、2025 春季 82 套、2025 冬季 59 套、2024 秋季 88 套、2024 夏季 68 套、2024 春季 76 套、2024 冬季 75 套、2023 秋季 100 套、夏季 75 套、春季 79 套、冬季 72 套、2022 秋季 80 套、夏季 69 套、春季 79 套、冬季 58 套、2021 秋季 65 套、夏季 46 套、春季 73 套、冬季 67 套、2020 秋季 67 套、夏季 31 套、春季 61 套、冬季 58 套、2019 秋季 67 套、2019 夏季 42 套及 2019 春季 37 套非成人 TV/網絡連載作品; +- 跨季作品共用詳情頁,共 1,954 個唯一作品及 4,344 筆已審閱 OP/ED; - 五個固定導覽入口、年代/年份/季度目錄、星期一至星期日及不定期分組、分頁本機搜尋、動畫詳情與同源 static JSON API; - 每個季度、作品及歌曲公開來源、語言、review state 及核對日期;每首歌曲同時具備第一方/交叉核對來源; - 官方/licensed YouTube 導航、明確第三方連線同意、來源歸屬及無圖 fallback; @@ -87,6 +87,7 @@ - **v1.50.0 source**:2019 春季增加《灰姑娘女孩劇場 第四季:CLIMAX SEASON》與 3 首月替 ED、3 筆官方試聽 metadata;保留角色合唱、個別演唱者與 CD 日期,遊戲限定短篇、CD 獨唱混音及附加曲不作 TV 歌曲,春季共 34 套作品與 99 筆歌曲;發布證據見對應 GitHub Release。 - **v1.51.0 source**:2019 春季增加《叛逆性百萬亞瑟王 第二季》、2 筆 OP/ED 及 1 筆官方片頭 MV metadata;區分原演唱組合、改編版與配信/CD 日期,未核對的個別演唱及製作署名維持空白。春季共 35 套作品與 101 筆歌曲;發布證據見對應 GitHub Release。 - **v1.52.0 source**:2019 春季增加《星光王子 KING OF PRISM -Shiny Seven Stars-》TV 正篇與 12 筆 OP/ED,保留七人合唱及個別歌唱者;介紹特別節目、劇場片尾、角色插曲及其他演唱版本保持獨立,衝突日期與未核對製作署名留空。春季共 36 套作品與 113 筆歌曲;發布證據見對應 GitHub Release。 +- **v1.53.0 source**:2019 春季增加《偶像學園Friends! 第二季》、四人合唱 OP 與一般 ED,保留共同作詞、作曲及編曲者,使用逐曲交叉來源;未核對特殊片尾、聲優歌唱署名、媒體與衝突日期留空。春季共 37 套作品與 115 筆歌曲;發布證據見對應 GitHub Release。 - 正式網站使用 custom domain;非正式 Cloudflare hostname 不在公開文檔記錄; - 私有 backend、資料庫、crawler、帳戶設定、憑證與內部規則不屬於本公開 repository。 diff --git a/docs/QA_V1_53_2019_SPRING_AIKATSU_FRIENDS.md b/docs/QA_V1_53_2019_SPRING_AIKATSU_FRIENDS.md new file mode 100644 index 0000000..143c685 --- /dev/null +++ b/docs/QA_V1_53_2019_SPRING_AIKATSU_FRIENDS.md @@ -0,0 +1,27 @@ +# v1.53.0 QA:2019 春季《偶像學園Friends! 第二季》 + +來源核對日期:2026-09-08。本切片新增 2019 年 TV 第二季、四人演唱 OP 與一般 ED。春季共 37 套作品、115 筆歌曲;春、夏季仍在補充,2025 秋季尚未收錄。 + +## 資料與來源 + +- [繁中季度列表](https://youranimes.tw/bangumi/201904)及 [YourAnimes 作品條目](https://youranimes.tw/animes/2181)核對第二季名稱、春季範圍與 26 話完結狀態;繁中名稱作交叉對照,不把遊戲地區名稱宣稱為正式 TV 譯名。 +- [BANDAI 官方公告](https://bandai-a.akamaihd.net/corp/press/100000741765491.pdf)確認日文 TV 副題;[東京電視台首集節目頁](https://www.tv-tokyo.co.jp/broad_tvtokyo/program/detail/201904/22343_201904041825.html)核對 2019-04-04、每週四 18:25。2018 年第一季、遊戲更新與後續《on Parade!》不合併為本季作品。 +- [動畫官方 CD 公告](https://www.aikatsu.net/aikatsufriends_02/aikatsufriendscom/?offset=5#5420)與[第二季播出頁](https://www.tv-tokyo.co.jp/broad_tvtokyo/program/detail/201908/22343_201908221825.html)核對 OP〈ひとりじゃない!〉的あいね・みお・舞花・エマ四人名義,以及一般 ED〈Be star〉的ひびき名義。詞曲編曲依官方公告,Maozon 與 YUKI FUNAKOSHI 分別保留共同作曲和編曲角色。 +- [OP 交叉來源](https://utaten.com/lyric/mi19041917/)明示第二季 OP 及四人名義;[ED 的 TV-Size 交叉來源](https://utaten.com/lyric/mi19082003/)只核對演唱名義及詞曲,不把 TV-Size 發行日期套到單曲。逐曲交叉來源保持各自的版本邊界,既有作品的來源輸出不變。 +- 官方 CD 公告列 2019-04-27,[OP 交叉頁](https://utaten.com/lyric/mi19041917/)與[唱片商品索引](https://www.billboard-japan.com/goods/detail/612838)列 2019-04-24;未取得來源方更正說明,兩曲 `releaseDate` 留空並顯示待核對。 +- 首集節目頁的歌曲欄仍列前一季歌曲,僅作作品識別/首播證據。TV 一般 OP/ED 用途以第二季播出頁與官方 CD 公告核對,不推論舊歌曲在首集的實際用途。 +- 雙人改編版、其他角色版本、OFF VOCAL、插曲與特殊片尾不由一般主題曲或商品收錄推定。未核對的聲優歌唱署名與媒體保持空白;特殊片尾待取得第一方用途證據後再補充。 +- 只保留必要事實、短識別名稱與來源連結;不複製歌詞、介紹、圖片、音訊、影片或整頁資料。詞曲作者所屬公司不作額外共同創作者。 + +## 本機驗收 + +- `npm run catalog:check`:252 項通過;完整 `npm run check` 通過,包含公開邊界、依賴稽核、lint、355 項 unit、build、Cloudflare dry-run 與 52 項 Playwright。 +- 完整與正式依賴稽核均為 0 項漏洞;`fast-uri` 維持 3.1.6,既有 8 項安全回歸包含在 unit suite。 +- 建置 1,998 份 HTML,3,995 份產物通過公開邊界;Cloudflare dry-run 沒有 runtime binding。 +- 對比上一個 source 切片,1,982 份既有 API 完全相同,只更新春季清單並新增一份作品詳情 API;沒有移除。既有作品的來源 ledger 保持相同。 +- Browser plugin 未提供,使用既有 Playwright。1280、960、390、320px 及 390px 無 JavaScript 共 25 個畫面通過;沒有水平溢出、framework overlay、page error、console error、預先 YouTube 請求或 iframe。已目視桌面 OP 與手機展開的 ED 來源、角色合唱名義及共同創作者換行。 +- 操作涵蓋繁中作品搜尋、年份/季度/OP/ED 篩選、Maozon 創作者搜尋、歌曲錨點與焦點、Enter 展開來源,以及無 JavaScript 的年份 → 季度 → 作品。完整回歸亦涵蓋鍵盤、返回、分頁、離線、404、影片同意與錯誤頁。 + +## 發布界線 + +本機與分支建置結果不代表正式網站已更新。發布時仍須核對合併 SHA、CI、Cloudflare 實際版本與流量,以及 live routes、headers、API 與產物內容。本切片未驗證實體裝置、Safari、Firefox、Lighthouse/Core Web Vitals 或實際 YouTube 播放。 diff --git a/package-lock.json b/package-lock.json index 2d20eb1..5835e72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "anisonary", - "version": "1.52.0", + "version": "1.53.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "anisonary", - "version": "1.52.0", + "version": "1.53.0", "license": "SEE LICENSE IN LICENSING.md", "dependencies": { "@astrojs/sitemap": "^3.7.3", diff --git a/package.json b/package.json index f5805cc..451c14a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "anisonary", - "version": "1.52.0", + "version": "1.53.0", "private": true, "license": "SEE LICENSE IN LICENSING.md", "type": "module", diff --git a/src/data/curated-data.ts b/src/data/curated-data.ts index c7dc5ed..f1b6c13 100644 --- a/src/data/curated-data.ts +++ b/src/data/curated-data.ts @@ -4610,6 +4610,12 @@ const animeOfficialSourceOverrides: Record = { + "catalog-aikatsu-friends-2-2019": [{ + label: "BANDAI:2019 年 TV 第二季的正式日文名稱與遊戲版本分界", + url: "https://bandai-a.akamaihd.net/corp/press/100000741765491.pdf", + language: "ja", + role: "first_party" + }], "catalog-king-of-prism-sss-2019": [{ label: "LINE TV 正式播出頁:繁中 TV 名稱與完結集數", url: "https://www.linetv.tw/drama/18245/eps/7", diff --git a/src/data/curated-season-registry.ts b/src/data/curated-season-registry.ts index a5864c6..579bff9 100644 --- a/src/data/curated-season-registry.ts +++ b/src/data/curated-season-registry.ts @@ -452,7 +452,7 @@ export const curatedSeasonRegistry = validateCuratedSeasonRegistry([ quarter: "spring", titleZhHant: "春季動畫", titleJa: "2019年春アニメ", - coverageNote: "本季正在補充,目前收錄 36 套 TV 作品(含電視短篇及重編版)。其餘作品、跨季延續及特殊歌曲版本仍待核對。", + coverageNote: "本季正在補充,目前收錄 37 套 TV 作品(含電視短篇及重編版)。其餘作品、跨季延續及特殊歌曲版本仍待核對。", seeds: curated2019SpringSeeds, animeIds: curated2019SpringAnimeIds } diff --git a/src/data/curated-seeds/2019/spring.ts b/src/data/curated-seeds/2019/spring.ts index 1d3edc5..fd8bfb7 100644 --- a/src/data/curated-seeds/2019/spring.ts +++ b/src/data/curated-seeds/2019/spring.ts @@ -1698,6 +1698,51 @@ const strikeWitches501EndingRows = [ ] as const; const independentSpringSeeds: NativeCuratedAnimeSeed[] = [{ + id: "catalog-aikatsu-friends-2-2019", + slug: "aikatsu-friends-2-2019", + titleJa: "アイカツフレンズ!~かがやきのジュエル~", + titleZhHant: "偶像學園Friends! 第二季", + seasonIds: ["2019-spring"], + startDate: "2019-04-04", + editorialWeekday: 4, + broadcastTimeJst: "18:25", + broadcastLabel: "東京電視台每週四 18:25(日本時間;2019 年第 2 季)", + status: "finished", + verifiedAt: "2026-09-08", + officialSiteUrl: "https://www.aikatsu.net/aikatsufriends_02/", + identifierSource: { + label: "東京電視台:第 2 季首集識別與首播日期、時段", + url: "https://www.tv-tokyo.co.jp/broad_tvtokyo/program/detail/201904/22343_201904041825.html", + language: "ja" + }, + wikipediaUrl: "https://youranimes.tw/bangumi/201904", + sourceReferenceUrls: ["https://youranimes.tw/animes/2181"], + themes: [{ + type: "OP", + sequence: 1, + titleJa: "ひとりじゃない!", + artistDisplayName: "あいね・みお・舞花・エマ from BEST FRIENDS!", + versionLabel: "TV 第 2 季 OP/四人演唱版;CD 日期與聲優歌唱署名待核對", + credits: [ + { name: "松原さらり", role: "lyrics" }, + { name: "SHOW", role: "composition" }, + { name: "SHOW", role: "arrangement" } + ] + }, { + type: "ED", + sequence: 1, + titleJa: "Be star", + artistDisplayName: "ひびき from BEST FRIENDS!", + versionLabel: "TV 第 2 季一般 ED/ひびき版;CD 日期與聲優歌唱署名待核對", + credits: [ + { name: "松原さらり", role: "lyrics" }, + { name: "Maozon", role: "composition" }, + { name: "YUKI FUNAKOSHI", role: "composition" }, + { name: "Maozon", role: "arrangement" }, + { name: "YUKI FUNAKOSHI", role: "arrangement" } + ] + }] +}, { "id": "catalog-king-of-prism-sss-2019", "slug": "king-of-prism-sss-2019", "titleJa": "KING OF PRISM -Shiny Seven Stars-", diff --git a/src/data/curated-theme-sources/2019/spring.ts b/src/data/curated-theme-sources/2019/spring.ts index 7fae87a..cb79d56 100644 --- a/src/data/curated-theme-sources/2019/spring.ts +++ b/src/data/curated-theme-sources/2019/spring.ts @@ -3,6 +3,8 @@ import { getCuratedAnimeKey, getCuratedThemeKey } from "@/data/curated-seeds/ide import type { CuratedThemeSourceOverrideMap, CuratedThemeSourceSeed } from "@/data/curated-theme-sources/types"; const firstPartyUrlsByTheme: Readonly> = { + "catalog-aikatsu-friends-2-2019:OP:1": ["https://www.aikatsu.net/aikatsufriends_02/aikatsufriendscom/?offset=5#5420", "https://www.tv-tokyo.co.jp/broad_tvtokyo/program/detail/201908/22343_201908221825.html"], + "catalog-aikatsu-friends-2-2019:ED:1": ["https://www.aikatsu.net/aikatsufriends_02/aikatsufriendscom/?offset=5#5420", "https://www.tv-tokyo.co.jp/broad_tvtokyo/program/detail/201908/22343_201908221825.html"], "catalog-king-of-prism-sss-2019:OP:1": ["https://kinpri.com/sss/sp/discography/detail.php?id=1016430", "https://www.tv-tokyo.co.jp/broad_tvtokyo/program/detail/201904/25383_201904152535.html"], "catalog-king-of-prism-sss-2019:ED:1": ["https://kinpri.com/sss/sp/discography/detail.php?id=1016530", "https://www.youtube.com/watch?v=420RJfS0G7Y"], "catalog-king-of-prism-sss-2019:ED:2": ["https://kinpri.com/sss/sp/discography/detail.php?id=1016531", "https://www.youtube.com/watch?v=420RJfS0G7Y"], @@ -293,6 +295,8 @@ const firstPartyUrlsByTheme: Readonly> = { }; const sourceLabelsByUrl: Readonly> = { + "https://www.aikatsu.net/aikatsufriends_02/aikatsufriendscom/?offset=5#5420": "動畫官方:第 2 季 OP/ED 演唱名義與詞曲編曲(CD 日期另待核對)", + "https://www.tv-tokyo.co.jp/broad_tvtokyo/program/detail/201908/22343_201908221825.html": "東京電視台:TV 四人合唱 OP 與ひびき獨唱 ED 用途", "https://kinpri.com/sss/sp/discography/detail.php?id=1016430": "動畫官方商品頁:OP 七人演唱名義與 CD 日期", "https://kinpri.com/sss/sp/discography/detail.php?id=1016530": "動畫官方商品頁:寒い夜だから・・・ 的演唱者與 CD 日期", "https://kinpri.com/sss/sp/discography/detail.php?id=1016531": "動畫官方商品頁:masquerade 的演唱者與 CD 日期", @@ -509,11 +513,26 @@ const crossCheckSourcesByAnime: Readonly> } }; +const crossCheckSourcesByTheme: Readonly> = { + "catalog-aikatsu-friends-2-2019:OP:1": { + label: "UtaTen:第 2 季 OP、四人演唱名義與詞曲交叉核對", + url: "https://utaten.com/lyric/mi19041917/", + language: "ja", + role: "cross_check" + }, + "catalog-aikatsu-friends-2-2019:ED:1": { + label: "UtaTen:TV-Size 的ひびき演唱名義與共同詞曲交叉核對;不採此版本日期", + url: "https://utaten.com/lyric/mi19082003/", + language: "ja", + role: "cross_check" + } +}; + export const curated2019SpringThemeSources: CuratedThemeSourceOverrideMap = Object.fromEntries( curated2019SpringSeeds.flatMap((seed) => seed.themes.map((theme) => { const key = getCuratedThemeKey(seed, theme); const urls = firstPartyUrlsByTheme[key]; - const crossCheck: CuratedThemeSourceSeed | undefined = crossCheckSourcesByAnime[getCuratedAnimeKey(seed)] ?? (seed.animeThemesUrl ? { + const crossCheck: CuratedThemeSourceSeed | undefined = crossCheckSourcesByTheme[key] ?? crossCheckSourcesByAnime[getCuratedAnimeKey(seed)] ?? (seed.animeThemesUrl ? { label: "AnimeThemes:OP/ED 次序與演唱版本交叉核對", url: seed.animeThemesUrl, language: "en", diff --git a/tests/e2e/phase1.spec.ts b/tests/e2e/phase1.spec.ts index 046351a..5867f54 100644 --- a/tests/e2e/phase1.spec.ts +++ b/tests/e2e/phase1.spec.ts @@ -460,7 +460,7 @@ test("cross-season search stays local and matches anime, songs, and artists", as await page.goto("/search/"); await expect(page.getByRole("heading", { name: "跨季度搜尋" })).toBeVisible(); - await expect(page.locator("[data-catalog-anime-count]")).toHaveText("1953"); + await expect(page.locator("[data-catalog-anime-count]")).toHaveText("1954"); const search = page.getByRole("searchbox", { name: "搜尋動畫、歌曲或創作者" }); await search.fill("MYTH & ROID"); @@ -500,7 +500,7 @@ test("cross-season search stays local and matches anime, songs, and artists", as await expect(page.locator("[data-catalog-anime-count]")).toHaveText("0"); await search.press("Escape"); - await expect(page.locator("[data-catalog-anime-count]")).toHaveText("1953"); + await expect(page.locator("[data-catalog-anime-count]")).toHaveText("1954"); expect(externalRequests).toEqual([]); }); @@ -908,7 +908,7 @@ test("catalogue navigation stays compact and drills down through published years await expect(navigation.getByRole("link", { name: /動畫目錄/ })).toHaveAttribute("aria-current", "true"); await expect(page.getByRole("navigation", { name: "2025 年季度導覽" }).getByRole("link", { name: "春季" })).toHaveAttribute("aria-current", "page"); await expect(page.getByRole("navigation", { name: "所在位置" }).getByRole("link", { name: "2025", exact: true })).toHaveAttribute("href", "/catalog/2025/"); - await expect(page.getByLabel("季度資料狀態")).toContainText("已發布 29 個季度、1,953 個作品頁與 4,342 首 OP/ED"); + await expect(page.getByLabel("季度資料狀態")).toContainText("已發布 29 個季度、1,954 個作品頁與 4,344 首 OP/ED"); await page.setViewportSize({ width: 390, height: 844 }); await page.reload(); @@ -1245,10 +1245,10 @@ test("2019 spring browsing and creator search reach the correct special ending o for (const width of [1280, 390]) { await page.setViewportSize({ width, height: 844 }); await page.goto("/catalog/2019/"); - await page.getByRole("link", { name: /春季動畫.*36 套動畫/ }).click(); + await page.getByRole("link", { name: /春季動畫.*37 套動畫/ }).click(); await expect(page.getByRole("heading", { name: "2019 春季動畫" })).toBeVisible(); - await expect(page.getByText("本季正在補充,目前收錄 36 套 TV 作品(含電視短篇及重編版)。其餘作品、跨季延續及特殊歌曲版本仍待核對。", { exact: true })).toBeVisible(); - await expect(page.locator("[data-anime-card]")).toHaveCount(36); + await expect(page.getByText("本季正在補充,目前收錄 37 套 TV 作品(含電視短篇及重編版)。其餘作品、跨季延續及特殊歌曲版本仍待核對。", { exact: true })).toBeVisible(); + await expect(page.locator("[data-anime-card]")).toHaveCount(37); await expect(page.locator("[data-anime-card] img")).toHaveCount(0); expect(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth)).toBe(true); @@ -1681,6 +1681,71 @@ test("anime details keep full-width poster-free headings and readable metadata a } }); +test("Aikatsu Friends second-season search preserves the four-character opening, joint writers and withheld release dates across devices", async ({ page, browser, request }) => { + test.setTimeout(60_000); + const slug = "aikatsu-friends-2-2019"; + const mediaRequests: string[] = []; + page.on("request", (item) => { + if (/youtube|ytimg|googlevideo/.test(new URL(item.url()).hostname)) mediaRequests.push(item.url()); + }); + const response = await request.get(`/api/v1/anime/${slug}.json`); + expect(response.status()).toBe(200); + const detail = await response.json(); + expect(detail.id).toBe("catalog-aikatsu-friends-2-2019"); + expect(detail.themes).toHaveLength(2); + for (const theme of detail.themes) expect(theme).not.toHaveProperty("releaseDate"); + for (const width of [1280, 960, 390, 320]) { + await page.setViewportSize({ width, height: 844 }); + await page.goto("/search/", { waitUntil: "domcontentloaded" }); + await page.getByRole("searchbox", { name: "搜尋動畫、歌曲或創作者" }).fill("偶像學園Friends"); + await page.getByLabel("年份", { exact: true }).selectOption("2019"); + await page.getByLabel("季度", { exact: true }).selectOption("spring"); + await expect(page.locator("[data-catalog-result]")).toHaveCount(1); + await page.getByRole("link", { name: "アイカツフレンズ!~かがやきのジュエル~", exact: true }).first().click(); + await expect(page.locator(".anime-hero__zh")).toHaveText("偶像學園Friends! 第二季"); + await expect(page.locator(".anime-hero__meta")).toContainText("每週四 18:25"); + await expect(page.locator(".theme-card")).toHaveCount(2); + await expect(page.locator(".theme-card time")).toHaveCount(0); + const opening = page.locator(`#theme-${slug}-op-1`); + await expect(opening.locator(".theme-card__artist")).toHaveText("あいね・みお・舞花・エマ from BEST FRIENDS!"); + await expect(opening).toContainText("CD 日期與聲優歌唱署名待核對"); + await opening.locator("details summary").focus(); + await page.keyboard.press("Enter"); + await expect(opening.locator("details")).toHaveAttribute("open"); + await expect(opening.locator('a[href="https://utaten.com/lyric/mi19041917/"]')).toBeVisible(); + await page.getByRole("link", { name: "搜尋「Maozon」的歌曲", exact: true }).first().focus(); + await page.keyboard.press("Enter"); + await expect(page.getByRole("searchbox", { name: "搜尋動畫、歌曲或創作者" })).toHaveValue("Maozon"); + for (const [label, value] of [["年份", "2019"], ["季度", "spring"], ["歌曲用途", "ED"]]) await page.getByLabel(label!, { exact: true }).selectOption(value!); + await page.getByRole("link", { name: "Be star", exact: true }).click(); + const ending = page.locator(`#theme-${slug}-ed-1`); + await expect(ending).toBeFocused(); + await expect(ending.locator(".theme-card__artist")).toHaveText("ひびき from BEST FRIENDS!"); + for (const name of ["Maozon", "YUKI FUNAKOSHI"]) await expect(ending.getByRole("link", { name: `搜尋「${name}」的歌曲`, exact: true })).toHaveCount(2); + await expect(page.getByRole("button", { name: /載入 YouTube 影片/ })).toHaveCount(0); + await expect(page.locator("iframe")).toHaveCount(0); + expect(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth)).toBe(true); + } + expect(mediaRequests).toEqual([]); + const context = await browser.newContext({ javaScriptEnabled: false, viewport: { width: 390, height: 844 } }); + try { + const nativePage = await context.newPage(); + await nativePage.goto(`${e2eOrigin}/catalog/2019/`, { waitUntil: "domcontentloaded" }); + await nativePage.getByRole("link", { name: /春季動畫.*37 套動畫/ }).click(); + await nativePage.getByRole("link", { name: "查看 アイカツフレンズ!~かがやきのジュエル~(偶像學園Friends! 第二季)", exact: true }).click(); + await expect(nativePage).toHaveURL(new RegExp(`/anime/${slug}/$`)); + await expect(nativePage.locator(".theme-card")).toHaveCount(2); + await expect(nativePage.locator(".theme-card time")).toHaveCount(0); + await nativePage.locator(`#theme-${slug}-ed-1 details summary`).focus(); + await nativePage.keyboard.press("Enter"); + await expect(nativePage.locator(`#theme-${slug}-ed-1 a[href="https://utaten.com/lyric/mi19082003/"]`)).toBeVisible(); + await expect(nativePage.locator("iframe")).toHaveCount(0); + expect(await nativePage.evaluate(() => document.documentElement.scrollWidth <= innerWidth)).toBe(true); + } finally { + await context.close(); + } +}); + test("KING OF PRISM search and compact song navigation preserve singing identities, cover endings and unverified dates across devices", async ({ page, browser, request }) => { test.setTimeout(60_000); const slug = "king-of-prism-sss-2019"; @@ -1746,7 +1811,7 @@ test("KING OF PRISM search and compact song navigation preserve singing identiti try { const nativePage = await context.newPage(); await nativePage.goto(`${e2eOrigin}/catalog/2019/`, { waitUntil: "domcontentloaded" }); - await nativePage.getByRole("link", { name: /春季動畫.*36 套動畫/ }).click(); + await nativePage.getByRole("link", { name: /春季動畫.*37 套動畫/ }).click(); await nativePage.getByRole("link", { name: "查看 KING OF PRISM -Shiny Seven Stars-(星光王子 KING OF PRISM -Shiny Seven Stars-)", exact: true }).click(); await expect(nativePage).toHaveURL(new RegExp(`/anime/${slug}/$`)); await nativePage.locator(".theme-navigation summary").focus(); @@ -1819,7 +1884,7 @@ test("Hangyaku second season preserves original song versions, missing credits a try { const nativePage = await context.newPage(); await nativePage.goto(`${e2eOrigin}/catalog/2019/`, { waitUntil: "domcontentloaded" }); - await nativePage.getByRole("link", { name: /春季動畫.*36 套動畫/ }).click(); + await nativePage.getByRole("link", { name: /春季動畫.*37 套動畫/ }).click(); await nativePage.getByRole("link", { name: /叛逆性ミリオンアーサー 第2シーズン/ }).first().click(); await expect(nativePage.locator(".theme-card")).toHaveCount(2); await expect(nativePage.locator(`#theme-${slug}-ed-1 a[href="https://catalog.bandainamcomusiclive.co.jp/release/68378/"]`)).toBeVisible(); @@ -1888,7 +1953,7 @@ test("CLIMAX SEASON search preserves monthly ensemble endings, individual singer try { const nativePage = await context.newPage(); await nativePage.goto(`${e2eOrigin}/catalog/2019/`, { waitUntil: "domcontentloaded" }); - await nativePage.getByRole("link", { name: /春季動畫.*36 套動畫/ }).click(); + await nativePage.getByRole("link", { name: /春季動畫.*37 套動畫/ }).click(); await nativePage.getByRole("link", { name: /アイドルマスター シンデレラガールズ劇場 CLIMAX SEASON/ }).first().click(); await expect(nativePage.locator(".theme-card")).toHaveCount(3); await nativePage.locator(`#theme-${slug}-ed-3 details summary`).focus(); @@ -1957,7 +2022,7 @@ test("Yo-kai Watch search separates the 2019 series and keeps shared writers and try { const nativePage = await context.newPage(); await nativePage.goto(`${e2eOrigin}/catalog/2019/`); - await nativePage.getByRole("link", { name: /春季動畫.*36 套動畫/ }).click(); + await nativePage.getByRole("link", { name: /春季動畫.*37 套動畫/ }).click(); await nativePage.getByRole("link", { name: /妖怪ウォッチ!/ }).first().click(); const sources = nativePage.locator(`#theme-${slug}-ed-1 details`); await sources.locator("summary").focus(); @@ -2014,7 +2079,7 @@ test("Bakugan Japanese theme search preserves shared credits and separates the l try { const nativePage = await context.newPage(); await nativePage.goto(`${e2eOrigin}/catalog/2019/`); - await nativePage.getByRole("link", { name: /春季動畫.*36 套動畫/ }).click(); + await nativePage.getByRole("link", { name: /春季動畫.*37 套動畫/ }).click(); await nativePage.getByRole("link", { name: /爆丸バトルプラネット/ }).first().click(); await expect(nativePage).toHaveURL(new RegExp(`/anime/${slug}/$`)); await expect(nativePage.locator(".theme-card")).toHaveCount(3); @@ -2155,7 +2220,7 @@ test("501 Takeoff creator search reaches the correct solo ending and keeps the g try { const nativePage = await context.newPage(); await nativePage.goto(`${e2eOrigin}/catalog/2019/`); - await nativePage.getByRole("link", { name: /春季動畫.*36 套動畫/ }).click(); + await nativePage.getByRole("link", { name: /春季動畫.*37 套動畫/ }).click(); await nativePage.getByRole("link", { name: /ストライクウィッチーズ 501部隊発進しますっ/ }).first().click(); await expect(nativePage).toHaveURL(new RegExp(`/anime/${slug}/$`)); await expect(nativePage.locator(".theme-card")).toHaveCount(13); @@ -2217,7 +2282,7 @@ test("Gonjiro search preserves independent identity, co-composers and the licens const context = await browser.newContext({ javaScriptEnabled: false, viewport: { width: 390, height: 844 } }); const nativePage = await context.newPage(); await nativePage.goto(`${e2eOrigin}/catalog/2019/`); - await nativePage.getByRole("link", { name: /春季動畫.*36 套動畫/ }).click(); + await nativePage.getByRole("link", { name: /春季動畫.*37 套動畫/ }).click(); await nativePage.getByRole("link", { name: /けだまのゴンじろー/ }).first().click(); await expect(nativePage).toHaveURL(/\/anime\/gonjiro-2019\/$/); await expect(nativePage.locator(".theme-card")).toHaveCount(2); @@ -2527,7 +2592,7 @@ test("weekday navigation follows populated groups and remains useful after filte await expect(navigation.getByRole("link", { name: "週六" })).toHaveAttribute("aria-current", "location"); await page.getByRole("button", { name: "清除篩選" }).click(); await expect(navigation.getByRole("link")).toHaveText(["週一", "週二", "週三", "週四", "週五", "週六", "週日"]); - await expect(page.locator("[data-result-count]")).toHaveText("36"); + await expect(page.locator("[data-result-count]")).toHaveText("37"); await expect(page.getByRole("checkbox", { name: "有 OP" })).toBeFocused(); expect(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth)).toBe(true); } @@ -2550,7 +2615,7 @@ test("weekday navigation follows populated groups and remains useful after filte await expect(nativePage.getByRole("navigation", { name: "跳到播出星期" }).getByRole("link")) .toHaveText(["週一", "週二", "週三", "週四", "週五", "週六", "週日"]); await expect(nativePage.locator("[data-weekday-section]")).toHaveCount(7); - await expect(nativePage.locator("[data-anime-card]")).toHaveCount(36); + await expect(nativePage.locator("[data-anime-card]")).toHaveCount(37); await nativePage.getByRole("link", { name: "週五", exact: true }).click(); await expect(nativePage).toHaveURL(/#weekday-5$/); expect(await nativePage.evaluate(() => document.documentElement.scrollWidth <= innerWidth)).toBe(true); diff --git a/tests/unit/api-smoke.test.ts b/tests/unit/api-smoke.test.ts index 119ede6..09f1249 100644 --- a/tests/unit/api-smoke.test.ts +++ b/tests/unit/api-smoke.test.ts @@ -16,7 +16,7 @@ describe("production API smoke gate", () => { it("accepts the complete reviewed catalogue and its not-found behavior", async () => { await expect(smokePublicApi(new CuratedProvider())).resolves.toEqual({ seasonCount: 29, - animeCount: 1953 + animeCount: 1954 }); }); diff --git a/tests/unit/catalog-navigation.test.ts b/tests/unit/catalog-navigation.test.ts index 6554e31..cdd411d 100644 --- a/tests/unit/catalog-navigation.test.ts +++ b/tests/unit/catalog-navigation.test.ts @@ -27,7 +27,7 @@ describe("catalogue navigation and search", () => { expect(results.some(({ anime }) => anime.slug === "re-zero-season-4")).toBe(true); } expect(searchCatalog(index, { ...defaults, year: "2025", quarter: "fall" })).toEqual([]); - expect(searchCatalog(index, defaults)).toHaveLength(1953); + expect(searchCatalog(index, defaults)).toHaveLength(1954); }); it("combines multilingual queries with exact song, creator, and OP/ED filters", () => { diff --git a/tests/unit/curated-2019-spring.test.ts b/tests/unit/curated-2019-spring.test.ts index 035c5b3..b8b202f 100644 --- a/tests/unit/curated-2019-spring.test.ts +++ b/tests/unit/curated-2019-spring.test.ts @@ -10,6 +10,68 @@ const spring = curatedSeasonDetails.find(({ id }) => id === "2019-spring")!; const anime = (id: number) => curatedAnimeDetails.find((item) => item.id === `curated-${id}`)!; describe("2019 spring reviewed TV catalogue", () => { + it("identifies Aikatsu Friends' second TV season independently from the first season, game update and On Parade", async () => { + const seed = curated2019SpringSeeds.find(({ id }) => id === "catalog-aikatsu-friends-2-2019")!; + expect(seed).toBeDefined(); + expect(seed).toMatchObject({ startDate: "2019-04-04", editorialWeekday: 4, broadcastTimeJst: "18:25", seasonIds: ["2019-spring"] }); + const detail = curatedAnimeDetails.find(({ id }) => id === seed.id)!; + expect(detail).toMatchObject({ slug: "aikatsu-friends-2-2019", titleJa: "アイカツフレンズ!~かがやきのジュエル~", titleZhHant: "偶像學園Friends! 第二季", status: "finished" }); + for (const omitted of ["anilistId", "anilistUrl", "titleRomaji", "posterUrl", "bannerUrl"]) { + expect(seed).not.toHaveProperty(omitted); + expect(detail).not.toHaveProperty(omitted); + } + expect(detail.sources).toContainEqual(expect.objectContaining({ url: "https://www.tv-tokyo.co.jp/broad_tvtokyo/program/detail/201904/22343_201904041825.html", role: "identifier", language: "ja" })); + const provider = new ApiProvider("https://anisonary.k-y.cc/api/v1", { + fetch: vi.fn().mockResolvedValue(new Response(JSON.stringify(detail), { headers: { "Content-Type": "application/json" } })) + }); + expect(await provider.getAnime(detail.slug)).toEqual(detail); + }); + + it("keeps Aikatsu Friends' four-character opening and solo ending with separate joint production credits", () => { + const detail = curatedAnimeDetails.find(({ id }) => id === "catalog-aikatsu-friends-2-2019")!; + expect(detail).toBeDefined(); + expect(detail.themes.map(({ type, titleJa }) => [type, titleJa])).toEqual([["OP", "ひとりじゃない!"], ["ED", "Be star"]]); + expect(detail.themes[0]).toMatchObject({ artistDisplayName: "あいね・みお・舞花・エマ from BEST FRIENDS!", credits: [ + { name: "松原さらり", role: "lyrics" }, { name: "SHOW", role: "composition" }, { name: "SHOW", role: "arrangement" } + ] }); + expect(detail.themes[1]).toMatchObject({ artistDisplayName: "ひびき from BEST FRIENDS!", credits: [ + { name: "松原さらり", role: "lyrics" }, { name: "Maozon", role: "composition" }, { name: "YUKI FUNAKOSHI", role: "composition" }, + { name: "Maozon", role: "arrangement" }, { name: "YUKI FUNAKOSHI", role: "arrangement" } + ] }); + expect(detail.themes.every(({ credits }) => credits.every(({ role }) => role !== "vocals"))).toBe(true); + expect(detail.themes.some(({ titleJa }) => /そこにしかないもの|プライド|アイカツフレンズ|OFF VOCAL|ver\./.test(titleJa))).toBe(false); + }); + + it("uses song-specific Aikatsu Friends cross-checks and withholds conflicting CD dates, unaudited special endings and media", () => { + const detail = curatedAnimeDetails.find(({ id }) => id === "catalog-aikatsu-friends-2-2019")!; + expect(detail).toBeDefined(); + for (const [index, theme] of detail.themes.entries()) { + expect(theme.lastVerifiedAt).toBe("2026-09-08"); + expect(theme.sources.every(({ verifiedAt }) => verifiedAt === "2026-09-08")).toBe(true); + expect(theme.sources).toContainEqual(expect.objectContaining({ url: `https://utaten.com/lyric/${index === 0 ? "mi19041917" : "mi19082003"}/`, role: "cross_check", language: "ja" })); + expect(theme.sources).toContainEqual(expect.objectContaining({ url: "https://www.aikatsu.net/aikatsufriends_02/aikatsufriendscom/?offset=5#5420", role: "first_party" })); + expect(theme.sources).toContainEqual(expect.objectContaining({ url: "https://www.tv-tokyo.co.jp/broad_tvtokyo/program/detail/201908/22343_201908221825.html", role: "first_party" })); + expect(theme.sources.some(({ url }) => url === "https://anison.online/anime/1068")).toBe(false); + expect(theme.videos).toEqual([]); + expect(JSON.parse(JSON.stringify(theme))).not.toHaveProperty("releaseDate"); + expect(theme.versionLabel).toContain("CD 日期與聲優歌唱署名待核對"); + } + }); + + it("finds Aikatsu Friends' shared lyricist and each co-composer without expanding the recorded singing group", async () => { + const index = buildCatalogSearchIndex((await loadCatalogSearchData(new CuratedProvider(), true)).entries); + const filters = { year: "2019", quarter: "spring", type: "all" } as const; + const slug = "aikatsu-friends-2-2019"; + expect(searchCatalog(index, { ...filters, query: "偶像學園Friends", scope: "anime" }).map(({ anime: item }) => item.slug)).toEqual([slug]); + for (const [query, type, expected] of [ + ["松原さらり", "all", ["ひとりじゃない!", "Be star"]], ["SHOW", "OP", ["ひとりじゃない!"]], + ["Maozon", "ED", ["Be star"]], ["YUKI FUNAKOSHI", "ED", ["Be star"]], ["カレン", "OP", []] + ] as const) { + const result = searchCatalog(index, { ...filters, query, type, scope: "creators" }).find(({ anime: item }) => item.slug === slug); + expect(result?.themes.map(({ titleJa }) => titleJa) ?? []).toEqual(expected); + } + }); + it("identifies KING OF PRISM's TV premiere separately from the introductory program and theatrical chapters", async () => { const seed = curated2019SpringSeeds.find(({ id }) => id === "catalog-king-of-prism-sss-2019")!; expect(seed).toBeDefined(); @@ -953,9 +1015,9 @@ describe("2019 spring reviewed TV catalogue", () => { }); it("publishes a partial quarter with reviewed identity and song evidence, without unverified artwork", () => { - expect(spring.anime).toHaveLength(36); + expect(spring.anime).toHaveLength(37); expect(spring.coverageNote).toContain("跨季延續及特殊歌曲版本仍待核對"); - expect(curated2019SpringSeeds.flatMap(({ themes }) => themes)).toHaveLength(113); + expect(curated2019SpringSeeds.flatMap(({ themes }) => themes)).toHaveLength(115); expect(curatedSeasonDetails.some(({ id }) => id === "2025-fall")).toBe(false); for (const seed of curated2019SpringSeeds) { expect(seed.seasonIds).toEqual(["2019-spring"]); diff --git a/tests/unit/curated-catalog.test.ts b/tests/unit/curated-catalog.test.ts index e73755f..503abb7 100644 --- a/tests/unit/curated-catalog.test.ts +++ b/tests/unit/curated-catalog.test.ts @@ -38,7 +38,7 @@ describe("curated public catalogue", () => { "2019-spring" ]); expect(curatedSeasonDetails).toHaveLength(29); - expect(curatedSeasonDetails.map((season) => season.anime.length)).toEqual([70, 70, 66, 75, 82, 59, 88, 68, 76, 75, 100, 75, 79, 72, 80, 69, 79, 58, 65, 46, 73, 67, 67, 31, 61, 58, 67, 42, 36]); + expect(curatedSeasonDetails.map((season) => season.anime.length)).toEqual([70, 70, 66, 75, 82, 59, 88, 68, 76, 75, 100, 75, 79, 72, 80, 69, 79, 58, 65, 46, 73, 67, 67, 31, 61, 58, 67, 42, 37]); expect(curatedSeasonDetails.map((season) => [season.id, season.reviewState, season.verifiedAt])).toEqual([ ["2026-summer", "reviewed", "2026-08-02"], ["2026-spring", "reviewed", "2026-08-02"], @@ -70,10 +70,10 @@ describe("curated public catalogue", () => { ["2019-summer", "reviewed", "2026-09-07"], ["2019-spring", "reviewed", "2026-09-08"] ]); - expect(curatedAnimeDetails).toHaveLength(1953); - expect(curatedAnimeDetails.filter((anime) => anime.themes.length > 0)).toHaveLength(1589); - expect(curatedAnimeDetails.flatMap((anime) => anime.themes)).toHaveLength(4342); - expect(curatedAnimeDetails.filter((anime) => anime.themeAvailability === "documented")).toHaveLength(1589); + expect(curatedAnimeDetails).toHaveLength(1954); + expect(curatedAnimeDetails.filter((anime) => anime.themes.length > 0)).toHaveLength(1590); + expect(curatedAnimeDetails.flatMap((anime) => anime.themes)).toHaveLength(4344); + expect(curatedAnimeDetails.filter((anime) => anime.themeAvailability === "documented")).toHaveLength(1590); expect(curatedAnimeDetails.filter((anime) => anime.themeAvailability === "not_used")).toHaveLength(2); expect(curatedAnimeDetails.filter((anime) => anime.themeAvailability === "not_announced")).toHaveLength(362); const youtubeLinks = curatedAnimeDetails @@ -2178,7 +2178,7 @@ describe("curated public catalogue", () => { } for (const item of anime.themes) { - const expectedVerifiedAt = ["catalog-cinderella-girls-climax-2019", "catalog-hangyakusei-million-arthur-2-2019", "catalog-king-of-prism-sss-2019"].includes(anime.id) + const expectedVerifiedAt = ["catalog-cinderella-girls-climax-2019", "catalog-hangyakusei-million-arthur-2-2019", "catalog-king-of-prism-sss-2019", "catalog-aikatsu-friends-2-2019"].includes(anime.id) ? "2026-09-08" : anime.id === "curated-111048" || curatedSeasonDetails.find(({ id }) => id === "2019-summer")?.anime.some(({ id }) => id === anime.id) diff --git a/tests/unit/curated-season-registry.test.ts b/tests/unit/curated-season-registry.test.ts index 42d0526..cd49afa 100644 --- a/tests/unit/curated-season-registry.test.ts +++ b/tests/unit/curated-season-registry.test.ts @@ -40,7 +40,7 @@ describe("curated season registry", () => { ]); const ownedSeeds = curatedSeasonRegistry.flatMap(({ seeds }) => seeds); - expect(ownedSeeds).toHaveLength(1953); + expect(ownedSeeds).toHaveLength(1954); expect(new Set(ownedSeeds.map(getCuratedAnimeKey)).size).toBe(ownedSeeds.length); for (const entry of curatedSeasonRegistry) { diff --git a/tests/unit/curated-theme-source-registry.test.ts b/tests/unit/curated-theme-source-registry.test.ts index b384849..e5ef534 100644 --- a/tests/unit/curated-theme-source-registry.test.ts +++ b/tests/unit/curated-theme-source-registry.test.ts @@ -70,11 +70,11 @@ describe("curated theme source registry", () => { 180, 161, 103, - 113 + 115 ]); const keys = curatedThemeSourceRegistry.flatMap(({ overrides }) => Object.keys(overrides)); - expect(keys).toHaveLength(2080); + expect(keys).toHaveLength(2082); expect(new Set(keys).size).toBe(keys.length); expect(Object.keys(curatedThemeSourceOverrides)).toHaveLength(keys.length); }); diff --git a/tests/unit/page-data.test.ts b/tests/unit/page-data.test.ts index ca6549b..8cc1ebd 100644 --- a/tests/unit/page-data.test.ts +++ b/tests/unit/page-data.test.ts @@ -65,9 +65,9 @@ describe("catalogue search data states", () => { expect(result.status).toBe("ready"); if (result.status !== "ready") throw new Error("Expected ready catalogue search data"); - expect(result.entries).toHaveLength(1953); - expect(new Set(result.entries.map(({ anime }) => anime.slug)).size).toBe(1953); - expect(result.entries.filter(({ anime }) => anime.themes.length > 0)).toHaveLength(1589); + expect(result.entries).toHaveLength(1954); + expect(new Set(result.entries.map(({ anime }) => anime.slug)).size).toBe(1954); + expect(result.entries.filter(({ anime }) => anime.themes.length > 0)).toHaveLength(1590); }); it("returns a safe public error state without exposing provider details", async () => {