Skip to content

Conversation

@Manik-Khajuria-5
Copy link

@Manik-Khajuria-5 Manik-Khajuria-5 commented Jan 5, 2026

Summary

Fixes : #3761
This PR migrates the version URL parsing logic to TypeScript as part of the ongoing TS conversion effort.


Changes Made

  • Migrated parseUrlParams and helpers to TypeScript
  • Added explicit types for:
    • validateVersion(version: string | null)
    • validateBool(value: string | null, defaultValue: boolean)
    • getNewestVersion(versions: string[])
  • Introduced an exported interface for parsed URL params
  • Normalized p5Versions to handle both string and { version, label } entries safely
  • Migrated existing tests to TypeScript with no behavior changes

Related Issue

Closes #3761

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • has no typecheck errors (npm run typecheck)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #3761
  • meets the standards outlined in the accessibility guidelines

@welcome
Copy link

welcome bot commented Jan 5, 2026

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already.

@Manik-Khajuria-5 Manik-Khajuria-5 marked this pull request as draft January 6, 2026 12:03
@Manik-Khajuria-5 Manik-Khajuria-5 marked this pull request as ready for review January 6, 2026 12:18
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.

Migrate Version URL Parser to TypeScript

1 participant