Skip to content

Sync full bundle with module barrels and enhance WebSocket support - #92

Merged
JosunLP merged 16 commits into
devfrom
feature/improvement
May 16, 2026
Merged

Sync full bundle with module barrels and enhance WebSocket support#92
JosunLP merged 16 commits into
devfrom
feature/improvement

Conversation

@JosunLP

@JosunLP JosunLP commented May 16, 2026

Copy link
Copy Markdown
Collaborator

Add the missing core utility named exports (debounce, throttle, clone, merge, isArray, ...) plus DebouncedFn/ThrottledFn types and view.clearExpressionCache to the CDN/full bundle so it matches src/index.ts and the module barrels.

Introduce scripts/check-full-bundle.mjs and a bun run check:full-bundle script that imports every documented public module barrel and verifies every runtime export is re-exported from src/full.ts (with explicit allow-list for the documented a11y.prefersReducedMotion vs motion.prefersReducedMotion naming clash).Add the missing core utility named exports (debounce, throttle, clone, merge, isArray, ...) plus DebouncedFn/ThrottledFn types and view.clearExpressionCache to the CDN/full bundle so it matches src/index.ts and the module barrels.

Introduce scripts/check-full-bundle.mjs and a bun run check:full-bundle script that imports every documented public module barrel and verifies every runtime export is re-exported from src/full.ts (with explicit allow-list for the documented a11y.prefersReducedMotion vs motion.prefersReducedMotion naming clash).
This pull request updates the project to version 1.12.0 and introduces several new public APIs and improvements, especially around store plugin management, WebSocket type exports, and bundle/type export validation. Documentation and guidance files are also updated to reflect these changes and to ensure consistency across the project.

Key changes:

New Public APIs and Type Exports

  • Added unregisterPlugin() and clearPlugins() to @bquery/bquery/store for plugin teardown, test isolation, and runtime plugin reloads. (F82d88d1L77R77, [1] [2] [3] [4] [5]
  • Promoted WebSocketSendData to a public type export from @bquery/bquery/reactive for use with raw WebSocket frames and serializers. (F82d88d1L77R77, [1] [2] [3] [4] [5] [6]

Tooling and Validation

  • The /full bundle now re-exports all public type-only module exports from platform, a11y, and media barrels. bun run check:full-bundle statically validates runtime and type export drift before release. (F82d88d1L77R77, [1] [2] [3]

Documentation and Guidance

  • Updated all version references and highlights in documentation files to 1.12.0, including README.md, AGENT.md, .clinerules, .cursorrules, and .github/copilot-instructions.md. [1] [2] [3] [4] [5] [6] [7]
  • Expanded server and SSR documentation with clearer public API references and usage notes. (F82d88d1L77R77, AGENT.mdL43-R48)

Changelog and Release Metadata

  • Added a new changelog section for 1.12.0, detailing added, changed, and fixed items, and introduced an "Unreleased" section for future updates. [1] [2]

These updates improve the developer experience by making plugin management more robust, ensuring type safety and consistency, and keeping documentation aligned with the evolving public API surface.

JosunLP added 3 commits May 16, 2026 13:23
Add the missing core utility named exports (debounce, throttle, clone, merge, isArray, ...) plus DebouncedFn/ThrottledFn types and view.clearExpressionCache to the CDN/full bundle so it matches src/index.ts and the module barrels.

Introduce scripts/check-full-bundle.mjs and a bun run check:full-bundle script that imports every documented public module barrel and verifies every runtime export is re-exported from src/full.ts (with explicit allow-list for the documented a11y.prefersReducedMotion vs motion.prefersReducedMotion naming clash).
- Added WebSocketSendData type to support various payloads for WebSocket.send().
- Introduced new configurations for Bquery, including BqueryAnnouncerConfig, BqueryComponentLibraryConfig, and others.
- Enhanced store plugin functionality with clearPlugins and unregisterPlugin methods.
- Implemented tests for new features and ensured existing functionality remains intact.
- Improved utility functions for array, number, and string manipulations.
- Added tests for trusted types policy and cache storage API fallbacks.
- Updated package version to 1.12.0 in package.json and llms.txt.
- Added new SSR utilities and improved existing SSR context handling.
- Enhanced server capabilities with new WebSocket route handling.
- Improved code formatting and consistency across various files.
- Added tests for new server module exports and SSR hydration strategies.
- Updated documentation to reflect new features and changes.
Copilot AI review requested due to automatic review settings May 16, 2026 12:49
@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3c5efe05-5e7c-4945-9878-fa92efdc308f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/improvement

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 and usage tips.

@github-actions github-actions Bot added reactive Changes to the reactive module store Changes to the store module docs Changes to the documentation tests Chenges to the tests build Changes to the build and meta files github Changes to the github meta data files ssr Changes to the ssr module server labels May 16, 2026
@JosunLP

JosunLP commented May 16, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot the tests are failing

Copilot AI commented May 16, 2026

Copy link
Copy Markdown
Contributor

@copilot the tests are failing

Fixed in a0f503c. I reproduced the failing CI bun run test:types, updated the new store plugin tests to avoid unsupported 4-generic createStore usage, and verified with bun run test:types, bun test tests/store.test.ts, bun test, and bun run lint.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates bQuery.js to v1.12.0, expands the public API around store plugin lifecycle + reactive WebSocket typing, and synchronizes the /full (CDN) bundle with the module barrels by adding a new static export-drift guard.

Changes:

  • Add store plugin teardown APIs (unregisterPlugin(), clearPlugins()) and tests/docs for plugin lifecycle.
  • Promote WebSocketSendData to a public reactive type export and propagate it through barrels + /full.
  • Expand src/full.ts re-exports and introduce bun run check:full-bundle to prevent runtime/type export drift; bump docs/guidance/changelog accordingly.

Reviewed changes

Copilot reviewed 36 out of 38 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/utils.test.ts Adds tests for new/expanded core utility helpers.
tests/store.test.ts Adds coverage for new store plugin lifecycle APIs and store utils.
tests/ssr-runtime.test.ts Formatting-only updates to SSR runtime tests (readability).
tests/ssr-followup.test.ts Formatting-only updates to hydration mismatch tests (readability).
tests/server.test.ts Adds export-surface tests for server (barrel, root index, full bundle).
tests/security.test.ts Adds Trusted Types fallback/robustness tests.
tests/platform.test.ts Adds cache API fallback + delegation tests.
tests/network.test.ts Adds compile-time coverage for WebSocketSendData and minor import ordering.
tests/motion.test.ts Adds additional easing/keyframe preset behavioral tests.
tests/check-full-bundle.test.ts Adds tests for the new full-bundle export drift checker script.
src/store/plugins.ts Introduces unregisterPlugin() and clearPlugins() to manage plugin lifecycle.
src/store/index.ts Re-exports new plugin lifecycle APIs from the store barrel.
src/ssr/suspense.ts Formatting-only refactor (no behavior change).
src/ssr/renderer.ts Formatting-only refactor (no behavior change).
src/ssr/context.ts Formatting-only refactor (no behavior change).
src/server/types.ts Formatting-only signature reflow (no behavior change).
src/server/create-server.ts Formatting-only refactor (no behavior change).
src/reactive/websocket.ts Promotes WebSocketSendData from internal to public type export with docs.
src/reactive/signal.ts Re-exports WebSocketSendData through the reactive signal barrel.
src/reactive/index.ts Ensures the top-level reactive barrel re-exports the updated type surface.
src/full.ts Synchronizes /full runtime + type exports with module barrels (core utils, store plugin APIs, view cache helper, reactive websocket type).
scripts/check-full-bundle.mjs Adds static validation for /full runtime + type export drift vs. module barrels.
README.md Updates highlights and examples for 1.12.0 + new APIs/checks.
package.json Bumps version to 1.12.0; adds check:full-bundle; updates dev deps.
llms.txt Updates version + highlights and notes new exports/tooling.
docs/guide/store.md Documents plugin removal (unregisterPlugin, clearPlugins).
docs/guide/ssr.md Expands/clarifies SSR public-surface import list + examples formatting.
docs/guide/server.md Adds a “Public surface” section and expands middleware/WebSocket guidance.
docs/guide/reactive.md Documents sendRaw payload type and WebSocketSendData.
docs/guide/getting-started.md Minor formatting updates (browser support table).
docs/definition.md Minor formatting updates (examples + browser support table).
CONTRIBUTING.md Updates contributor guidance to run check:full-bundle when exports change.
CHANGELOG.md Adds Unreleased section; adds 1.12.0 entry; adjusts 1.11.0 date.
bun.lock Updates lockfile for dev dependency version bumps.
AGENT.md Updates version + highlights to 1.12.0.
.github/copilot-instructions.md Updates version baseline + highlights to 1.12.0.
.cursorrules Updates version baseline + notes new APIs/tooling.
.clinerules Updates version baseline + notes new APIs/tooling.

Comment thread src/store/plugins.ts
Comment thread scripts/check-full-bundle.mjs Outdated
@JosunLP

JosunLP commented May 16, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot apply changes based on the comments in this thread

Copilot AI review requested due to automatic review settings May 16, 2026 13:37
@JosunLP
JosunLP removed the request for review from Copilot May 16, 2026 13:37
Copilot AI review requested due to automatic review settings May 16, 2026 13:38
@JosunLP
JosunLP removed the request for review from Copilot May 16, 2026 13:39
Copilot AI review requested due to automatic review settings May 16, 2026 17:37
@JosunLP
JosunLP removed the request for review from Copilot May 16, 2026 17:37
Copilot AI review requested due to automatic review settings May 16, 2026 17:39
@JosunLP
JosunLP removed the request for review from Copilot May 16, 2026 17:39
Copilot AI review requested due to automatic review settings May 16, 2026 17:40
@JosunLP
JosunLP removed the request for review from Copilot May 16, 2026 17:40
Copilot AI review requested due to automatic review settings May 16, 2026 17:40
@JosunLP
JosunLP removed the request for review from Copilot May 16, 2026 17:40
Copilot AI review requested due to automatic review settings May 16, 2026 17:41
@JosunLP
JosunLP removed the request for review from Copilot May 16, 2026 17:41

Copilot AI commented May 16, 2026

Copy link
Copy Markdown
Contributor

@copilot apply changes based on the comments in this thread

Applied in 95d4ba3 (main collision-handling change in c1fcd48). check-full-bundle now matches exports by normalized source module, so real cross-module name collisions are caught while legitimate pass-through re-exports like view -> reactive still pass. I added focused coverage for collision handling, pass-through re-exports, the documented a11y/motion omission, and re-ran bun run check:full-bundle, bun test tests/check-full-bundle.test.ts, bun run test:types, bun test, and bun run lint.

@JosunLP

JosunLP commented May 16, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot the tests are failing

Copilot AI review requested due to automatic review settings May 16, 2026 17:58
@JosunLP
JosunLP removed the request for review from Copilot May 16, 2026 17:58

Copilot AI commented May 16, 2026

Copy link
Copy Markdown
Contributor

@copilot the tests are failing

Fixed in 8a33f7e. The failing CI test was versioned store snapshots > renderToStringAsync reuses one serialized store snapshot for storeState and HTML; it was brittle because it serialized all registered stores. I scoped the fixture to includeStoreState: ['counter'] so the assertion is deterministic, then re-ran bun test tests/ssr-followup.test.ts -t "renderToStringAsync reuses one serialized store snapshot for storeState and HTML", bun test tests/ssr-followup.test.ts, bun test, and bun run lint.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 36 out of 38 changed files in this pull request and generated no new comments.

@JosunLP
JosunLP merged commit 3733fb8 into dev May 16, 2026
12 checks passed
@JosunLP
JosunLP deleted the feature/improvement branch May 16, 2026 18:20
JosunLP added a commit that referenced this pull request May 16, 2026
* chore(tooling): sync src/full.ts with module barrels and add drift audit

Add the missing core utility named exports (debounce, throttle, clone, merge, isArray, ...) plus DebouncedFn/ThrottledFn types and view.clearExpressionCache to the CDN/full bundle so it matches src/index.ts and the module barrels.

Introduce scripts/check-full-bundle.mjs and a bun run check:full-bundle script that imports every documented public module barrel and verifies every runtime export is re-exported from src/full.ts (with explicit allow-list for the documented a11y.prefersReducedMotion vs motion.prefersReducedMotion naming clash).

* feat: enhance WebSocket support and add new types

- Added WebSocketSendData type to support various payloads for WebSocket.send().
- Introduced new configurations for Bquery, including BqueryAnnouncerConfig, BqueryComponentLibraryConfig, and others.
- Enhanced store plugin functionality with clearPlugins and unregisterPlugin methods.
- Implemented tests for new features and ensured existing functionality remains intact.
- Improved utility functions for array, number, and string manipulations.
- Added tests for trusted types policy and cache storage API fallbacks.

* chore: update version to 1.12.0 and enhance SSR features

- Updated package version to 1.12.0 in package.json and llms.txt.
- Added new SSR utilities and improved existing SSR context handling.
- Enhanced server capabilities with new WebSocket route handling.
- Improved code formatting and consistency across various files.
- Added tests for new server module exports and SSR hydration strategies.
- Updated documentation to reflect new features and changes.

* test(store): fix plugin extension typings in store tests

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/860e1510-72e8-4438-afa7-945df800e5cc

Co-authored-by: JosunLP <[email protected]>

* test(store): clarify plugin-augmented store variable names

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/860e1510-72e8-4438-afa7-945df800e5cc

Co-authored-by: JosunLP <[email protected]>

* fix(store): stabilize plugin application and full bundle audit

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/34646686-5591-411b-bc7d-b368464f14ff

Co-authored-by: JosunLP <[email protected]>

* fix(tooling): avoid unreachable returns in bundle audit main

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/34646686-5591-411b-bc7d-b368464f14ff

Co-authored-by: JosunLP <[email protected]>

* refactor(tooling): simplify full bundle audit test typing

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/34646686-5591-411b-bc7d-b368464f14ff

Co-authored-by: JosunLP <[email protected]>

* fix(tooling): resolve bundle audit entrypoint paths

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/02749e9f-0dce-48ba-b0e0-e56c0e32e389

Co-authored-by: JosunLP <[email protected]>

* fix(tooling): detect bundle export collisions by source

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3ca84fe4-a03b-4cd3-9cec-0e5e06964f08

Co-authored-by: JosunLP <[email protected]>

* refactor(tooling): clarify full bundle audit typing

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3ca84fe4-a03b-4cd3-9cec-0e5e06964f08

Co-authored-by: JosunLP <[email protected]>

* docs(tooling): document full bundle source normalization

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3ca84fe4-a03b-4cd3-9cec-0e5e06964f08

Co-authored-by: JosunLP <[email protected]>

* fix(tooling): harden unknown export source fallback

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3ca84fe4-a03b-4cd3-9cec-0e5e06964f08

Co-authored-by: JosunLP <[email protected]>

* fix(tooling): throw on unresolved export source

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3ca84fe4-a03b-4cd3-9cec-0e5e06964f08

Co-authored-by: JosunLP <[email protected]>

* refactor(tooling): clarify source normalization errors

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3ca84fe4-a03b-4cd3-9cec-0e5e06964f08

Co-authored-by: JosunLP <[email protected]>

* test(ssr): scope async store snapshot fixture

Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/bdbd1584-da20-4197-afce-e4e4363c5cd6

Co-authored-by: JosunLP <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Changes to the build and meta files docs Changes to the documentation github Changes to the github meta data files reactive Changes to the reactive module server ssr Changes to the ssr module store Changes to the store module tests Chenges to the tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants