Skip to content

Conversation

@webJose
Copy link
Contributor

@webJose webJose commented Sep 2, 2025

  • Export new functions from core only.
  • Have Link component type hash using the Hash type.

- Export new functions from core only.
- Have Link component type hash using the Hash type.
- No longer using runes in this function.
- Added JsDoc to calculateHref.
- Made sure calculateHref uses resolved hash value when hash is not given.
- Made hash option optional.
@webJose webJose requested a review from Copilot September 2, 2025 18:46
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 cleans up exports and refactors code organization following the implementation of navigation features. It removes some internal functions from the main library exports while reorganizing the codebase for better maintainability.

  • Removes exports of internal functions (isConformantState, calculateHref, calculateState) from the main library index
  • Extracts resolveHashValue function into its own module and updates all imports
  • Updates Link component to use the proper Hash type for the hash property

Reviewed Changes

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

Show a summary per file
File Description
src/lib/types.ts Adds comprehensive documentation for NavigateOptions type
src/lib/index.ts Removes exports of internal core functions
src/lib/index.test.ts Updates test expectations for removed exports
src/lib/core/resolveHashValue.ts New module containing extracted resolveHashValue function
src/lib/core/index.ts Updates exports and file references
src/lib/core/index.test.ts Updates test expectations for removed exports
src/lib/core/calculateState.ts Adds overloads and imports resolveHashValue from new location
src/lib/core/calculateState.test.ts Updates import path
src/lib/core/calculateHref.ts Major refactoring with new function overloads and improved logic
src/lib/core/RouterEngine.svelte.ts Removes resolveHashValue function (moved to separate file)
src/lib/core/LocationState.svelte.ts Adds class documentation
src/lib/core/LocationLite.svelte.ts Updates import paths
src/lib/core/LocationFull.ts Adds class documentation
src/lib/RouterTrace/RouterTrace.svelte Updates import path for resolveHashValue
src/lib/Router/Router.svelte Updates import path for resolveHashValue
src/lib/Route/Route.svelte Updates import path for resolveHashValue
src/lib/LinkContext/LinkContext.svelte Refactors class property initialization
src/lib/Link/Link.svelte Updates imports and uses proper Hash type
src/lib/Fallback/Fallback.svelte Updates import path for resolveHashValue

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

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@webJose webJose merged commit 909478e into main Sep 2, 2025
@webJose webJose deleted the JP/cleanup branch September 2, 2025 18:59
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