ymc9
c96bdbaf6e
address PR comments
2026-03-12 21:35:50 -07:00
ymc9
1ba4e54066
refactor(schema): widen types for attributes, default, and foreignKeyFor in generated schema
...
The generated schema previously used `as const` on entire model/enum/typeDef
objects, causing TypeScript to deeply infer literal types for all nested
properties. This is unnecessary for `attributes`, `default`, and `foreignKeyFor`
which are only used at runtime, not in CRUD type computations.
Changes:
- Add type assertions (`as readonly AttributeApplication[]`, `as FieldDefault`,
`as readonly string[]`) to prevent deep const inference on these properties
- Extract `FieldDefault` type alias from `FieldDef` for cleaner generated code
- Change `FieldHasDefault` to use key existence check (`'default' extends keyof`)
instead of value type check, enabling the `default` widening
- Conditionally import `AttributeApplication` and `FieldDefault` only when used
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:51:43 -07:00
github-actions[bot]
2c32dc329e
[CI] Bump version 3.4.6 ( #2477 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-03-11 11:40:16 -07:00
github-actions[bot]
bd2b111b8e
[CI] Bump version 3.4.5 ( #2457 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-03-06 22:26:46 -08:00
github-actions[bot]
07586f24cf
[CI] Bump version 3.4.4 ( #2450 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-03-04 18:48:24 -08:00
github-actions[bot]
518cbb7ddf
[CI] Bump version 3.4.3 ( #2436 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-03-03 09:34:03 -08:00
github-actions[bot]
f58550e262
[CI] Bump version 3.4.2 ( #2430 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-03-01 20:26:23 -08:00
github-actions[bot]
3336505ed6
[CI] Bump version 3.4.1 ( #2422 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-02-27 19:37:57 -08:00
github-actions[bot]
2da0c214dc
[CI] Bump version 3.4.0 ( #2408 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-02-25 22:40:51 -05:00
Yiming Cao
1e70052ded
feat(zod): introduce an option to control depth of the built zod schemas ( #2392 )
2026-02-21 12:08:31 -08:00
Yiming Cao
3e03ab1506
refactor: remove import from orm package in generated schema ( #2387 )
2026-02-19 18:16:13 -08:00
Yiming Cao
fc703b8f42
chore: clean up repo merging stale files ( #2370 )
2026-02-11 11:51:44 +08:00
Yiming Cao
f3a24dd5d5
chore: rebuild and update test schemas ( #671 )
2026-02-08 11:29:32 +08:00
Copilot
5d1053f658
fix(schema): use type-only imports to prevent bundling server dependencies in client code ( #668 )
...
* Initial plan
* Fix: Change ModelResult/TypeDefResult imports to type-only imports in ts-schema-generator
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
* Regenerate test schemas with type-only imports
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
* Fix: Update bun runtime models.ts to use type-only imports
Co-authored-by: Yiming Cao <ymc9@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Yiming Cao <ymc9@users.noreply.github.com>
2026-02-07 23:25:23 +08:00
github-actions[bot]
274871b858
chore: bump version 3.3.3 ( #659 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-02-06 16:14:11 +08:00
github-actions[bot]
392b8a2da5
chore: bump version 3.3.2 ( #648 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-02-01 20:59:52 +08:00
github-actions[bot]
646267d736
chore: bump version 3.3.1 ( #642 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-01-31 16:07:23 +08:00
github-actions[bot]
3392104d04
chore: bump version 3.3.0 ( #635 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-01-30 16:22:01 +08:00
Yiming Cao
209312a27b
fix(orm): properly handle literal array values in policy evaluation for postgres ( #628 )
2026-01-29 00:15:07 +08:00
Yiming Cao
84d1e60ae1
perf(orm): more aggressive caching of validation zod schemas ( #623 )
...
* WIP: more aggressive caching of validation zod schemas
* refactor: use a decorator-based approach for caching
* update
* update
* update
* update
* update
* remove object-type args from cache key
* update cache key
2026-01-27 11:30:05 +08:00
Yiming Cao
233b47d2ed
feat: plugin-extended query args ( #599 )
...
https://discord.com/channels/1035538056146595961/1460921516936925388
2026-01-16 20:52:42 +08:00
github-actions[bot]
f54093db51
chore: bump version 3.2.1 ( #587 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-01-11 16:44:20 +08:00
Yiming Cao
c4ee20a889
chore: regenerate ts schemas ( #583 )
2026-01-09 17:48:30 +08:00
Yiming Cao
880e3b6f8c
chore: regenerate schemas ( #575 )
...
* feat(cli): implement watch mode for generate
* chore(root): update pnpm-lock.yaml
* chore(cli): track all model declaration and removed paths, logs in past tense
* fix(cli): typo, unused double array from
* fix(orm): preserve zod validation errors when validating custom json types
* update
* chore(cli): move import, fix parallel generation on watch
* feat(common-helpers): implement single-debounce
* chore(cli): use single-debounce for debouncing
* feat(common-helpers): implement single-debounce
* fix(common-helpers): re run single-debounce
* chore: regenerate schemas
---------
Co-authored-by: FTB_lag <tabolskyy.git@gmail.com>
2026-01-08 16:59:49 +08:00
Yiming Cao
2c9db43cc2
feat(cli): implement watch mode for generate ( #573 )
...
* feat(cli): implement watch mode for generate
* chore(root): update pnpm-lock.yaml
* chore(cli): track all model declaration and removed paths, logs in past tense
* fix(cli): typo, unused double array from
* fix(orm): preserve zod validation errors when validating custom json types
* update
* chore(cli): move import, fix parallel generation on watch
* feat(common-helpers): implement single-debounce
* chore(cli): use single-debounce for debouncing
* feat(common-helpers): implement single-debounce
* fix(common-helpers): re run single-debounce
* fix(tanstack): avoid invalidating queries for custom proc mutations
* add missing file
* fix formatting
---------
Co-authored-by: FTB_lag <tabolskyy.git@gmail.com>
2026-01-08 16:12:14 +08:00
Mike Willbanks
2172614e0e
custom procedures ( #551 )
...
* feat: custom procs
* chore: cleanup
* fix: remove $procedures from client
* fix: failing test due to previous alias
* feat(custom-procs)!: make procedures envelope-only via $procs
- Switch procedure calls to `db.$procs.name({ args: {...} })` (no positional args)
- Remove legacy `$procedures` alias entirely (client API + server routing/logging)
- Validate procedure envelope input (`args` object, required/unknown keys)
- Keep TanStack Query procedure hooks as `(args, options)` (with conditional args optionality)
- Update server/ORM/client tests for the envelope API
* fix: code review feedback
* fix: code review comments
* fix: coderabbit review comments
* fix: remove useless proxy method
* test: add a couple of e2e tests that verify both typing and runtime
* test: improve e2e tests
* test: add missing mutation flag
* regenerate test schema
* refactor: procedure params generation fix and type refactors
- Simplified procedure's params definition from a tuple an object, since procs are now called with an envelop now
- Refactored procedure related typing to make them more consistent with other CURD types (that usually takes the schema as the first type parameter, and a name as the second)
- Moved detailed procedure's types to "crud-types" where other ORM client detailed types are defined
- Removed some type duplication from hooks side
- Updated the "orm" sample to demonstrate procedures
* fix: disable infinite custom proc queries for now
---------
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-01-08 11:21:51 +08:00
github-actions[bot]
20f07770b3
chore: bump version 3.2.0 ( #561 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2026-01-05 16:57:58 +08:00
Yiming Cao
97ec4afdbf
fix: minor fixes addressing AI comments ( #552 )
2025-12-30 20:49:09 +08:00
github-actions[bot]
f13886bb16
chore: bump version 3.1.0 ( #539 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2025-12-28 12:50:52 +08:00
Yiming Cao
fe731f726a
refactor: extract client-helpers package, update svelte-query to v6 ( #535 )
2025-12-27 22:49:19 +08:00
Yiming Cao
b0178a5893
chore: bump version 3.0.0 ( #522 )
...
* chore: bump version 3.0.0
* update
* update README
* update
2025-12-24 16:48:58 +08:00
github-actions[bot]
a0f3a6ee81
chore: bump version 3.0.0-beta.34 ( #520 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2025-12-18 22:39:33 +08:00
github-actions[bot]
3c85772255
chore: bump version 3.0.0-beta.33 ( #516 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2025-12-18 21:00:14 +08:00
Yiming Cao
b240164d27
chore: bump next.js version ( #513 )
2025-12-18 08:56:46 +08:00
github-actions[bot]
ea66833584
chore: bump version 3.0.0-beta.32 ( #507 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2025-12-16 21:32:11 +08:00
github-actions[bot]
3e0571e5fc
chore: bump version 3.0.0-beta.31 ( #495 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2025-12-14 14:28:05 +08:00
github-actions[bot]
4417d20261
chore: bump version 3.0.0-beta.30 ( #487 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2025-12-13 21:39:57 +08:00
Yiming Cao
ac4a68cd5d
refactor(orm): simplify model results typing ( #485 )
...
* refactor(orm): simplify model results typing
* add missing dev dependency
* update
* update
* update
2025-12-13 16:59:03 +08:00
github-actions[bot]
7e0216082f
chore: bump version 3.0.0-beta.29 ( #483 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2025-12-13 14:28:41 +08:00
Yiming Cao
96629ed817
fix(type-check): try improving type checking performance ( #475 )
...
* fix(type-check): try improving type checking performance
* update
* update
* update
* revert to ZenStackPromise
* update promise
2025-12-12 14:30:05 +08:00
github-actions[bot]
bf52d5dda5
chore: bump version 3.0.0-beta.28 ( #474 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2025-12-09 22:56:07 +08:00
dependabot[bot]
e7cbdfe459
chore(deps): bump next from 16.0.1 to 16.0.7
...
Bumps [next](https://github.com/vercel/next.js ) from 16.0.1 to 16.0.7.
- [Release notes](https://github.com/vercel/next.js/releases )
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js )
- [Commits](https://github.com/vercel/next.js/compare/v16.0.1...v16.0.7 )
---
updated-dependencies:
- dependency-name: next
dependency-version: 16.0.7
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
2025-12-04 12:40:21 +00:00
github-actions[bot]
09dabd8387
chore: bump version 3.0.0-beta.27 ( #455 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2025-12-01 15:08:01 +08:00
Yiming Cao
2d740f12e6
feat(orm): implement field omission ( #441 )
...
* feat: implement field omission
* Update tests/e2e/orm/client-api/omit.test.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix build
* fix build
* fix build
* update sample
* fix tests
* update
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-27 09:50:46 +08:00
github-actions[bot]
a4a1162705
chore: bump version 3.0.0-beta.26 ( #442 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2025-11-27 08:09:03 +08:00
github-actions[bot]
9e2ea60a55
chore: bump version 3.0.0-beta.25 ( #434 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2025-11-19 22:27:32 -08:00
github-actions[bot]
e8f979067c
chore: bump version 3.0.0-beta.24 ( #418 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2025-11-17 19:24:38 -08:00
Yiming Cao
ed931da78c
fix(orm): reimplement typescript type display simplification ( #405 )
...
* fix(orm): reimplement typescript type display simplification
* update
2025-11-14 22:44:29 -08:00
github-actions[bot]
769473cb4f
chore: bump version 3.0.0-beta.23 ( #404 )
2025-11-14 16:47:12 -08:00
github-actions[bot]
aa34372ebf
chore: bump version 3.0.0-beta.22 ( #397 )
...
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
2025-11-13 11:57:23 -08:00