Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(typegen): Extract metadata generation to function #685

Conversation

isaacharrisholt
Copy link
Contributor

The metadata collection for types was previously in the TypeScript generator route. This PR pulls it out into a separate function, which should make it easier to create type generators for other languages in the future (I plan on implementing types for Go imminently).

The only change introduced by this PR is to exit early from the function if a fetch fails, rather than performing all the fetches then going though the errors one by one. Should mildly increase performance for the unhappy path, though it was more to make the code easier to follow.

What kind of change does this PR introduce?

Refactor

What is the current behavior?

Behaviour not changed.

What is the new behavior?

Behaviour not changed.

@isaacharrisholt isaacharrisholt requested review from a team as code owners January 3, 2024 14:14
Copy link
Member

@kamilogorek kamilogorek left a comment

Choose a reason for hiding this comment

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

LGTM

@isaacharrisholt isaacharrisholt mentioned this pull request Jan 10, 2024
3 tasks
@soedirgo soedirgo enabled auto-merge March 12, 2024 07:54
@soedirgo soedirgo merged commit 0dbbdb6 into supabase:master Mar 12, 2024
4 checks passed
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.

3 participants