Skip to content

chore(deps): update dependency vitest to v4.1.2#1342

Merged
lacolaco merged 5 commits intomainfrom
renovate/vitest-monorepo
Apr 2, 2026
Merged

chore(deps): update dependency vitest to v4.1.2#1342
lacolaco merged 5 commits intomainfrom
renovate/vitest-monorepo

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Mar 27, 2026

This PR contains the following updates:

Package Change Age Confidence
vitest (source) 4.0.184.1.2 age confidence

Release Notes

vitest-dev/vitest (vitest)

v4.1.2

Compare Source

This release bumps Vitest's flatted version and removes version pinning to resolve flatted's CVE related issues (#​9975).

   🐞 Bug Fixes
    View changes on GitHub

v4.1.1

Compare Source

   🚀 Features
   🐞 Bug Fixes
    View changes on GitHub

v4.1.0

Compare 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
   🐞 Bug Fixes
   🏎 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 27, 2026

Renovate PR Review Results

⚖️ Safety Assessment: ✅ Safe

🔍 Release Content Analysis

Version Updates:

  • vitest: 4.0.18 → 4.1.2 (minor version update)
  • Dependencies updated:
    • @vitest/* packages: Internal dependency alignment
    • chai: 6.2.1 → 6.2.2
    • tinyrainbow: 3.0.3 → 3.1.0
    • std-env: 3.10.0 → 4.0.0
    • expect-type: 1.2.2 → 1.3.0
    • @standard-schema/spec: 1.0.0 → 1.1.0

Critical Security Fix (v4.1.2):

  • CVE Fix: Resolved GHSA-rf6f-7fwh-wjgh (Prototype Pollution in flatted dependency)
  • Updated flatted dependency and removed version pinning
  • This security vulnerability could allow attackers to pollute JavaScript object prototypes via parse() method

Major Features (v4.1.0):

  • Stabilized experimental features: tags, fixtures (test.extend), aroundEach/All hooks
  • New retry options with enhanced control
  • Added --detect-async-leaks flag
  • Improved snapshot handling with expect.soft
  • Test metadata support via meta option
  • Enhanced coverage options (coverage.changed)

Bug Fixes:

  • Fixed setupFiles resolution from parent directory
  • Sequential mock/unmock resolution improvements
  • Browser mode screenshot stability
  • Coverage configuration defaults corrected
  • Pretty-format output limit calculations
  • Color detection in automated environments

Deprecations:

  • toBe* spy assertions → Use toHaveBeen* instead (backward compatible, warnings only)
  • Several vitest/* entry points deprecated (project doesn't use these)

🎯 Impact Scope Investigation

Codebase Usage Analysis:

Test Files (6 files):

  • src/libs/post/properties.test.ts - Basic assertions only
  • src/libs/query/posts.spec.ts - Standard expect assertions
  • src/libs/og-image/image.test.tsx - Uses vi.mock, vi.fn, vi.mocked
  • src/libs/summarizer/feature-detection.spec.ts - Uses vi.fn
  • src/libs/tts/feature-detection.spec.ts - Uses vi.fn
  • src/libs/tts/speech.spec.ts - Uses vi.fn
  • src/pages/embed/index.spec.ts - Uses vi.fn

Configuration:

  • vitest.config.ts uses basic configuration (globals, environment, timeout, excludes)
  • No experimental features used
  • No browser mode configuration
  • No deprecated entry points imported

Test Assertions:

  • All tests use modern assertion syntax (expect().toBe(), expect().toHaveLength(), etc.)
  • Mock functions use vi.fn(), vi.mock(), vi.mocked() - all still supported
  • No deprecated toBeCalled* assertions found
  • Uses toHaveBeenCalledWith (recommended pattern)

CI/CD Integration:

  • Tests run via pnpm test:libs which executes vitest run
  • Node.js test runner used for tools (pnpm test:tools)
  • No watch mode or browser mode in CI

Dependency Chain:

  • No direct @vitest/* package dependencies
  • Vitest is only used as dev dependency
  • No peer dependency conflicts detected

💡 Recommended Actions

Immediate Actions:

  1. Safe to merge - No breaking changes affect this codebase
  2. Security improvement - Resolves flatted CVE vulnerability
  3. No code changes required - All APIs used are backward compatible

Post-Merge Verification:

  1. Verify all tests pass: pnpm test:libs
  2. Confirm test execution time remains similar
  3. Check for any deprecation warnings in test output (none expected based on code review)

Future Considerations:

  • Monitor for deprecation warnings in future runs (none currently triggered)
  • The deprecated toBe* spy assertions are not used, so no migration needed
  • Consider using new features like test.extend for fixture-based testing if needed

🔗 Reference Links

Generated by koki-develop/claude-renovate-review

@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from c7bde77 to d6d088a Compare March 27, 2026 10:17
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from d6d088a to bafae9a Compare March 27, 2026 13:08
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from bafae9a to f240899 Compare March 27, 2026 13:13
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from f240899 to 505d2aa Compare March 27, 2026 15:51
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from 505d2aa to 7dedef8 Compare March 27, 2026 15:56
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from 7dedef8 to ac295fa Compare March 27, 2026 16:06
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from ac295fa to 6a7766f Compare March 27, 2026 16:11
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from 6a7766f to 082ea47 Compare March 27, 2026 18:55
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from 082ea47 to 79ea74f Compare March 27, 2026 19:00
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from 79ea74f to 3c8cf90 Compare March 27, 2026 21:09
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from 3c8cf90 to fefcd29 Compare March 27, 2026 21:15
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from fefcd29 to bff36ff Compare March 28, 2026 00:20
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from bff36ff to 00d635c Compare March 28, 2026 00:24
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from 00d635c to 2279d62 Compare March 28, 2026 00:29
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from c458676 to 475a0b1 Compare March 28, 2026 05:04
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from 475a0b1 to 876b91a Compare March 28, 2026 05:09
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from 876b91a to 30f3ff0 Compare March 28, 2026 06:00
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from 30f3ff0 to 62e127e Compare March 28, 2026 06:11
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from 62e127e to d97ea2f Compare March 28, 2026 06:16
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from d97ea2f to 8ecabb1 Compare March 28, 2026 06:25
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from 8ecabb1 to 743a936 Compare March 28, 2026 06:43
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from 743a936 to 06a2e22 Compare March 28, 2026 06:45
@renovate renovate Bot force-pushed the renovate/vitest-monorepo branch from 06a2e22 to c716c79 Compare March 28, 2026 06:55
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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で行うことが望ましい。

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

🚀 Preview deployment ready!

✅ Preview URL: https://pr-1342---web-njpdbbjcea-an.a.run.app
📝 Commit SHA: be40cc5 (view commit)

This comment was automatically generated by the deploy-preview workflow.

@renovate
Copy link
Copy Markdown
Contributor Author

renovate Bot commented Apr 1, 2026

Edited/Blocked Notification

Renovate 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.

⚠️ Warning: custom changes will be lost.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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' が最大リトライ数なのか総試行数なのか曖昧でデバッグ時に混乱を招く可能性がある。機能上の問題はなし。

renovate Bot and others added 4 commits April 2, 2026 10:03
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>
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vitestのマイナーバージョンアップ(4.0.18→4.1.2)と、fetchPageMetadata関数をsrc/pages/embed/index.tsからsrc/libs/embed/fetchPageMetadata.tsに切り出すリファクタリング。合わせて相対URL画像パスの解決バグ修正と、それを検証するテストが追加されている。コード品質・設計ともに良好で重大な問題はない。

軽微な指摘

  • src/libs/embed/fetchPageMetadata.ts: 軽微: extractImageUrlcandidates.find(Boolean)はTypeScriptの型推論上string | undefinedを返すが、直後のif (!found) return nullで空文字もnullとして扱う。これは意図的な動作(テストで確認済み)だが、空文字のog:imageが設定されているケースで挙動が変わることをコメントで明示すると読みやすい。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant