chore(deps): update dependency vitest to v4.1.2#1342
Conversation
Renovate PR Review Results⚖️ Safety Assessment: ✅ Safe🔍 Release Content AnalysisVersion Updates:
Critical Security Fix (v4.1.2):
Major Features (v4.1.0):
Bug Fixes:
Deprecations:
🎯 Impact Scope InvestigationCodebase Usage Analysis: ✅ Test Files (6 files):
✅ Configuration:
✅ Test Assertions:
✅ CI/CD Integration:
Dependency Chain:
💡 Recommended ActionsImmediate Actions:
Post-Merge Verification:
Future Considerations:
🔗 Reference Links
Generated by koki-develop/claude-renovate-review |
c7bde77 to
d6d088a
Compare
d6d088a to
bafae9a
Compare
bafae9a to
f240899
Compare
f240899 to
505d2aa
Compare
505d2aa to
7dedef8
Compare
7dedef8 to
ac295fa
Compare
ac295fa to
6a7766f
Compare
6a7766f to
082ea47
Compare
082ea47 to
79ea74f
Compare
79ea74f to
3c8cf90
Compare
3c8cf90 to
fefcd29
Compare
fefcd29 to
bff36ff
Compare
bff36ff to
00d635c
Compare
00d635c to
2279d62
Compare
c458676 to
475a0b1
Compare
475a0b1 to
876b91a
Compare
876b91a to
30f3ff0
Compare
30f3ff0 to
62e127e
Compare
62e127e to
d97ea2f
Compare
d97ea2f to
8ecabb1
Compare
8ecabb1 to
743a936
Compare
743a936 to
06a2e22
Compare
06a2e22 to
c716c79
Compare
There was a problem hiding this comment.
vitest 4.0.18→4.1.2のマイナーバージョンアップと、テストファイルのリネーム・移動のみの変更。重大な問題はなし。テストファイルの移動先とインポートパスに軽微な構造的不一致あり。
軽微な指摘
- src/libs/embed/fetchPageMetadata.spec.ts: テストファイルが src/libs/embed/ に移動されたが、インポート先は依然として ../../pages/embed/index を参照している。テストの配置場所(libs/)と実装の場所(pages/)が一致していない。fetchPageMetadata を src/libs/embed/ に移動するリファクタリングの途中段階と思われるが、現状では構造的に不整合。意図的な段階的移行であれば問題ないが、実装の移動も同一PRで行うことが望ましい。
|
🚀 Preview deployment ready! ✅ Preview URL: https://pr-1342---web-njpdbbjcea-an.a.run.app This comment was automatically generated by the deploy-preview workflow. |
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
There was a problem hiding this comment.
vitestの4.0.18→4.1.2へのバージョンアップと、fetchPageMetadataロジックをsrc/pages/embed/index.tsからsrc/libs/embed/fetchPageMetadata.tsへ分離するリファクタリング。コード品質の改善(型の絞り込み、不要なFetchConfig.cacheTtlの削除)もあり、全体的に良いPR。重大な問題なし。
軽微な指摘
- src/libs/embed/fetchPageMetadata.ts: extractImageUrl()でDOMの最初の
タグのsrc属性を取得する際、相対URLを絶対URLに解決していない。例えば '/images/foo.png' のような相対パスが返される可能性がある。ただしこれは既存コードからの踏襲であり本PRで新たに導入された問題ではない。
- src/libs/embed/fetchPageMetadata.ts: onFailedAttemptのログメッセージが
Retry ${error.attemptNumber}/3となっているが、retries:3の場合、合計4回試行される(初回+3リトライ)。ログの '/3' が最大リトライ数なのか総試行数なのか曖昧でデバッグ時に混乱を招く可能性がある。機能上の問題はなし。
Astro treats all .ts files in src/pages/ as routes. The spec file was registered as /embed/index.spec route, which crashes in vitest 4.1.2 because describe() now eagerly accesses runner.config via initSuite(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move fetchPageMetadata and its helpers from src/pages/embed/index.ts to src/libs/embed/fetchPageMetadata.ts to fix the dependency inversion (libs → pages). The page handler now imports from the library module. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- extractImageUrl now resolves relative URLs against the page base URL - Retry log message clarified from "Retry N/3" to "Attempt N/total failed" Addresses code-review feedback on PR #1342. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
vitestのマイナーバージョンアップ(CVE対応含む)とfetchPageMetadataのlibsへのリファクタリングが主な変更。相対URLの絶対URL解決という機能追加と対応するテストも含まれており、全体的に品質が向上している。重大な問題はなく、承認可。
軽微な指摘
- src/libs/embed/fetchPageMetadata.ts: extractImageUrl内のcandidates.find((c) => c != null)は空文字列("")をマッチさせてしまう。旧コードは if (metaOgImage) のようにfalsy判定でスキップしていたため、content=""のような属性があると挙動が変わる。new URL("", baseUrl).hrefはbaseUrlそのものを返すため、意図しない画像URLになり得る。
c != null && c !== ''とするか、truthy判定Boolean(c)に変えることを検討。
Use Boolean() truthy check instead of != null to skip empty content="" attributes, preventing baseUrl from being returned as imageUrl. Addresses code-review feedback on PR #1342. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
vitestのマイナーバージョンアップ(4.0.18→4.1.2)と、fetchPageMetadata関数をsrc/pages/embed/index.tsからsrc/libs/embed/fetchPageMetadata.tsに切り出すリファクタリング。合わせて相対URL画像パスの解決バグ修正と、それを検証するテストが追加されている。コード品質・設計ともに良好で重大な問題はない。
軽微な指摘
- src/libs/embed/fetchPageMetadata.ts: 軽微:
extractImageUrlのcandidates.find(Boolean)はTypeScriptの型推論上string | undefinedを返すが、直後のif (!found) return nullで空文字もnullとして扱う。これは意図的な動作(テストで確認済み)だが、空文字のog:imageが設定されているケースで挙動が変わることをコメントで明示すると読みやすい。
This PR contains the following updates:
4.0.18→4.1.2Release Notes
vitest-dev/vitest (vitest)
v4.1.2Compare Source
This release bumps Vitest's
flattedversion and removes version pinning to resolveflatted's CVE related issues (#9975).🐞 Bug Fixes
setupFilesfrom parent directory - by @hi-ogawa in #9960 (7aa93)toMatchScreenshotcan't capture a stable screenshot - by @macarie in #9847 (faace)coverageConfigDefaultsvalues and types - by @Arthie in #9940 (b3c99)View changes on GitHub
v4.1.1Compare Source
🚀 Features
matchesTagsFilterto test if the current filter matches tags - by @sheremet-va in #9913 (eec53)experimental.vcsProvider- by @sheremet-va in #9928 (56115)🐞 Bug Fixes
TestProject.testFilesListinternal properly - by @sapphi-red in #9867 (54f26)use- by @oilater in #9831 and #9861 (633ae)vi.advanceTimersto the preview provider - by @sheremet-va in #9891 (1bc3e)--standalonemode without running tests - by @sheremet-va in #9911 (e78ad)body- by @sheremet-va in #9912 (6fdb2)retry.conditionRegExp serialization issue - by @nstepien and @hi-ogawa in #9942 (7b605)testreturn as tests - by @sheremet-va in #9871 (141e7)View changes on GitHub
v4.1.0Compare Source
Vitest 4.1 is out!
This release page lists all changes made to the project during the 4.1 beta. To get a review of all the new features, read our blog post.
🚀 Features
setTickModeto timer controls - by @atscott and @sheremet-va in #8726 (4b480)toTestSpecificationto reported tasks - by @sheremet-va in #9464 (1a470)vi.mockorvi.hoistedare declared outside of top level of the module - by @sheremet-va in #9387 (5db54)aroundEachandaroundAllhooks - by @sheremet-va in #9450 (2a8cb)neworallin--updateflag - by @sheremet-va in #9543 (a5acf)metain test options - by @sheremet-va in #9535 (7d622)test.extendsyntax - by @sheremet-va in #9550 (e5385)vitest listto statically collect tests instead of running files to collect them - by @sheremet-va in #9630 (7a8e7)--detect-async-leaks- by @AriPerkkio in #9528 (c594d)mockThrowandmockThrowOnce- by @thor-juhasz and @sheremet-va in #9512 (61917)update: "none"and add docs about snapshots behavior on CI - by @hi-ogawa in #9700 (05f18)launchOptionswithconnectOptions- by @hi-ogawa in #9702 (f0ff1)page/locator.markAPI to enhance playwright trace - by @hi-ogawa in #9652 (d0ee5)testinexperimental_parseSpecification- by @jgillick and Jeremy Gillick in #9235 (2f367)createSpecification- by @sheremet-va in #9336 (c8e6c)runTestFilesas alternative torunTestSpecifications- by @sheremet-va in #9443 (43d76)allowWriteandallowExecoptions toapi- by @sheremet-va in #9350 (20e00)toTestSpecification- by @sheremet-va in #9627 (6f17d)userEvent.wheelAPI - by @macarie in #9188 (66080)filterNodeoption to prettyDOM for filtering browser assertion error output - by @Copilot, sheremet-va and @sheremet-va in #9475 (d3220)detailsPanelPositionoption and button - by @shairez in #9525 (c8a31)findElementand enable strict mode in webdriverio and preview - by @sheremet-va in #9677 (c3f37)ignore start/stopignore hints - by @AriPerkkio in #9204 (e59c9)coverage.changedoption to report only changed files - by @kykim00 and @AriPerkkio in #9521 (1d939)onModuleRunnerhook toworker.init- by @sheremet-va in #9286 (e977f)importDurations: { limit, print }options - by @hi-ogawa, Claude Opus 4.6 and @sheremet-va in #9401 (7e10f)importDurations- by @hi-ogawa and Claude Opus 4.6 in #9533 (3f7a5)beforeAll/afterAll- by @sheremet-va in #9572 (c8339)agentreporter to reduce ai agent token usage - by @cpojer in #9779 (3e9e0)retryoptions - by @MazenSamehR, Matan Shavit, @AriPerkkio and @sheremet-va in #9370 (9e4cf)🐞 Bug Fixes
meta.urlincreateRequire- by @sheremet-va in #9441 (e3422)external/noExternalduringconfigEnvironmenthook - by @hi-ogawa and Claude Opus 4.6 in #9508 (59ea2)browser.isolateis used - by @sheremet-va in #9410 (3d48e)vi.mock({ spy: true })node v8 coverage - by @hi-ogawa, hi-ogawa and Claude Opus 4.6 in #9541 (687b6).namefrom statically collected test - by @sheremet-va in #9596 (b66ff)expect.soft- by @iumehara, @hi-ogawa and Claude Opus 4.6 in #9231 (3eb2c)sequence.shuffle.testsis enabled - by @kaigritun, Kai Gritun and @sheremet-va in #9576 (8182b)expect/src/utilsfromvitest- by @hi-ogawa in #9616 (48739)--detect-async-leaks- by @AriPerkkio in #9638 (9fd4c)aroundEach/Allwhen inneraroundEach/Allthrows - by @hi-ogawa in #9657 (4ec6c)aroundEach/Allsetup timed out - by @hi-ogawa in #9670 (bb013)VitestRunnerConfigoptional fields withSerializedConfig- by @hi-ogawa in #9661 (79520)toBe*spy assertions in favor oftoHaveBeen*(andtoThrowError) - by @sheremet-va in #9665 (4d390)aroundEach/Allerrors but aggregate them on runner - by @hi-ogawa in #9673 (b6365)resolves/rejectschained assertion error - by @hi-ogawa in #9679 (c6151)maxConcurrency- by @hi-ogawa in #9653 (16d13)resolve.conditionsfor externals - by @hi-ogawa in #9717 (1d498)mockObjectchange backwards compatible - by @sheremet-va in #9744 (84c69)URL.nameon jsdom - by @hi-ogawa in #9767 (031f3)vi.importActual()for virtual modules - by @hi-ogawa and Claude Opus 4.6 in #9772 (1e89e)FixtureAccessErrorif suite hook accesses undefined fixture - by @sheremet-va in #9786 (fc2ce)loadortransformoriginal module - by @hi-ogawa and Claude Opus 4.6 in #9774 (a8216)hideSkippedTestsshould not hidetest.todo- by @oilater in #9562 and #9781 (8181e)beforeEachhooks - by @hi-ogawa and Claude Opus 4.6 in #9826 (99e52)performance.nowto measure test timeout duration - by @hi-ogawa and Claude Opus 4.6 in #9795 (f48a6)toMatchScreenshotpasses - by @macarie in #9289 (46aab)toMatchScreenshot- by @macarie in #9552 (83ca0)--remote-debugging-addressfrom chrome args - by @hi-ogawa and @AriPerkkio in #9712 (f09bb)ensureAwaited- by @sheremet-va in #9732 (97685)getCDPSessionandcdp()- by @AriPerkkio in #9716 (689a2)deepEqualin the config because it's not serializable - by @sheremet-va in #9666 (9ee99)thresholds.autoUpdateto preserve ending whitespace - by @AriPerkkio in #9436 (7e534)/config/#optionhash links causing hydration errors - by @hi-ogawa, Claude Opus 4.6 and @sheremet-va in #9610 (a603c)toMatchObject(Map/Set)should expectMap/Seton left hand side - by @hi-ogawa and Claude Opus 4.6 in #9532 (381da)toThrowand make Error detection robust - by @hi-ogawa and Claude Opus 4.6 in #9570 (de215)dotreporter leaves pending tests - by @AriPerkkio in #9684 (4d793)undefined- by @sheremet-va in #9511 (6f181)bench.reportersno longer gives type errors when passing file name string paths - by @Bertie690 in #9695 (093c8)🏎 Performance
View changes on GitHub
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.