Repository navigation
chore(deps): update dependencies and support Kysely 0.29 - #225
Merged
Merged
Conversation
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.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
kysely-tailordb-codegenfor it. The closed Renovate update (chore(deps): update dependency kysely to v0.29.8 #215) failedkysely-tailordb-codegen / testwithTS2741: Property 'isForeign' is missing: the codegen carries a copy of Kysely's PostgreSQLparseTableMetadata, andTableMetadata.isForeignbecame required in 0.29. It is now filled fromtable_type(fis a foreign table), the same way Kysely does it. The link in the comment points at the 0.29.8 source.kysely-tailordb.fixedExtension: falsekeeps the output names (index.js,index.cjs,index.d.ts,index.d.cts), somain,module,typesandexportsdo not change. The ESM and CommonJS builds export the sameTailordbDialectand 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.check,type-checkandbuild: esbuild 0.28.2,@types/node24 (to match the Node 24 inengines), zx 8.8.5, Biome 2 (config migrated with the same formatting and lint settings;vcs.rootpoints at the repository root and**/*.mdstays out of the formatter, as before),@changesets/cli3 and@changesets/changelog-github1 (changeset versionstill writes the changelog). TheminimumReleaseAgeExcludeentries for the old Kysely and esbuild security updates no longer match anything and are removed.kysely-codegen0.20.0: bundling it intofunction.jsfails to load with__filename is not defined in ES module scope. It is handled in a follow-up PR stacked on this one.kysely-tailordb-codegendeclares noengines. Raising the floor silently in a patch release is not part of this update.kysely-tailordb-codegenprints the same--helpand the same error for a missing option as before, andfunction.jsproduces the same generated code for a mocked TailorDB client.package.jsonandsrc/index.ts. Once fix(kysely-tailordb): stop depending on the global Tailordb namespace #224 is merged, change the base tomain.