Skip to content

optimize import for valibot#39

Merged
cobraprojects merged 1 commit into
mainfrom
validate-optimize-import
May 12, 2026
Merged

optimize import for valibot#39
cobraprojects merged 1 commit into
mainfrom
validate-optimize-import

Conversation

@cobraprojects

@cobraprojects cobraprojects commented May 12, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores

    • Removed unused dependencies from blog applications to improve maintainability
  • Improvements

    • Enhanced Nuxt adapter with optimized dependency bundling configuration for faster build times

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 12, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b8733ece-4918-49d9-8e6b-eb4ce8e7ae23

📥 Commits

Reviewing files that changed from the base of the PR and between ac82a4b and f57ffe3.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • apps/blog-next/package.json
  • apps/blog-nuxt/package.json
  • apps/blog-sveltekit/package.json
  • packages/adapter-nuxt/src/module.ts
  • packages/adapter-nuxt/tests/setup.test.ts
💤 Files with no reviewable changes (3)
  • apps/blog-next/package.json
  • apps/blog-nuxt/package.json
  • apps/blog-sveltekit/package.json

📝 Walkthrough

Walkthrough

The PR removes the unused @holo-js/events dependency from three blog applications and adds Vite optimize-deps configuration to the Nuxt adapter module. The adapter now resolves installed client-side @holo-js/* packages and valibot subpaths, detects module-resolution failures, and merges resolvable entries into Nuxt's Vite optimize-deps settings during module setup. Test harness and test cases validate the resolution and merge behavior.

Changes

Blog Dependency Cleanup & Nuxt Adapter Vite Optimization

Layer / File(s) Summary
Blog app dependency cleanup
apps/blog-next/package.json, apps/blog-nuxt/package.json, apps/blog-sveltekit/package.json
Remove unused @holo-js/events workspace dependency from all three blog application manifests.
Nuxt adapter Vite optimize-deps feature
packages/adapter-nuxt/src/module.ts
Import createRequire for dependency resolution. Define HOLO_PACKAGE_SCOPE and CLIENT_OPTIMIZE_DEPS constant listing packages and valibot subpaths. Implement isModuleResolutionFailure detection and define ViteOptimizeDepsOptions and NuxtViteOptions type shapes. Extend NuxtOptionsWithNitro with optional vite field. Implement resolveClientOptimizeDeps(rootDir) to collect resolvable entries and addViteOptimizeDeps(opts, deps) to merge into user settings. Call addViteOptimizeDeps during module setup. Export three new internals: addViteOptimizeDeps, isModuleResolutionFailure, resolveClientOptimizeDeps.
Test harness and optimizer test cases
packages/adapter-nuxt/tests/setup.test.ts
Extend NuxtHarnessOptions with optional vite.optimizeDeps.include field. Add getOptimizeDepsInclude helper to read optimizer settings from harness. Introduce linkHoloPackage utility to symlink local Holo packages into temp project node_modules. Update loadAdapterModule to expose moduleInternals. Add tests validating resolveClientOptimizeDeps for installed dependency resolution (including failure-code handling) and verifying merged optimizer includes while preserving user exclude/include settings.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 Three packages shed their weight, events now gone,
Vite optimizes the path, dependencies along.
Nuxt adapter learns to prebundle with care,
Tests prove the flow—a faster, cleaner air! 🚀

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'optimize import for valibot' is misleading—changes focus on removing @holo-js/events and adding Vite prebundling for @holo-js/* dependencies, with no valibot involvement. Revise title to reflect actual changes, such as 'Remove @holo-js/events dependency and configure Vite prebundling' or similar.
Docstring Coverage ⚠️ Warning Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 validate-optimize-import

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.

@cobraprojects cobraprojects merged commit 0222e40 into main May 12, 2026
1 check passed
@cobraprojects cobraprojects deleted the validate-optimize-import branch May 12, 2026 16:15
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