Skip to content

chore(deps): require @bquery/bquery ^1.18.0 - #2

Merged
JosunLP merged 2 commits into
mainfrom
ccr-cc6438bb-3z15bo
Oct 23, 2026
Merged

JosunLP merged 2 commits into
mainfrom
ccr-cc6438bb-3z15bo

Conversation

@JosunLP

@JosunLP JosunLP commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Updates @bquery/bquery from ^1.17.2 to ^1.18.0, both as peer and dev dependency, and refreshes bun.lock. The plugin is not published yet, so its first release can require 1.18.
  • No source changes were needed. src/views.js already passes the full compiler result to emitModule(), so the 1.18 statements map for bq-on is forwarded.
  • README:
    • Compatibility now says 1.18.0 or later. Multi-statement bq-on handlers compile like single expressions, so the 1.17.2 "runtime evaluator and warns" caveat is gone.
    • New: how to add the client entry. bQuery's SSR renderers drop every <script> from the template, including index.html's <script type="module" src="/src/main.ts">. Users now add it with ssr.head.add({ script: [{ src, module: true }] }), which injects it once and with the CSP nonce. I checked this against the Vite dev middleware.
  • Tests:
    • A new test, "compiles bq-on statement lists into the statements map", runs the emitted module against a fake registerCompiledExpressions. The two statements must land in the statements map, run in order, and return the last value. It fails against 1.17.2.
    • Another test checks that a statement list outside bq-on is still left to the runtime evaluator.
    • The Vite SSR test now expects <!doctype html>, since 1.18 keeps the doctype of full-page templates.
  • CHANGELOG: updated.

Checked against 1.18

  • SSR dev middleware: only renders GET/HEAD page loads with no request body. The new body limits and single-read ctx.body() do not apply. createSSRContext, renderToResponse and the CSP nonce work as before.
  • File routes, i18n extract and generateNonce: the declarations the plugin uses are unchanged.

Validation

  • bun run check (typecheck, lint, format, tests): 56 pass, 0 fail.
  • bun install --frozen-lockfile and npm pack --dry-run: both succeed (23 files).

Generated by Claude Code

Summary by CodeRabbit

  • New Features
    • Multi-statement bq-on handlers are compiled and run in order when using bQuery 1.18.0 or later.
    • Server-rendered full-page HTML retains its doctype.
  • Documentation
    • Updated the minimum supported bQuery version to 1.18.0.
    • Clarified that SSR removes template scripts, and documented how to add the client entry through the SSR context for injection with the CSP nonce.

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
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7bd1d872-cad5-4631-af7f-95007075c1cd
📥 Commits

Reviewing files that changed from the base of the PR and between 0de4aff and c061124.

⛔ Files ignored due to path filters: 1
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing: 5
  • CHANGELOG.md
  • README.md
  • package.json
  • test/unit.test.ts
  • test/vite.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The plugin’s minimum @bquery/bquery version is now 1.18.0. Documentation and tests describe multi-statement bq-on compilation and SSR handling of template scripts and full-page doctypes.

Changes: bQuery 1.18 compatibility

Layer / File(s) Summary
Dependency and compiler compatibility
package.json, README.md, test/unit.test.ts, CHANGELOG.md
The peer and development dependency minimum is now ^1.18.0. Compatibility documentation describes multi-statement bq-on compilation. Unit tests check statement order, the returned value, template retention, and skipped statement lists outside bq-on.
SSR script and doctype behavior
README.md, test/vite.test.ts
The README explains how to register the client entry through the SSR context for injection with the CSP nonce. The Vite test checks that rendered full-page HTML starts with a doctype.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Other

Suggested reviewers: claude

Merge Risk: ⚪ Minimal · up to c0611

The compatibility update is mergeable on the supplied evidence, subject to the normal release check that the required bQuery version is publicly available.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "chore(deps): require @bquery/bquery ^1.18.0" matches the main change. The PR raises the @bquery/bquery peer and dev dependency from ^1.17.2 to ^1.18.0 in package.json, and the README and CH…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "chore(deps): require @bquery/bquery ^1.18.0" matches the main change. The PR raises the @bquery/bquery peer and dev dependency from ^1.17.2 to ^1.18.0 in package.json, and the README and CHANGELOG are updated for the new minimum. The title is short, specific, and states the primary change. The supporting test, doc, and SSR changes are secondary and do not need to appear in the title.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files. (3 skipped: 3 unsupported.)

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JosunLP
JosunLP marked this pull request as ready for review October 23, 2026 12:17
@JosunLP
JosunLP merged commit 00be90d into main Oct 23, 2026
3 checks passed
@JosunLP
JosunLP deleted the ccr-cc6438bb-3z15bo branch October 23, 2026 12:22
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.

2 participants