Commit graph

37 commits

Author SHA1 Message Date
Yiming Cao
9cef0272e7
chore: upgrade to TypeScript 6 (#2629) 2026-04-29 20:41:27 -07:00
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 <[email protected]>
2026-03-12 19:51:43 -07: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
209312a27b
fix(orm): properly handle literal array values in policy evaluation for postgres (#628) 2026-01-29 00:15:07 +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 <[email protected]>
2026-01-08 16:12:14 +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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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] <[email protected]>
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 <[email protected]>
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 <[email protected]>

* fix build

* fix build

* fix build

* update sample

* fix tests

* update

---------

Co-authored-by: Copilot <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
2025-11-13 11:57:23 -08:00
github-actions[bot]
267f98df1d
chore: bump version 3.0.0-beta.21 (#388) 2025-11-09 20:54:31 -08:00
github-actions[bot]
e37a6cfa2d
chore: bump version 3.0.0-beta.20 (#381)
Co-authored-by: ymc9 <[email protected]>
2025-11-08 12:45:38 -08:00
Yiming Cao
50ec1be7d6
fix(orm): update to kysely 0.28.x and simplify typing (#380)
* fix(orm): update to kysely 0.28.x and simplify typing

* fix deprecation warning

* fix `orderBy` deprecation

* fix tests
2025-11-08 10:19:14 -08:00
github-actions[bot]
56acc1cd5e
chore: bump version 3.0.0-beta.19 (#374)
Co-authored-by: ymc9 <[email protected]>
2025-11-05 21:50:22 -08:00
github-actions[bot]
218f44ea5e
chore: bump version 3.0.0-beta.18 (#367)
Co-authored-by: ymc9 <[email protected]>
2025-11-04 21:53:49 -08:00
github-actions[bot]
7cdda90deb
chore: bump version 3.0.0-beta.17 (#363)
Co-authored-by: ymc9 <[email protected]>
2025-11-04 12:56:44 -08:00
github-actions[bot]
7839d5f0c4
chore: bump version 3.0.0-beta.16 (#358)
Co-authored-by: ymc9 <[email protected]>
2025-11-03 09:33:12 -08:00
Yiming Cao
170535a6f9
feat(schema): add option for generating lite schema (#357)
* feat(schema): add option for generating lite schema

* fix --lite-only option and add CLI test
2025-11-03 09:25:23 -08:00
Yiming Cao
e919bb0199
feat(tanstack-query): new implementation of tanstack-query react hooks (#356)
* WIP

* feat: tanstack-query/react CRUD hooks implementation

* fix build

* addressing PR comments

* update

* update

* migrate tests

* update

* fix test environment

* use happy-dom instead of jsdom
2025-11-02 23:14:11 -08:00