Set strict kysely peer dependency version range #32
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.
kysely
version0.26.0
introduced a breaking API change that removed theorWhere
method which is used in thePostgresIntrospector
class. See #28 for more context.There are two approaches for fixing this issue.
Set a stricter
peerDependency
onkysely
kysely-data-api
to use akysely
version with a compatible APIkysely-data-api
kysely-data-api
to use^0.26.0
along with a major version bump to1.0.0
The pros of this approach are that we don't have to do any type gymnastics. However, this could potentially be disruptive for people who are happily using
kysely-data-api
on^0.26.0
without issue because they are not depending on thePostgresIntrospector
class.Introduce a runtime typecheck
As per the linked issue, this could look something like this:
However, in order for this to pass the type system, we'd need to add some utility functions with specific type guards which can get a bit messy.
We could also sprinkle in some
// @ts-ignore
but I'd rather avoid that if possible.