Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/kysely-tailordb-codegen-kysely-0-29.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tailor-platform/function-kysely-tailordb-codegen": patch
---

Build against Kysely 0.29. The table metadata handed to kysely-codegen now sets `isForeign` for foreign tables, which Kysely 0.29 requires and its own PostgreSQL introspector fills in the same way.
5 changes: 5 additions & 0 deletions .changeset/kysely-tailordb-codegen-zx.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tailor-platform/function-kysely-tailordb-codegen": patch
---

Update zx to 8.8.5 or later.
5 changes: 5 additions & 0 deletions .changeset/kysely-tailordb-tsdown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tailor-platform/function-kysely-tailordb": patch
---

Build the package with tsdown instead of tsup. The published files keep their names (`index.js`, `index.cjs`, `index.d.ts`, `index.d.cts`), and the exports and behavior are the same.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"ci:publish": "pnpm publish -r --no-git-checks --access=public"
},
"devDependencies": {
"@changesets/changelog-github": "0.7.0",
"@changesets/cli": "2.31.1"
"@changesets/changelog-github": "1.0.1",
"@changesets/cli": "3.0.3"
},
"packageManager": "pnpm@10.34.9",
"engines": {
Expand Down
13 changes: 6 additions & 7 deletions packages/kysely-tailordb-codegen/biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"indentStyle": "space",
"indentWidth": 2,
"formatWithErrors": false,
"ignore": ["package.json"]
"includes": ["**", "!**/package.json", "!**/*.md"]
},
"javascript": {
"formatter": {
Expand All @@ -16,17 +16,16 @@
},
"linter": {
"enabled": true,
"ignore": ["**/node_modules/**", "**/dist/**"],
"includes": ["**", "!**/node_modules/**", "!**/dist/**"],
"rules": {
"recommended": true
"preset": "recommended"
}
},
"organizeImports": {
"enabled": true
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
"useIgnoreFile": true,
"root": "../.."
}
}
12 changes: 6 additions & 6 deletions packages/kysely-tailordb-codegen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
},
"dependencies": {
"commander": "^14.0.0",
"zx": "^8.5.4"
"zx": "^8.8.5"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@biomejs/biome": "2.6.6",
"@tailor-platform/function-types": "workspace:*",
"@types/fs-extra": "11.0.4",
"@types/node": "22.20.5",
"esbuild": "0.28.1",
"kysely": "0.28.17",
"@types/node": "24.19.2",
"esbuild": "0.28.2",
"kysely": "0.29.8",
"kysely-codegen": "0.18.5",
"typescript": "5.9.3",
"typescript": "7.0.2",
"unenv": "1.10.0"
}
}
3 changes: 2 additions & 1 deletion packages/kysely-tailordb-codegen/src/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default async (args: { namespace: string }) => {
};

// Since Kysely's parseTableMetadata is not exported, it is copied below.
// https://github.com/kysely-org/kysely/blob/0.28.2/src/dialect/postgres/postgres-introspector.ts#L103
// https://github.com/kysely-org/kysely/blob/v0.29.8/src/dialect/postgres/postgres-introspector.ts#L99
const parseTableMetadata = (columns: RawColumnMetadata[]): TableMetadata[] => {
return columns.reduce<TableMetadata[]>((tables, it) => {
let table = tables.find(
Expand All @@ -39,6 +39,7 @@ const parseTableMetadata = (columns: RawColumnMetadata[]): TableMetadata[] => {
if (!table) {
table = Object.freeze({
name: it.table,
isForeign: it.table_type === "f",
isView: it.table_type === "v",
schema: it.schema,
columns: [],
Expand Down
13 changes: 6 additions & 7 deletions packages/kysely-tailordb/biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"indentStyle": "space",
"indentWidth": 2,
"formatWithErrors": false,
"ignore": ["package.json"]
"includes": ["**", "!**/package.json", "!**/*.md"]
},
"javascript": {
"formatter": {
Expand All @@ -16,17 +16,16 @@
},
"linter": {
"enabled": true,
"ignore": ["**/node_modules/**", "**/dist/**"],
"includes": ["**", "!**/node_modules/**", "!**/dist/**"],
"rules": {
"recommended": true
"preset": "recommended"
}
},
"organizeImports": {
"enabled": true
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
"useIgnoreFile": true,
"root": "../.."
}
}
10 changes: 5 additions & 5 deletions packages/kysely-tailordb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"scripts": {
"check": "biome check .",
"check-write": "biome check --write .",
"build": "tsup src/index.ts --format esm,cjs --dts --clean",
"build": "tsdown",
"clean": "rm -rf dist",
"type-check": "tsc --noEmit && tsc --noEmit -p type-tests",
"prepublishOnly": "pnpm run build"
Expand All @@ -29,13 +29,13 @@
"CHANGELOG.md"
],
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@biomejs/biome": "2.6.6",
"@tailor-platform/function-types": "workspace:*",
"@tailor-platform/sdk": "2.38.0",
"@tsconfig/recommended": "1.0.13",
"kysely": "0.28.17",
"tsup": "8.5.1",
"typescript": "5.9.3"
"kysely": "0.29.8",
"tsdown": "0.23.7",
"typescript": "7.0.2"
},
"peerDependencies": {
"kysely": ">= 0.24.0 < 1"
Expand Down
4 changes: 2 additions & 2 deletions packages/kysely-tailordb/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class TailordbDialect implements Dialect {
return new PostgresAdapter();
}

// biome-ignore lint/suspicious/noExplicitAny:
// biome-ignore lint/suspicious/noExplicitAny: the Dialect interface takes a Kysely of any database
createIntrospector(db: Kysely<any>): DatabaseIntrospector {
return new PostgresIntrospector(db);
}
Expand Down Expand Up @@ -102,7 +102,7 @@ class TailordbConnection implements DatabaseConnection {
};
}

// biome-ignore lint/correctness/useYield:
// biome-ignore lint/correctness/useYield: streaming is not supported, so the generator only throws
async *streamQuery(_compiledQuery: CompiledQuery, _chunkSize: number) {
throw new Error("Not supported");
}
Expand Down
8 changes: 8 additions & 0 deletions packages/kysely-tailordb/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from "tsdown";

export default defineConfig({
entry: ["src/index.ts"],
format: ["esm", "cjs"],
dts: true,
fixedExtension: false,
});
2 changes: 1 addition & 1 deletion packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"prepublishOnly": "pnpm run build"
},
"devDependencies": {
"typescript": "5.9.3"
"typescript": "7.0.2"
},
"files": [
"dist",
Expand Down
Loading
Loading