Skip to content

Conversation

@webJose
Copy link
Contributor

@webJose webJose commented Sep 27, 2025

No description provided.

@webJose webJose requested a review from Copilot September 27, 2025 16:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces functionality to allow extension packages to disallow specific routing modes (path, hash, or multi-hash routing) through configuration options. It implements validation that throws errors when restricted routing modes are used.

  • Adds new ExtendedRoutingOptions type with disallow flags for each routing mode
  • Creates assertAllowedRoutingMode utility function to validate routing mode usage
  • Integrates validation into all routing components to enforce restrictions

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/lib/utils.ts New utility function to validate allowed routing modes
src/lib/utils.test.ts Test coverage for the routing mode assertion function
src/lib/types.ts Extended type definitions for routing options with disallow flags
src/lib/core/options.ts Updated routing options handling to support disallow flags
src/lib/core/options.test.ts Added tests for new routing option defaults
src/lib/core/initCore.ts Updated to accept extended initialization options
src/lib/core/RouterEngine.svelte.ts Integrated routing mode validation in router engine
src/lib/core/RouterEngine.svelte.test.ts Added comprehensive tests for routing mode restrictions
src/lib/RouterTrace/RouterTrace.svelte Added validation before router context resolution
src/lib/Route/Route.svelte.test.ts Test coverage for routing restrictions in Route component
src/lib/Route/Route.svelte Integrated validation in Route component initialization
src/lib/Link/Link.svelte.test.ts Added tests for Link component routing restrictions
src/lib/Link/Link.svelte Added validation in Link component
src/lib/Fallback/Fallback.svelte.test.ts Test coverage for Fallback component restrictions
src/lib/Fallback/Fallback.svelte Integrated validation in Fallback component

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@webJose webJose merged commit 1ca5abe into main Sep 27, 2025
1 check passed
@webJose webJose deleted the JP/feature branch September 27, 2025 16:58
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