postgrest-js icon indicating copy to clipboard operation
postgrest-js copied to clipboard

feat(types): setup postgrest-13 types inference

Open avallete opened this issue 6 months ago • 1 comments

What kind of change does this PR introduce?

This lay out the ground basis to start introducing new postgrest-13 features to the client library.

  1. It adds a way to opt-in via an option new PostgrestClient(DB_URL, { postgrestVersion: 12 | 13 }> allowing the types inference to pick in and choose the right result based on the available features for this major version.
  2. Also allow to get this information from the generated Database types under __internal_supabase schema.
  3. Add a second test container running postgrest-13 to make sure we keep consistency between runtime/typing behavior.
  4. Implement the new postgrest13 Spread on Many Relationship behavior in inference.
  5. Upgrade the workflows ubuntu versions to repair the CI/CD pipeline due to ubuntu 20 deprecation.

avallete avatar May 19 '25 06:05 avallete

Coverage complain for no reason there.

Edit: Exclude types.ts from coverage, there isn't really anything to cover there.

avallete avatar May 28 '25 09:05 avallete

:tada: This PR is included in version 1.20.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Jul 02 '25 15:07 github-actions[bot]