Sync full bundle with module barrels and enhance WebSocket support - #92
Conversation
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.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
|
@copilot the tests are failing |
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/860e1510-72e8-4438-afa7-945df800e5cc Co-authored-by: JosunLP <[email protected]>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/860e1510-72e8-4438-afa7-945df800e5cc Co-authored-by: JosunLP <[email protected]>
There was a problem hiding this comment.
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
WebSocketSendDatato a public reactive type export and propagate it through barrels +/full. - Expand
src/full.tsre-exports and introducebun run check:full-bundleto 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. |
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/34646686-5591-411b-bc7d-b368464f14ff Co-authored-by: JosunLP <[email protected]>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/34646686-5591-411b-bc7d-b368464f14ff Co-authored-by: JosunLP <[email protected]>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/34646686-5591-411b-bc7d-b368464f14ff Co-authored-by: JosunLP <[email protected]>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3ca84fe4-a03b-4cd3-9cec-0e5e06964f08 Co-authored-by: JosunLP <[email protected]>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3ca84fe4-a03b-4cd3-9cec-0e5e06964f08 Co-authored-by: JosunLP <[email protected]>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3ca84fe4-a03b-4cd3-9cec-0e5e06964f08 Co-authored-by: JosunLP <[email protected]>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3ca84fe4-a03b-4cd3-9cec-0e5e06964f08 Co-authored-by: JosunLP <[email protected]>
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3ca84fe4-a03b-4cd3-9cec-0e5e06964f08 Co-authored-by: JosunLP <[email protected]>
Applied in 95d4ba3 (main collision-handling change in c1fcd48). |
|
@copilot the tests are failing |
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/bdbd1584-da20-4197-afce-e4e4363c5cd6 Co-authored-by: JosunLP <[email protected]>
Fixed in 8a33f7e. The failing CI test was |
* 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]>
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
unregisterPlugin()andclearPlugins()to@bquery/bquery/storefor plugin teardown, test isolation, and runtime plugin reloads. (F82d88d1L77R77, [1] [2] [3] [4] [5]WebSocketSendDatato a public type export from@bquery/bquery/reactivefor use with raw WebSocket frames and serializers. (F82d88d1L77R77, [1] [2] [3] [4] [5] [6]Tooling and Validation
/fullbundle now re-exports all public type-only module exports from platform, a11y, and media barrels.bun run check:full-bundlestatically validates runtime and type export drift before release. (F82d88d1L77R77, [1] [2] [3]Documentation and Guidance
README.md,AGENT.md,.clinerules,.cursorrules, and.github/copilot-instructions.md. [1] [2] [3] [4] [5] [6] [7]Changelog and Release Metadata
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.