Repository navigation
chore(deps): require @bquery/bquery ^1.18.0 - #2
Conversation
bQuery 1.18.0 compiles bq-on handlers with several `;`-separated
statements: compileViews() returns { expressions, statements, stats } and
emitModule() passes the statement map as the second argument of
registerCompiledExpressions(). The plugin hands the whole compile result
to emitModule(), so it needed no code change; with 1.18 as the floor the
"1.17.2 leaves them to the runtime evaluator and warns" case no longer
exists for supported versions.
- Peer and dev dependency ^1.17.2 -> ^1.18.0 (package is unreleased, so
its first release can require 1.18); bun.lock updated.
- README and CHANGELOG drop the 1.17.2 caveat.
- The version-tolerant unit test is replaced by one that runs the emitted
module against a stub registry and checks that the handler lands in the
statements map and runs both statements in order (fails on 1.17.2), plus
one for a statement list outside bq-on falling back to the runtime.
- The SSR dev-server test asserts the doctype of a full-page template
rendered with renderToResponse(), which bQuery keeps since 1.18.
The SSR middleware only renders GET/HEAD navigations and never forwards a
request body, so 1.18's body limits and single-read ctx.body() do not
affect it; the file-route, i18n extract and generateNonce APIs the plugin
uses are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Ju3jbgag99iuxndoJTrgM
bQuery's SSR renderers drop every <script> from the template, including the client entry of index.html. The README now shows how to add it with ssr.head.add(), which injects it once with the CSP nonce. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018Ju3jbgag99iuxndoJTrgM
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Summary
@bquery/bqueryfrom^1.17.2to^1.18.0, both as peer and dev dependency, and refreshesbun.lock. The plugin is not published yet, so its first release can require 1.18.src/views.jsalready passes the full compiler result toemitModule(), so the 1.18 statements map forbq-onis forwarded.bq-onhandlers compile like single expressions, so the 1.17.2 "runtime evaluator and warns" caveat is gone.<script>from the template, includingindex.html's<script type="module" src="/src/main.ts">. Users now add it withssr.head.add({ script: [{ src, module: true }] }), which injects it once and with the CSP nonce. I checked this against the Vite dev middleware.registerCompiledExpressions. The two statements must land in the statements map, run in order, and return the last value. It fails against 1.17.2.bq-onis still left to the runtime evaluator.<!doctype html>, since 1.18 keeps the doctype of full-page templates.Checked against 1.18
GET/HEADpage loads with no request body. The new body limits and single-readctx.body()do not apply.createSSRContext,renderToResponseand the CSP nonce work as before.generateNonce: the declarations the plugin uses are unchanged.Validation
bun run check(typecheck, lint, format, tests): 56 pass, 0 fail.bun install --frozen-lockfileandnpm pack --dry-run: both succeed (23 files).Generated by Claude Code
Summary by CodeRabbit
bq-onhandlers are compiled and run in order when using bQuery 1.18.0 or later.