Skip to content

Conversation

@haoqunjiang
Copy link
Contributor

@haoqunjiang haoqunjiang commented Oct 31, 2025

In vitest-dev/vitest#8200, Vitest removed the Node types from its main entry. This broke the build pipeline in this project, and CI started to fail: https://github.com/intlify/vue-i18n/actions/runs/18880065087/job/53880358103

Summary by CodeRabbit

  • Chores
    • Updated TypeScript configuration to include additional type declarations for development tooling.

@coderabbitai
Copy link

coderabbitai bot commented Oct 31, 2025

Walkthrough

The tsconfig.json file was updated to add "vitest/node" to the compiler options types array, supplementing the existing "vitest/globals" entry. This extends the ambient type declarations available during TypeScript compilation.

Changes

Cohort / File(s) Summary
TypeScript Configuration
tsconfig.json
Added "vitest/node" to the types array in compilerOptions alongside "vitest/globals" to include additional ambient type declarations

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A tiny tweak, so light and neat,
We type-check vitest, complete!
From globals broad to nodes so deep,
TypeScript types, a promise to keep! 🌿

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "fix: include vitest/node types to fix Vitest 4 type errors" directly and accurately describes the main change in the changeset. The raw summary confirms that tsconfig.json was modified to extend the "types" array to include "vitest/node", and the PR objectives explain that this addition resolves type errors caused by Vitest 4's removal of Node types from its main entry. The title is specific, clear, and concise, clearly communicating both the action taken and its purpose to a developer reviewing the commit history.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3df6a8a and f352435.

📒 Files selected for processing (1)
  • tsconfig.json (1 hunks)
🔇 Additional comments (1)
tsconfig.json (1)

51-51: Verification confirms "vitest/node" is the correct entry point for Vitest 4.

Adding "vitest/node" to the types array aligns with Vitest 4's official approach—the package.json maps "./node" to types at dist/node.d.ts, and documentation recommends adding "vitest/node" to tsconfig types for Node type definitions. This change directly resolves the CI type errors by exposing Node types after they were removed from the main entry in Vitest 4.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

Size Report

Bundles

File Size Gzip Brotli
core.esm-browser.prod.js 36.59 kB 11.46 kB 10.22 kB
core.global.prod.js 29.42 kB 10.34 kB 9.33 kB
core.runtime.esm-browser.prod.js 23.70 kB 7.67 kB 6.87 kB
core.runtime.global.prod.js 17.65 kB 6.92 kB 6.21 kB
message-compiler.esm-browser.prod.js 17.91 kB 5.66 kB 5.04 kB
message-compiler.global.prod.js 16.50 kB 5.45 kB 4.88 kB
petite-vue-i18n-core.esm-browser.prod.js 20.47 kB 6.88 kB 6.19 kB
petite-vue-i18n-core.global.prod.js 15.07 kB 5.81 kB 5.31 kB
petite-vue-i18n.esm-browser.prod.js 35.39 kB 11.13 kB 9.98 kB
petite-vue-i18n.global.prod.js 28.04 kB 9.60 kB 8.71 kB
petite-vue-i18n.runtime.esm-browser.prod.js 22.35 kB 7.25 kB 6.56 kB
petite-vue-i18n.runtime.global.prod.js 16.28 kB 6.15 kB 5.62 kB
vue-i18n.esm-browser.prod.js 49.05 kB 14.91 kB 13.36 kB
vue-i18n.global.prod.js 38.53 kB 13.02 kB 11.77 kB
vue-i18n.runtime.esm-browser.prod.js 36.00 kB 11.07 kB 9.96 kB
vue-i18n.runtime.global.prod.js 26.76 kB 9.60 kB 8.71 kB

Usages

Name Size Gzip Brotli
packages/size-check-core (@intlify/core) 9.22 kB 3.83 kB 3.46 kB
packages/size-check-petite-vue-i18n (petite-vue-i18n) 80.01 kB 30.88 kB 27.79 kB
packages/size-check-vue-i18n (vue-i18n) 85.23 kB 32.37 kB 29.05 kB

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 31, 2025

Open in StackBlitz

@intlify/core

npm i https://pkg.pr.new/@intlify/core@2303

@intlify/core-base

npm i https://pkg.pr.new/@intlify/core-base@2303

@intlify/devtools-types

npm i https://pkg.pr.new/@intlify/devtools-types@2303

@intlify/message-compiler

npm i https://pkg.pr.new/@intlify/message-compiler@2303

petite-vue-i18n

npm i https://pkg.pr.new/petite-vue-i18n@2303

@intlify/shared

npm i https://pkg.pr.new/@intlify/shared@2303

vue-i18n

npm i https://pkg.pr.new/vue-i18n@2303

@intlify/vue-i18n-core

npm i https://pkg.pr.new/@intlify/vue-i18n-core@2303

commit: f352435

@kazupon kazupon added the Type: Improvement Includes backwards-compatible fixes label Oct 31, 2025
@kazupon
Copy link
Member

kazupon commented Oct 31, 2025

@haoqunjiang
Thank you!

@kazupon kazupon merged commit 25f0647 into intlify:master Oct 31, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Improvement Includes backwards-compatible fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants