Skip to content

Improve generated query parameter docs#115

Merged
mmkal merged 4 commits into
mainfrom
bedtime/2026-05-14-improve-docs
May 15, 2026
Merged

Improve generated query parameter docs#115
mmkal merged 4 commits into
mainfrom
bedtime/2026-05-14-improve-docs

Conversation

@mmkal
Copy link
Copy Markdown
Collaborator

@mmkal mmkal commented May 14, 2026

Summary

  • Clarifies generated query parameter forms in packages/sqlfu/docs/typegen.md after the recent parameter-expansion and casing work.
  • Separates authored top-level placeholder names from generated object member fields: :post stays post, while object fields like published_at become publishedAt under the default generate.casing: 'camel' boundary.
  • Documents prepared-statement named binding in packages/sqlfu/docs/adapters.md: SQL may use :slug, @slug, or $slug, while callers pass bare object keys like {slug}.
  • Updates a stale sqlite-wasm binding comment in packages/sqlfu/src/sqlite-text.ts so the source agrees with the adapter docs.
  • Keeps the evergreen docs-pass notes in tasks/improve-docs.md and leaves the task open.

User effect

A reader deciding how to write query params now gets the contract in the docs they are already reading: generated wrappers use :name, top-level placeholder names are preserved, object member fields follow casing rules, runtime-expanded arrays must be non-empty and appear once, and sqlite-wasm prepared statements bind the same bare-key shape as the other adapters.

Verification

  • pnpm install
  • pnpm --dir packages/sqlfu exec vitest run test/generate/query-parameters.test.ts
  • pnpm --filter @sqlfu/ui build
  • pnpm --filter sqlfu-website build
  • pnpm --filter sqlfu test --run test/generate/query-parameters.test.ts
  • git diff --check

Note: an initial mis-scoped pnpm --filter sqlfu test:node -- test/generate/query-parameters.test.ts invocation ran the full sqlfu suite and hit existing non-doc failures in resolve-sqlfu-ui / strict imports. The focused test commands above passed.

Package size — packed 236.5 kB (+91 B, 0)

Package size

main this PR Δ
packed 236.5 kB 236.5 kB 0
unpacked 971.3 kB 971.5 kB 0
files 181 181 0

dist/vendor/*.js bundles

main this PR Δ
vendor/sha256.js 4.3 kB 4.3 kB 0
vendor/sql-formatter/*.js 58.3 kB 58.3 kB 0
vendor/sqlfu-sqlite-parser/*.js 17.2 kB 17.2 kB 0
vendor/standard-schema/*.js 2.8 kB 2.8 kB 0
vendor/typesql/*.js 134.6 kB 134.6 kB 0

Measured with npm pack --dry-run --json on sqlfu (0.0.3-7 on main vs 0.0.3-7 on this PR).

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 14, 2026

Open in StackBlitz

npm i https://pkg.pr.new/sqlfu@115

commit: b643945

@mmkal mmkal merged commit 1414d8c into main May 15, 2026
8 checks passed
@mmkal mmkal mentioned this pull request May 15, 2026
5 tasks
mmkal added a commit that referenced this pull request May 16, 2026
## Summary

Finish the 2026-05-15 cleanup pass for stale task files and local
worktrees.

- records that merged PRs #115 and #116 are evergreen logs, so no task
files moved
- removes eight clean local worktrees for merged, closed, or stale
compare branches
- leaves open, dirty, or ambiguous worktrees alone and documents why

## Cleanup result

Removed local worktrees only, preserving branches:

- `bedtime-2026-05-14-cleanup-tasks`
- `bedtime-2026-05-14-improve-docs`
- `bedtime-evergreen-2026-05-12`
- `typebox-validator`
- `query-identity-refresh-pr-115`
- `query-identity-refresh-pr-116`
- `improve-codebase-architecture-2026-05-14-pr-101`
- `improve-codebase-architecture-2026-05-14-pr-108`

## Test plan

- [x] task-only first commit
- [x] `gh pr list --state all --limit 35 --json
number,title,headRefName,baseRefName,state,mergedAt,closedAt,url`
- [x] `find tasks -maxdepth 1 -type f -name '*.md' -print | sort`
- [x] `git worktree list --porcelain`
- [x] `git status --short`

<!-- package-size:start -->
<details>
<summary>Package size — packed 236.5 kB (no change)</summary>

## Package size

|  | main | this PR | Δ |
| - | - | - | - |
| packed | 236.5 kB | 236.5 kB | 0 |
| unpacked | 971.5 kB | 971.5 kB | 0 |
| files | 181 | 181 | 0 |

### `dist/vendor/*.js` bundles

|  | main | this PR | Δ |
| - | - | - | - |
| `vendor/sha256.js` | 4.3 kB | 4.3 kB | 0 |
| `vendor/sql-formatter/*.js` | 58.3 kB | 58.3 kB | 0 |
| `vendor/sqlfu-sqlite-parser/*.js` | 17.2 kB | 17.2 kB | 0 |
| `vendor/standard-schema/*.js` | 2.8 kB | 2.8 kB | 0 |
| `vendor/typesql/*.js` | 134.6 kB | 134.6 kB | 0 |

_Measured with `npm pack --dry-run --json` on `sqlfu` (0.0.3-7 on main
vs 0.0.3-7 on this PR)._

</details>
<!-- package-size:end -->

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk documentation-only change that updates task tracking notes;
no product code or runtime behavior is affected.
> 
> **Overview**
> Updates `tasks/cleanup-tasks.md` with a new **2026-05-15 cleanup
pass** entry, including an updated status summary, scope/checklist, and
implementation notes.
> 
> Records that PRs `#115`/`#116` remain evergreen (so no task files were
moved) and documents removal of eight *clean* local worktrees while
explicitly leaving open/dirty/ambiguous worktrees untouched.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
f0f37b8. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant