fix(providers): parse prerelease Curio versions (e.g. 1.28.2-rc1)#321
fix(providers): parse prerelease Curio versions (e.g. 1.28.2-rc1)#321beck-8 wants to merge 1 commit into
Conversation
|
@beck-8 is attempting to deploy a commit to the FilOz Team on Vercel. A member of the Team first needs to authorize it. |
567927b to
f268741
Compare
Validation duplicated the package's version parsing as a local VERSION_PATTERN regex; both rejected semver prerelease suffixes (e.g. `1.28.2-rc1`), so RC builds failed validation and showed no version. Validate with the package's parseVersionString — the same parser used for the table display and CSV — and drop the duplicate VERSION_PATTERN. Prerelease handling then takes effect once @filecoin-foundation/ui-filecoin ships the prerelease-aware parser; the only remaining change is bumping that dependency.
f268741 to
a371bb7
Compare
There was a problem hiding this comment.
Pull request overview
Updates provider software-version validation to rely on the shared @filecoin-foundation/ui-filecoin version parser, eliminating a locally duplicated regex so prerelease handling can become consistent once the upstream parser release is bumped in this repo.
Changes:
- Switch
isValidVersionto validate viaparseVersionString(version) !== undefined. - Remove the now-unused
VERSION_PATTERNconstant from provider constants.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/services/providers/version.ts |
Uses parseVersionString for version validation instead of a local regex. |
src/services/providers/constants.ts |
Removes the duplicated VERSION_PATTERN constant. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * Validate a version string using the same parser as the table display and CSV. | ||
| */ | ||
| function isValidVersion(version: string): boolean { | ||
| return VERSION_PATTERN.test(version) | ||
| return parseVersionString(version) !== undefined | ||
| } |
|
@beck-8 : upstream fix has been merged and release should be going out. I assume you're unblocked now. |
|
@BigLep Upstream still needs to release a version |
Oof, this is turning into a chore. We're having slack conversations about what to do here (e.g., get https://github.com/FilecoinFoundationWeb/filecoin-foundation maintainers engaged, remove our dependency on the repo) |
What
Validate software versions with
@filecoin-foundation/ui-filecoin'sparseVersionStringinstead of a duplicate local regex, so prerelease Curio builds (e.g.1.28.2-rc1) are handled consistently everywhere.Why
isValidVersionused a localVERSION_PATTERNthat, like the package'sparseVersionString, rejected the-rc1prerelease suffix. RC builds failed validation, sosoftwareVersionwas left unset and the Version column showed-. The display component and CSV export already use the package parser, so the local regex was a second, divergent copy of the same logic.How
isValidVersionnow returnsparseVersionString(version) !== undefined— a single source of truth shared with display and CSV.VERSION_PATTERN.No local parser and no custom render: prerelease support arrives entirely through the dependency once #2337 is released.
Remaining step (on upstream release)
@filecoin-foundation/ui-filecointo the fixed release + commit the lockfile, then mark ready.Part of #319. Upstream fix: FilecoinFoundationWeb/filecoin-foundation#2336 / #2337.