Skip to content

Migrate to generated SDK and update sharp dependency - #926

Merged
kensac merged 4 commits into
productionfrom
main
Sep 12, 2026
Merged

kensac merged 4 commits into
productionfrom
main

Conversation

@kensac

@kensac kensac commented Sep 12, 2026

Copy link
Copy Markdown
Member

No description provided.

renovate Bot and others added 4 commits September 11, 2026 15:32
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
src/lib/api held a hand-written copy of the API surface, the same copy
that lives in adminv2 and finance-dashboard. Replace it with
@hackpsu/react-sdk, whose client is generated from the API's own OpenAPI
document, so drift becomes a compile error.

This app gates per route rather than globally: marketing pages are public
and only (protected) requires a session. HackPSUProvider therefore renders
with guard={false} and the protected layout keeps its own AuthGuard, which
gained a minimumRole prop for exactly this case.

Call sites change shape rather than just name: generated mutations take a
variables object, and queries take a params object. Reimbursement and
photo upload no longer build FormData by hand, since the generated client
serialises multipart bodies itself.

Nullable fields are typed T | null rather than optional, so form controls
coalesce them. Several registration fields the API has always accepted as
absent were declared required in the document; apiv3 #940 corrected that
rather than making this form send values the server ignores.

Values this app owns rather than the API, UsersCategory and
PROJECT_CATEGORIES, move to src/lib/constants. lib/config/settings.json
stays where it is.
Renovate reads the registry mapping from .npmrc but will not query a
non-npmjs host unless it is allowed, so @hackpsu/react-sdk would have gone
stale without update PRs. The Artifact Registry repository grants public
read, so the host rule needs no credentials.

Group the client and the SDK into one PR: react-sdk pins an exact
api-client version, so they cannot move independently.
Consume the generated SDK instead of a local API layer
@vercel

vercel Bot commented Sep 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
frontend-template Building Building Preview Sep 12, 2026 11:24pm UTC

Request Review

@kensac
kensac merged commit 91323ff into production Sep 12, 2026
3 of 4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 0a5b1925 Deployed Sep 12, 2026 by vercel[bot]
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.

1 participant