Skip to content

Conversation

BobbieGoede
Copy link
Member

@BobbieGoede BobbieGoede commented Oct 6, 2025

Description

The switch to tinyglobby (#511) changed the resolved paths to be relative rather than absolute, which is why the tests are failing.

Linked Issues

Additional context

Summary by CodeRabbit

  • Bug Fixes

    • Resource discovery now resolves files using absolute paths, improving reliability across different working directories and monorepo setups.
  • Tests

    • Updated test utilities to align with absolute path resolution for consistent results.

@BobbieGoede BobbieGoede requested a review from kazupon October 6, 2025 15:24
Copy link

coderabbitai bot commented Oct 6, 2025

Walkthrough

Updated globbing calls to request absolute paths by adding the absolute: true option in resource loading and test utilities, and slightly reordered related imports. No exported APIs changed.

Changes

Cohort / File(s) Summary
Globbing options update and import order
packages/unplugin-vue-i18n/src/core/resource.ts, packages/unplugin-vue-i18n/test/utils.ts
Added { absolute: true } to globSync/glob options (with expandDirectories: false retained) so resolved paths are absolute; adjusted import order to accommodate the tinyglobby import placement.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

improvement

Poem

I sniffed the paths, then made them true,
From fuzzy trails to absolute view.
With tidy imports, hop-hop I go—
No breadcrumbs lost, just files that show.
(_/)✨
( •_•) Paths aligned!
/︵︵\️ Ready to find.

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 title succinctly describes that this PR fixes the resource path resolution format, which directly corresponds to adding the absolute option to globSync to produce absolute paths. It follows conventional commit style, remains concise, and avoids unnecessary details. A teammate scanning the history can quickly grasp that the primary change involves adjusting how resource paths are resolved.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link

pkg-pr-new bot commented Oct 6, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@intlify/bundle-utils@518
npm i https://pkg.pr.new/@intlify/unplugin-vue-i18n@518

commit: 61e0330

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/unplugin-vue-i18n/test/utils.ts (1)

7-7: Import reordering (stylistic).

The tinyglobby import was moved to follow the established import order. No functional impact.

packages/unplugin-vue-i18n/src/core/resource.ts (1)

16-16: Import reordering (stylistic).

The tinyglobby import was moved to follow the established import order. No functional impact.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3a18fdb and 61e0330.

📒 Files selected for processing (2)
  • packages/unplugin-vue-i18n/src/core/resource.ts (2 hunks)
  • packages/unplugin-vue-i18n/test/utils.ts (2 hunks)
🔇 Additional comments (2)
packages/unplugin-vue-i18n/test/utils.ts (1)

58-59: LGTM! Fixes the path resolution issue.

Adding absolute: true ensures that ignoreIds contains absolute paths, which correctly matches against log.id (line 83) from the build system. This aligns with the PR objective to fix failing tests after the tinyglobby migration.

Based on learnings.

packages/unplugin-vue-i18n/src/core/resource.ts (1)

63-67: LGTM! Correctly resolves resource paths as absolute.

Adding absolute: true ensures that resourcePaths contains absolute paths, which is essential for proper comparison with id (line 246) and query.issuerPath (line 248) from the build system. This directly addresses the failing tests mentioned in the PR objectives.

Based on learnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant