Skip to content

chore(deps): update dependencies and support Kysely 0.29 - #225

Merged
toiroakr merged 13 commits into
mainfrom
chore/update-dependencies
Nov 12, 2026
Merged

toiroakr merged 13 commits into
mainfrom
chore/update-dependencies

Conversation

@toiroakr

@toiroakr toiroakr commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Updates Kysely to 0.29.8 and fixes kysely-tailordb-codegen for it. The closed Renovate update (chore(deps): update dependency kysely to v0.29.8 #215) failed kysely-tailordb-codegen / test with TS2741: Property 'isForeign' is missing: the codegen carries a copy of Kysely's PostgreSQL parseTableMetadata, and TableMetadata.isForeign became required in 0.29. It is now filled from table_type (f is a foreign table), the same way Kysely does it. The link in the comment points at the 0.29.8 source.
  • Replaces tsup with tsdown 0.23.7 for kysely-tailordb. fixedExtension: false keeps the output names (index.js, index.cjs, index.d.ts, index.d.cts), so main, module, types and exports do not change. The ESM and CommonJS builds export the same TailordbDialect and behave the same against a mocked client, and the declarations type-check in the same three environments as in fix(kysely-tailordb): stop depending on the global Tailordb namespace #224.
  • Updates TypeScript to 7.0.2 in all three packages, which tsup could not build with. tsdown warns that its declaration generator for TypeScript 7.0 is deprecated and will be removed in the next minor, so this needs another look once TypeScript 7.1 is out.
  • Other updates, each checked with check, type-check and build: esbuild 0.28.2, @types/node 24 (to match the Node 24 in engines), zx 8.8.5, Biome 2 (config migrated with the same formatting and lint settings; vcs.root points at the repository root and **/*.md stays out of the formatter, as before), @changesets/cli 3 and @changesets/changelog-github 1 (changeset version still writes the changelog). The minimumReleaseAgeExclude entries for the old Kysely and esbuild security updates no longer match anything and are removed.
  • Left as is:
    • kysely-codegen 0.20.0: bundling it into function.js fails to load with __filename is not defined in ES module scope. It is handled in a follow-up PR stacked on this one.
    • commander 15: it needs Node.js 22.12 or later, while 14 runs on Node 20 and kysely-tailordb-codegen declares no engines. Raising the floor silently in a patch release is not part of this update.
  • The CLI of kysely-tailordb-codegen prints the same --help and the same error for a missing option as before, and function.js produces the same generated code for a mocked TailorDB client.
  • This PR is stacked on fix(kysely-tailordb): stop depending on the global Tailordb namespace #224 (its base is that branch) because both change neighboring lines of package.json and src/index.ts. Once fix(kysely-tailordb): stop depending on the global Tailordb namespace #224 is merged, change the base to main.

The published declarations referenced `Tailordb.Client`, a global type
namespace that only the deprecated @tailor-platform/function-types
declares. Without that package, consumers that do not skip library
checks got TS2833 (or TS2503 when no ambient types were loaded at all).

Describe the client by the three methods the dialect calls instead.
Both the legacy `Tailordb.Client` and the `tailordb.Client` of
@tailor-platform/sdk are assignable to it, and runtime behavior is
unchanged. The package no longer needs function-types for its own type
check, so drop it from tsconfig and devDependencies, and point the
README at the SDK runtime globals.
…are accepted

Add a type-only test that passes both the legacy `Tailordb.Client` of
@tailor-platform/function-types and the `tailordb.Client` of
@tailor-platform/sdk to TailordbDialect. If either package changes the
shape of its client in a way the dialect cannot accept, type-check now
fails, including when Renovate bumps the SDK.

The test needs the SDK exports map to resolve, so it has its own
tsconfig with bundler module resolution and type-check runs both.
Kysely 0.29 makes `TableMetadata.isForeign` required, so the copy of the
PostgreSQL introspector's `parseTableMetadata` in kysely-tailordb-codegen
no longer type-checks. Fill it in from `table_type`, the way Kysely's own
introspector does (`relkind` `f` is a foreign table), and point the link in
the comment at the 0.29.8 source.
- typescript 5.9.3 -> 6.0.3 (kysely-tailordb, kysely-tailordb-codegen, logger).
  TypeScript 7 is not an option yet: tsup builds the declarations through
  rollup-plugin-dts, which needs the TypeScript compiler API that 7.0 no
  longer provides.
- tsup 8.5.1 -> 9.0.0.
- esbuild 0.28.1 -> 0.28.2.
- @types/node 22.20.5 -> 24.19.2, to match the Node 24 the repository
  declares in engines.
The CLI of kysely-tailordb-codegen only uses `requiredOption`, `opts` and
`error`, and its `--help` output and the error for a missing option are
the same as before. commander 15 requires Node.js 22.12 or later, which is
below the Node 24 the repository declares in engines.

kysely-codegen stays on 0.18.5: bundling 0.20.0 into function.js produces
a file that fails to load with `__filename is not defined in ES module
scope`.
Migrate the biome.json of kysely-tailordb and kysely-tailordb-codegen to
the 2.x schema, keeping the same formatting and lint settings. Two
things differ from 1.9: `vcs.root` has to point at the repository root
for biome to find .gitignore, and `**/*.md` is excluded from the
formatter because 2.x would otherwise start formatting the READMEs.

The two `biome-ignore` comments in kysely-tailordb now carry a reason,
which 2.x requires.
@changesets/cli 2.31.1 -> 3.0.3 and @changesets/changelog-github
0.7.0 -> 1.0.1. `changeset status` reads the existing config and the
pending changesets without changes.
The only dependency whose range moved when updating within the declared
ranges. The CLI of kysely-tailordb-codegen builds and prints the same
`--help` output, and the generated code for a mocked TailorDB client is
the same as before.
The two entries were temporary exceptions for Renovate security updates
to kysely 0.28.17 and esbuild 0.28.1. Neither version is in the
lockfile any more, so the exceptions no longer match anything.
commander 15 requires Node.js 22.12 or later, while 14 runs on Node 20 and
kysely-tailordb-codegen declares no engines. Updating it in a patch release
would silently drop Node 20 for the CLI, so leave it out of this update and
decide the Node floor, or a different CLI library, separately.
Build kysely-tailordb with tsdown 0.23.7. `fixedExtension: false` keeps the
output names as they were (`index.js`, `index.cjs`, `index.d.ts` and
`index.d.cts`), so package.json needs no change to `main`, `module`,
`types` and `exports`.

The ESM and CommonJS builds export the same `TailordbDialect` and run the
same way against a mocked client, and the declarations type-check in the
same three environments as before. TypeScript stays on 6.0.3.
typescript 6.0.3 -> 7.0.2 in kysely-tailordb, kysely-tailordb-codegen and
logger. With tsdown in place of tsup, all three packages build and
type-check on 7.0.2, the declarations of kysely-tailordb still type-check
with and without function-types or the SDK runtime globals, and the CLI
and generated code of kysely-tailordb-codegen are unchanged.

tsdown warns that the tsgo declaration generator for TypeScript 7.0 is
deprecated and will be removed in the next minor, so revisit this when
TypeScript 7.1 is out.
@toiroakr
toiroakr marked this pull request as ready for review November 11, 2026 13:03
@toiroakr
toiroakr requested a review from a team as a code owner November 11, 2026 13:03
Base automatically changed from fix/kysely-tailordb-client-type to main November 12, 2026 00:43

@jackchuka jackchuka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@toiroakr
toiroakr merged commit 8283c1b into main Nov 12, 2026
6 checks passed
@toiroakr
toiroakr deleted the chore/update-dependencies branch November 12, 2026 00:48
@github-actions github-actions Bot mentioned this pull request Nov 12, 2026
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.

2 participants