Closed omikader closed 1 year ago
Latest commit: c0e13587842e6b2c642275e9b683817cbad0ac98
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
kysely
version0.26.0
introduced a breaking API change that removed theorWhere
method which is used in thePostgresIntrospector
class. See https://github.com/sst/kysely-data-api/issues/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.