Skip to content

fix: inline @intlify/h3 to avoid dupes#3958

Closed
danielroe wants to merge 4 commits intomainfrom
fix/ecosystem-ci-compat
Closed

fix: inline @intlify/h3 to avoid dupes#3958
danielroe wants to merge 4 commits intomainfrom
fix/ecosystem-ci-compat

Conversation

@danielroe
Copy link
Copy Markdown
Contributor

@danielroe danielroe commented Apr 1, 2026

🔗 Linked issue

📚 Description

otherwise we can end up with different versions of @intlify/utils/h3 and @intlify/h3

https://github.com/nuxt/ecosystem-ci/actions/runs/23833781405/job/69473060451

Summary by CodeRabbit

  • Chores
    • Updated build configuration to include an additional dependency so it’s picked up by transpilation, optimization, and TypeScript hoisting.
    • Added a type-only import to server routing code; no runtime behavior, API surface, or handler logic changed.

@danielroe danielroe requested a review from BobbieGoede as a code owner April 1, 2026 12:47
@danielroe danielroe force-pushed the fix/ecosystem-ci-compat branch from e340e55 to 41d75fe Compare April 1, 2026 12:49
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d9614deb-3c34-4ab3-a375-81f72fae2a35

📥 Commits

Reviewing files that changed from the base of the PR and between 41d75fe and 9c54d47.

📒 Files selected for processing (1)
  • src/runtime/server/routes/messages.ts
✅ Files skipped from review due to trivial changes (1)
  • src/runtime/server/routes/messages.ts

Walkthrough

Added @intlify/h3 to the deps array in src/module.ts, causing it to be processed by the module's alias-resolution and build-integration loops (so it is included in nuxt.options.build.transpile, nuxt.options.vite.optimizeDeps.exclude, and nuxt.options.typescript.hoist). Also added a TypeScript import type for @intlify/h3 in src/runtime/server/routes/messages.ts. No runtime behavior, exported API, or TypeScript signatures were changed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 3
✅ 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 'fix: inline @intlify/h3 to avoid dupes' directly and clearly summarizes the main change: inlining the @intlify/h3 package to prevent duplicate versions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ecosystem-ci-compat

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.

@danielroe danielroe marked this pull request as draft April 2, 2026 07:05
@danielroe
Copy link
Copy Markdown
Contributor Author

@BobbieGoede do you know why we replace one set of h3 exports with another?

@BobbieGoede
Copy link
Copy Markdown
Member

@BobbieGoede do you know why we replace one set of h3 exports with another?

I'm not sure which exports/replacements you mean exactly, @intlify/h3 adds utilities but does not replace any if I recall correctly.

/cc @kazupon

@kazupon
Copy link
Copy Markdown
Collaborator

kazupon commented Apr 2, 2026

@danielroe
As @BobbieGoede mentioned, @intlify/h3 does not replace any h3 exports.

It re-exports all utilities from @intlify/utils/h3 (e.g. getHeaderLocale, getCookieLocale, getPathLocale, etc.) via export * from '@intlify/utils/h3' and adds its own i18n middleware/translation utilities on top (defineI18nMiddleware, useTranslation, detectLocaleFromAcceptLanguageHeader).

The re-export from @intlify/utils/h3 is just a convenience so that consumers can import everything from @intlify/h3 without needing to depend on @intlify/utils directly.

I can understand this could cause the duplication issue you're seeing when both packages are resolved separately.

@BobbieGoede
Copy link
Copy Markdown
Member

@danielroe is this PR still relevant to fix the issue you ran into?

@danielroe
Copy link
Copy Markdown
Contributor Author

i'm not sure - ecosystem ci is blocked by the ts-expect-error that my other pr removes - i'll check again after that merges

@danielroe
Copy link
Copy Markdown
Contributor Author

nope! we are good now

@danielroe danielroe closed this Apr 30, 2026
@danielroe danielroe deleted the fix/ecosystem-ci-compat branch April 30, 2026 10:39
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.

3 participants