Skip to content

Conversation

@lzxb
Copy link
Contributor

@lzxb lzxb commented Dec 10, 2025

Summary

This PR improves the router-vue package by enhancing property configuration and error handling:

  • Change router properties ( and ) to be configurable for Vue 3, allowing proper override after useProvideRouter is called
  • Add proper error handling when accessing / without calling useProvideRouter first, providing clear error messages
  • Add comprehensive test coverage for router access scenarios, including error cases and proper usage
  • Improve Vue 2/3 compatibility in plugin and router-link components by refactoring version detection logic
  • Add runWithContext test file to verify Vue app context behavior and injection mechanics

Checklist

  • Tests updated (or not required)
  • Documentation updated (or not required)

…ndling

- Change router properties to be configurable for Vue 3
- Add proper error handling when accessing / without useProvideRouter
- Add comprehensive test coverage for router access scenarios
- Improve Vue 2/3 compatibility in plugin and router-link components
- Add runWithContext test file to verify Vue app context behavior
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 10, 2025

Deploying esmx with  Cloudflare Pages  Cloudflare Pages

Latest commit: a5d6a15
Status: ✅  Deploy successful!
Preview URL: https://5c1f5c23.esmx.pages.dev
Branch Preview URL: https://fix-router-vue-properties-an.esmx.pages.dev

View logs

- Add comprehensive test coverage for defineRouterProperties function
- Test property definition, getter behavior, and configuration options
- Verify non-enumerable and configurable property settings
- Test error handling and edge cases
- All 13 new tests pass with 100% code coverage
@lzxb lzxb merged commit e4fa912 into master Dec 10, 2025
4 checks passed
@lzxb lzxb deleted the fix/router-vue-properties-and-error-handling branch December 10, 2025 03:17
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.

2 participants