Skip to content

Conversation

@BobbieGoede
Copy link
Member

@BobbieGoede BobbieGoede commented Dec 2, 2025

Looks like I forgot this line in #1677

Summary by CodeRabbit

  • Refactor
    • Internal improvements to the datetime formats initialization in the lite build path to maintain consistency with other build variants.

✏️ Tip: You can customize this high-level summary in your review settings.

@BobbieGoede BobbieGoede self-assigned this Dec 2, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 2, 2025

Walkthrough

The composer's _datetimeFormats construction in the lite path is refactored to use the shared _ref helper instead of a direct ref call, ensuring consistency across lite and non-lite branches without altering behavior.

Changes

Cohort / File(s) Summary
Lite path refactoring
packages/vue-i18n-core/src/composer.ts
Switches _datetimeFormats initialization from direct ref<DateTimeFormatsType>({}) to _ref<DateTimeFormatsType>({}) for consistency with non-lite paths

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single-file, mechanical refactoring with no logic or control flow changes
  • Direct substitution of one reactive constructor for another shared helper
  • No risk of behavioral regression due to alignment with existing patterns

Poem

🐰 A tiny hop through code so neat,
Where refs align in rhythm sweet,
Lite and full now dance as one,
Consistency—our day is done! 🌟

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: switching to shallowRef for datetimeFormats in the server-side/lite path, which aligns with the actual code modification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 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 c169d1b and e89bc09.

📒 Files selected for processing (1)
  • packages/vue-i18n-core/src/composer.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: E2E test for rolldown build (ubuntu-latest, 20)
  • GitHub Check: E2E test for rolldown build (ubuntu-latest, 22)
  • GitHub Check: E2E test for rolldown build (macos-latest, 24)
  • GitHub Check: E2E test for rolldown build (macos-latest, 20)
  • GitHub Check: E2E test for rolldown build (macos-latest, 22)
  • GitHub Check: E2E test for rolldown build (ubuntu-latest, 24)
  • GitHub Check: release
  • GitHub Check: upload
🔇 Additional comments (1)
packages/vue-i18n-core/src/composer.ts (1)

1975-1975: LGTM! Consistent use of _ref helper.

The change correctly uses the _ref helper instead of a direct ref call, ensuring shallowRef is used server-side for better performance. This aligns the lite path with the non-lite path (line 1970) and other reactive state initialization patterns in the codebase (e.g., _messages at line 1964, _numberFormats at line 1984).


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

github-actions bot commented Dec 2, 2025

Size Report

Bundles

File Size Gzip Brotli
core.esm-browser.prod.js 42.91 kB 12.56 kB 11.24 kB
core.global.prod.js 33.56 kB 11.34 kB 10.22 kB
core.runtime.esm-browser.prod.js 27.19 kB 8.37 kB 7.51 kB
core.runtime.global.prod.js 20.13 kB 7.57 kB 6.80 kB
message-compiler.esm-browser.prod.js 21.75 kB 6.32 kB 5.66 kB
message-compiler.global.prod.js 19.48 kB 6.14 kB 5.53 kB
petite-vue-i18n-core.esm-browser.prod.js 23.49 kB 7.57 kB 6.80 kB
petite-vue-i18n-core.global.prod.js 17.14 kB 6.48 kB 5.87 kB
petite-vue-i18n.esm-browser.prod.js 41.72 kB 12.34 kB 11.07 kB
petite-vue-i18n.global.prod.js 32.22 kB 10.72 kB 9.74 kB
petite-vue-i18n.runtime.esm-browser.prod.js 25.85 kB 8.07 kB 7.29 kB
petite-vue-i18n.runtime.global.prod.js 18.80 kB 6.94 kB 6.31 kB
vue-i18n.esm-browser.prod.js 55.37 kB 16.02 kB 14.37 kB
vue-i18n.global.prod.js 42.66 kB 14.03 kB 12.71 kB
vue-i18n.runtime.esm-browser.prod.js 39.49 kB 11.76 kB 10.60 kB
vue-i18n.runtime.global.prod.js 29.23 kB 10.27 kB 9.30 kB

Usages

Name Size Gzip Brotli
packages/size-check-core (@intlify/core) 12.18 kB 4.77 kB 4.29 kB
packages/size-check-petite-vue-i18n (petite-vue-i18n) 83.98 kB 32.15 kB 28.95 kB
packages/size-check-vue-i18n (vue-i18n) 89.11 kB 33.62 kB 30.19 kB

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 2, 2025

Open in StackBlitz

@intlify/core

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

@intlify/core-base

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

@intlify/devtools-types

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

@intlify/message-compiler

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

petite-vue-i18n

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

@intlify/shared

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

vue-i18n

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

@intlify/vue-i18n-core

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

commit: e89bc09

Copy link
Member

@kazupon kazupon left a comment

Choose a reason for hiding this comment

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

Thanks!
LGTM!
CI is still failing, but that cause is occured by #2286
I'll merge this PR!

@kazupon kazupon merged commit 9aff3a6 into intlify:master Dec 4, 2025
14 of 26 checks passed
@kazupon kazupon added the Type: Performance Includes performance fixes label Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Performance Includes performance fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants