-
-
Notifications
You must be signed in to change notification settings - Fork 170
feat(types): setup postgrest-13 types inference #618
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
Merged
avallete
merged 15 commits into
master
from
avallete/psql-436-feedback-request-postgrest-js-and-postgrest-v13-integration
Jul 2, 2025
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
74c8bb6
wip
avallete 6705c5c
feat(types): add ClientOptions to handle multi postgrest versions
avallete 1ceb00d
chore: scope changes to pgrst13 introduction
avallete b8644af
chore: upgrade ubuntu workflow instances
avallete 9d64fb9
chore: export ClientServerOptions
avallete 8c15d0f
chore: make postgrestVersion optional
avallete ceae114
Update src/select-query-parser/result.ts
avallete fa63bdf
feat: handle options declaration within Database
avallete ab5b06d
fix: types
avallete 4110185
chore: use helper for feature flag from version
avallete 3be45ad
chore: use string for postgrestVersion
avallete ce274ac
chore: exclude types.ts from coverage
avallete a376d5f
chore: use CamelCasing convention
avallete f0eb70f
chore: update tests
avallete 83923f8
chore: use minimal schema
avallete File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
collectCoverageFrom: ['src/**/*'], | ||
collectCoverageFrom: ['src/**/*', '!src/types.ts'], | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't block the PR based on this but I have a hunch that adding new type parameters at the start/middle of the parameter list will break some 3rd party lib relying on the typings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum that's true, I've looked for usage on github: https://github.com/search?q=language%3ATypeScript++PostgrestBuilder%3C&type=code&p=3
Most of them seems to be forks though. Maybe we could pass this into a new major version though.
Or maybe in the changelog we can give a fix solution for compatibility:
Didn't tested it but this should allow to use the
PostgrestBuilder
type as before 🤔I think I remember having trouble pushing this as a last argument because then, it required to always also define the
ThrowOnError
param which has default set.