Skip to content
Open
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
7 changes: 0 additions & 7 deletions .changeset/auth-forced-id.md

This file was deleted.

47 changes: 0 additions & 47 deletions .changeset/orm-lazy-tables.md

This file was deleted.

4 changes: 2 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 60 additions & 0 deletions packages/kitcn/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
# kitcn

## 0.34.0

### Minor Changes

- [#494](https://github.com/udecode/kitcn/pull/494) [`182403a`](https://github.com/udecode/kitcn/commit/182403a7c4c6976a96b1fdbaf842bfa98904386e) Thanks [@EfficiencyCorp](https://github.com/EfficiencyCorp)! - ## Breaking changes

- Build ORM tables on first use. `convexTable(...)` no longer throws definition errors (invalid indexes, constraints, extra config). They throw when the schema is pushed, when `kitcn codegen` runs, or when `schema.export()` is called.

```ts
// Before: throws here
const posts = convexTable("posts", { text: text() }, () => [
searchIndex("s"),
]);

// After: throws on push and codegen, or in a test with schema.export()
const schema = defineSchema({ posts });
schema.export();
```

- Reference columns in extra config through the table argument. A column builder variable shared across tables and used directly in an index throws an ownership error at push.

```ts
// Before
const tenantId = text().notNull();
const a = convexTable("a", { tenantId }, () => [index("a_t").on(tenantId)]);

// After
const a = convexTable("a", { tenantId }, (t) => [
index("a_t").on(t.tenantId),
]);
```

- Require `rlsPolicy(...).link(table)` at module scope, in `schema.ts` or in the module that declares the table. A linked policy applies to its table as soon as it is linked.

```ts
// Before: linked inside another table's extra config
const posts = convexTable("posts", { body: text() }, () => [
rlsPolicy("read_users", { for: "select" }).link(users),
]);

// After: link at module scope
export const readUsers = rlsPolicy("read_users", { for: "select" }).link(
users
);
```

## Patches

- Preserve self-referencing foreign keys whose callbacks read table metadata through `getTableConfig`.
- Preserve foreign-key targets and required fields when column builders are reused across tables or in a discriminator.
- Improve cold Convex function start: a query or insert builds only the tables it touches, and query contexts no longer build every table's query builder and foreign-key graph. The first update or delete still reads every table's foreign keys, and `createOrm` without the aggregate capability still builds every table.
- Fix broken `references(() => ...)` callbacks surfacing on the first ORM call instead of on push, and passing on a retry.
- Improve `kitcn codegen` speed on large projects: a module that many Convex modules import evaluates once per run instead of once per importer.

### Patch Changes

- [#495](https://github.com/udecode/kitcn/pull/495) [`a2eb3fe`](https://github.com/udecode/kitcn/commit/a2eb3fee2bfa51191715ae6b99df0980570af47c) Thanks [@EfficiencyCorp](https://github.com/EfficiencyCorp)! - ## Patches

- Fix Better Auth creates that carry their own id (`forceAllowId`) failing with `` Unexpected field `_id` ``: organization invitations on Better Auth 1.7.16 with default options, and `reserveVerificationValue` (magic link and email OTP for unverified users, SIWE, SAML). The row now gets its Convex id, and Better Auth reads it back under that id. A second `reserveVerificationValue` for the same identifier is still refused while the first row exists. A forced-id `oauthClientAssertion` create (`private_key_jwt`) is refused, so a replayed assertion cannot get in.

## 0.33.12

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/kitcn/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kitcn",
"version": "0.33.12",
"version": "0.34.0",
"description": "kitcn - React Query integration and CLI tools for Convex",
"keywords": [
"convex",
Expand Down
2 changes: 2 additions & 0 deletions packages/resend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @kitcn/resend

## 0.34.0

## 0.33.12

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/resend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kitcn/resend",
"version": "0.33.12",
"version": "0.34.0",
"description": "kitcn Resend plugin",
"type": "module",
"sideEffects": false,
Expand Down
Loading