Conversation
There was a problem hiding this comment.
Pull request overview
This PR bumps bQuery.js to v1.7.0 and expands the library’s public surface area with multiple new first-class modules, while updating documentation and CI to match the new architecture and workflows.
Changes:
- Adds new runtime modules/entry points (SSR, testing, plugin, devtools, media, dnd, forms, i18n, a11y) and wires them into exports.
- Extends existing core/router/store/reactive/component APIs (e.g., router param constraints, store
$onAction, computed disposal, custom directives). - Updates docs, changelog, package exports, and CI (adds test type-check step).
Reviewed changes
Copilot reviewed 123 out of 145 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/view/process.ts | Adds custom directive resolution hook into the view processing pipeline. |
| src/view/evaluate.ts | Hardens object-expression parsing against prototype pollution keys. |
| src/view/custom-directives.ts | New indirection layer for plugin-registered custom directives. |
| src/testing/types.ts | Adds public type definitions for the new testing utilities module. |
| src/testing/index.ts | Exposes testing utilities runtime API and related types. |
| src/store/watch.ts | Loosens action typing to support strongly-typed params/returns. |
| src/store/utils.ts | Adds explicit boolean annotation for isDev. |
| src/store/types.ts | Adds action lifecycle types, persisted-store options types, storage/serializer types, and $onAction. |
| src/store/mapping.ts | Loosens action typing for action-mapping helpers. |
| src/store/index.ts | Re-exports newly added store types (action lifecycle + persistence types). |
| src/store/define-store.ts | Loosens action typing for defineStore. |
| src/store/create-store.ts | Implements $onAction lifecycle hooks and error isolation in action observers. |
| src/ssr/types.ts | Introduces public SSR types (render/hydrate/serialize). |
| src/ssr/index.ts | Adds SSR module entry point with docs and exports. |
| src/ssr/hydrate.ts | Adds hydrateMount() wrapper around mount() with hydrate semantics. |
| src/security/trusted-html.ts | Adds trusted/sanitized HTML branding + helpers for safe template composition. |
| src/security/sanitize.ts | Changes sanitizeHtml return type to branded SanitizedHtml; exports trusted. |
| src/security/index.ts | Exposes trusted HTML helpers/types and updates SanitizeOptions type export path. |
| src/router/utils.ts | Enhances resolve() to support param constraints and required-param validation. |
| src/router/use-route.ts | Adds useRoute() composable returning focused readonly signals. |
| src/router/types.ts | Extends route definitions (redirect routes, per-route beforeEnter) and router options (scrollRestoration). |
| src/router/query.ts | Hardens query parsing against prototype pollution keys. |
| src/router/path-pattern.ts | Adds internal helpers for parsing param names and constraints. |
| src/router/index.ts | Updates router module docs and exports (useRoute, bq-link). |
| src/router/constraints.ts | Adds constraint normalization + caching + ReDoS/backreference protections. |
| src/reactive/computed.ts | Adds computed disposal support and improves caching semantics when disposed. |
| src/plugin/types.ts | Adds public types for plugins, install context, and directives/components integration. |
| src/plugin/index.ts | Adds plugin module entry point with exports. |
| src/motion/typewriter.ts | Adds a new typewriter text animation utility. |
| src/motion/types.ts | Adds motion types for morph/parallax/typewriter APIs. |
| src/motion/reduced-motion.ts | Adds global reduced-motion override via setReducedMotion. |
| src/motion/parallax.ts | Adds scroll-linked parallax effect utility. |
| src/motion/morph.ts | Adds FLIP-based morph animation helper. |
| src/motion/index.ts | Exposes new motion APIs and updated module description. |
| src/media/viewport.ts | Adds useViewport() reactive viewport signal handle. |
| src/media/types.ts | Adds shared media signal handle types and state shapes. |
| src/media/network.ts | Adds useNetworkStatus() reactive network signal handle. |
| src/media/media-query.ts | Adds mediaQuery() reactive media-query signal handle. |
| src/media/index.ts | Adds media module entry point and type exports. |
| src/media/geolocation.ts | Adds useGeolocation() reactive geolocation signal handle. |
| src/media/device-sensors.ts | Adds reactive device motion/orientation signal handles. |
| src/media/clipboard.ts | Adds async clipboard wrapper API. |
| src/media/breakpoints.ts | Adds named breakpoint reactive signals with cleanup. |
| src/media/battery.ts | Adds useBattery() reactive battery signal handle. |
| src/index.ts | Re-exports new modules from the root bundle and adds explicit a11y re-export list. |
| src/i18n/types.ts | Adds public types for i18n module. |
| src/i18n/translate.ts | Adds translation resolution/interpolation/pluralization + safe deep merge. |
| src/i18n/index.ts | Adds i18n module entry point and exports. |
| src/i18n/i18n.ts | Implements createI18n() with signals, lazy loading, formatting, and merging. |
| src/i18n/formatting.ts | Adds Intl-based number/date formatting helpers. |
| src/forms/types.ts | Adds public types for the forms module. |
| src/forms/index.ts | Adds forms module entry point and exports validators/form factory. |
| src/dnd/index.ts | Adds DnD module entry point and exports. |
| src/dnd/droppable.ts | Implements pointer-event-based drop zones with shared global listeners. |
| src/devtools/types.ts | Adds public types for devtools module. |
| src/devtools/index.ts | Adds devtools module entry point and exports. |
| src/core/utils/index.ts | Adds BQueryUtils interface and types utils namespace explicitly. |
| src/core/shared.ts | Adds isHTMLElement and getOuterSize internal helpers. |
| src/core/index.ts | Exports BQueryUtils type from core entry point. |
| src/core/collection.ts | Adds jQuery-parity helpers (detach/index/contents/offsetParent/position/outerWidth/outerHeight). |
| src/component/scope.ts | Adds component-scoped reactive primitives that auto-dispose on disconnect. |
| src/component/library.ts | Updates default input/textarea to use old/new props in beforeUpdate and skip rerenders when only value changes. |
| src/component/index.ts | Exposes new component exports/types, including scoped reactivity helpers and bool. |
| src/component/html.ts | Adds bool() boolean-attribute helper and upgrades safeHtml() to support trusted fragments + branding. |
| src/a11y/types.ts | Adds public types for the a11y module. |
| src/a11y/trap-focus.ts | Adds focus trapping utility + focusable selector helper. |
| src/a11y/roving-tab-index.ts | Adds roving tabindex utility for keyboard navigation patterns. |
| src/a11y/index.ts | Adds a11y module entry point and exports. |
| src/a11y/announce.ts | Adds screen reader announcements via ARIA live regions. |
| package.json | Bumps version to 1.7.0, adds new export entry points, adds test:types, updates devDependencies. |
| mise.toml | Pins bun toolchain via mise. |
| llms.txt | Updates the public module map/documentation to 1.7.0. |
| docs/index.md | Updates docs landing page feature list to include new modules. |
| docs/guide/testing.md | Adds testing guide page for new testing module. |
| docs/guide/storybook.md | Adds storybook guide page for new story helpers. |
| docs/guide/store.md | Documents $onAction and advanced persisted-store options. |
| docs/guide/ssr.md | Adds SSR guide page (render/serialize/hydrate). |
| docs/guide/security.md | Documents trusted fragment composition with trusted() + safeHtml. |
| docs/guide/router.md | Documents constraints/redirects/beforeEnter/useRoute/bq-link/scroll restoration. |
| docs/guide/plugin.md | Adds plugin guide page (directives/components/introspection/reset). |
| docs/guide/motion.md | Documents new motion features and reduced-motion override. |
| docs/guide/media.md | Adds media guide page for reactive browser/device APIs. |
| docs/guide/i18n.md | Adds i18n guide page for locale/translation/formatting. |
| docs/guide/getting-started.md | Updates getting started guide to include new modules and examples. |
| docs/guide/forms.md | Adds forms guide page for reactive forms and validators. |
| docs/guide/dnd.md | Adds drag & drop guide page. |
| docs/guide/devtools.md | Adds devtools guide page. |
| docs/guide/components.md | Expands component docs for new helpers (bool/trusted, scoped signals, lifecycle changes). |
| docs/guide/api-core.md | Documents new core collection APIs and typed utils access. |
| docs/guide/a11y.md | Adds accessibility guide page. |
| docs/definition.md | Updates architecture definition to include new modules and examples. |
| docs/.vitepress/config.ts | Adds new guide pages to VitePress sidebar. |
| CHANGELOG.md | Adds 1.7.0 release notes and TOC entries. |
| .github/workflows/test.yml | Adds a test type-check step to CI. |
| .github/labeler.yml | Extends label patterns to cover new module directories. |
| .cursorrules | Updates contributor/agent workflow guidance for new modules and docs. |
| .clinerules | Requires keeping docs and agent context in sync with public API changes. |
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>
* Initial plan * feat: add per-component sanitizer options Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * docs: clarify component sanitizer baseline Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * docs: warn about sensitive component sanitizer opts Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * test: cover sanitizer allowTags overrides Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * perf: precompute component sanitizer allowlists Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> --------- Signed-off-by: Jonas Pfalzgraf <info@josunlp.de> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>
* Initial plan * Add previous props to beforeUpdate hook Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * Refine beforeUpdate old props implementation Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * Fix beforeUpdate typing regressions Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> --------- Signed-off-by: Jonas Pfalzgraf <info@josunlp.de> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>
* Initial plan * feat: add component signal subscriptions Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * chore: document signal subscription tracking Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: address signal integration review feedback Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: tighten component signal typing Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: resolve eslint failure in component signal test Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: handle reconnect lifecycle and signal effect errors Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: preserve reconnect signal wiring after hook errors Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: skip beforeUpdate for signal rerenders Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> --------- Signed-off-by: Jonas Pfalzgraf <info@josunlp.de> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>
* Initial plan * feat: add trusted safeHtml fragment support Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * chore: finalize trusted safeHtml support Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * docs: address trusted safeHtml review feedback Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * docs: fix second trusted safeHtml review follow-up Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * refactor: split trusted html helpers from sanitizer Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * refactor: tighten trusted html branding Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * docs: tighten trusted html internals Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> --------- Signed-off-by: Jonas Pfalzgraf <info@josunlp.de> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Co-authored-by: Jonas Pfalzgraf <info@josunlp.de>
…#63) * Initial plan * feat: add storybook template helper Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * docs: clarify storybook when fallback behavior Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: keep storybook helpers out of full bundle Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: sanitize storybook helper output Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * test: tighten storybook helper security coverage Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * feat: enhance storyHtml with improved boolean attribute handling and sanitization tests * fix: update storyHtml example to reflect correct boolean attribute output * fix: defensive tag delimiter and parser comments per code review Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
- Update CHANGELOG.md for version 1.6.0 release notes including added features, changes, fixes, and security improvements. - Enhance README.md to document new boolean attribute helpers and Storybook integration. - Update bun.lock to reflect dependency upgrades for Storybook and happy-dom. - Modify definition.md to include new Storybook helpers and component state management features. - Revise components.md to demonstrate new boolean attribute handling and typed state in components. - Update getting-started.md with Storybook authoring examples and improved module descriptions. - Enhance security.md to clarify sanitization practices and introduce trusted fragment handling. - Revise index.md to highlight new Storybook helpers in the feature list. - Update llms.txt to reflect the new version 1.6.0. - Bump version in package.json to 1.6.0 and update devDependencies for Storybook.
…nent state keys (#65) * Initial plan * Address review feedback for test typing and setup Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * Finalize review feedback fixes Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * Export component state key type Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * Default component state key generic Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
…tization (#66) * Initial plan * fix review follow-up for state updates and storybook sanitization Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix storybook attribute value scanning Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix storybook interpolation boundary parsing Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * docs align storybook attribute scan jsdoc Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…sting, SSR, and related areas (#69) * feat(component): add lifecycle hooks, shadow mode toggle, and scoped reactivity - onAdopted() lifecycle hook for adoptedCallback - onAttributeChanged(name, oldVal, newVal) hook with observeAttributes option - shadow option: true | false | 'open' | 'closed' for Shadow DOM control - useSignal(initialValue) with auto-disposal on disconnect - useComputed(fn) with auto-disposal on disconnect - useEffect(fn) with auto-disposal on disconnect - 22 new tests covering all new features Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/e1fab322-992d-4507-a3dd-45145e8a8349 * refactor: address code review feedback on scope.ts and test comments Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/e1fab322-992d-4507-a3dd-45145e8a8349 * feat(forms): add reactive form handling module with validation New module `@bquery/bquery/forms` providing: - createForm() with reactive fields, errors, dirty/touched tracking - Built-in validators: required, minLength, maxLength, pattern, email, url, min, max, custom, customAsync - Cross-field validation support - Async validation support - Submit handling with isSubmitting state and concurrency guard - 81 comprehensive tests Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/badfe103-017c-46b3-9dcc-4bf1b580d15b * fix: make isSubmitting test deterministic without setTimeout Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/badfe103-017c-46b3-9dcc-4bf1b580d15b * feat(store): add $onAction lifecycle hooks and enhanced persisted store options $onAction(callback) provides before/after/error hooks for every action execution, matching Pinia's API. Sync and async actions are both supported. createPersistedStore now accepts a PersistedStoreOptions object with: - storage: custom StorageBackend (localStorage, sessionStorage, etc.) - serializer: custom StoreSerializer (serialize/deserialize) - version + migrate: schema versioning with automatic migration - key: custom storage key Backward-compatible: the old (definition, storageKey?) signature still works. Includes 19 new tests covering all new functionality. Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/20631c9a-f5a0-4aa3-9370-4e7ddfb561da * fix(store): log warning when migration write-back fails Address code review feedback: when storage quota prevents saving migrated state, log a warning so developers know migration will re-run on next load. Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/20631c9a-f5a0-4aa3-9370-4e7ddfb561da * feat(motion): add morphElement, parallax, typewriter and global reduced motion toggle Implements the remaining P1 backlog items from section 3.6: - morphElement(from, to, options): FLIP-based morph animation between elements - parallax(el, options): scroll-linked parallax with rAF throttling - typewriter(el, text, options): character-by-character text animation with cursor - setReducedMotion(override): global toggle for reduced motion preference All new features respect prefers-reduced-motion by default, support graceful fallbacks when APIs are unavailable, and include full JSDoc with @example blocks. Added 23 new tests covering all features including edge cases. Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/ad80d4be-90fd-4ce6-8d2e-0399facf414a * feat(router): add regex param constraints, redirectTo, beforeEnter, useRoute, scroll restoration Implements remaining P1 router backlog items (3.7): - Route params with regex constraints: /user/:id(\d+) syntax - redirectTo option for automatic route redirects (with chaining) - Per-route beforeEnter guards (run before global beforeEach) - useRoute() composable for fine-grained reactive access to path, params, query, hash - Scroll position restoration on back/forward navigation - 23 new tests (103 total router tests, all passing) Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/4c85b5e9-3250-46d4-a87f-c81bf2ce7d16 * fix(router): remove identity replacement flagged by CodeQL Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/4c85b5e9-3250-46d4-a87f-c81bf2ce7d16 * feat(i18n): add internationalization module with reactive locale, interpolation, pluralization, lazy-loading, and Intl formatting Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/13d7e43a-0aa5-49da-93d8-1358b26c8824 * fix(i18n): guard deepMerge against prototype pollution Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/13d7e43a-0aa5-49da-93d8-1358b26c8824 * feat(a11y): add accessibility utilities module with focus trapping, screen reader announcements, roving tab index, skip link, media preferences, and audit Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/d2da63cd-9af5-46d6-b537-63e4475bbb79 * refactor(a11y): extract announcement delay as named constant per review Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/d2da63cd-9af5-46d6-b537-63e4475bbb79 * feat(dnd): add Drag & Drop module with draggable, droppable, sortable Implements P2 backlog item 3.12: - draggable(el, options): pointer-event-based dragging with axis lock, bounds constraints, handle support, ghost/clone preview, touch support - droppable(el, options): drop zones with enter/over/leave/drop callbacks and accept filtering - sortable(container, options): sortable lists with animated reordering, placeholder elements, and handle support - Full TypeScript types for all APIs - 40 tests covering happy path, edge cases, and option combinations - Module wired up: package.json, vite.config.ts, index.ts, full.ts Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/53a5a602-6335-4520-b5af-736750661c59 * feat(media): add Media module with reactive browser and device API signals Implements P2 backlog item 3.13: - mediaQuery(query): reactive boolean signal for CSS media queries - breakpoints({sm,md,lg,xl}): named breakpoints as reactive signals - useViewport(): reactive {width, height, orientation} - useNetworkStatus(): reactive {online, effectiveType, downlink, rtt} - useBattery(): reactive battery status (level, charging, etc.) - useGeolocation(options?): reactive geolocation with watch mode - useDeviceMotion(): reactive accelerometer + gyroscope - useDeviceOrientation(): reactive compass/orientation - clipboard.read()/clipboard.write(text): async clipboard wrappers - Full TypeScript types for all APIs - 40 tests covering all features - Module wired up: package.json, vite.config.ts, index.ts, full.ts Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/05abb751-6e09-48f1-84e3-abd4c5d3c7b7 * feat(router): add <bq-link> custom element for declarative SPA navigation Implements the last remaining P1 router feature from backlog §3.7: - BqLinkElement class with to/replace/exact/active-class attributes - Reactive active class via routeSignal effect (startsWith or exact) - aria-current="page" for accessibility - Click/keyboard handlers with modifier key support (ctrl/meta = new tab) - registerBqLink() for idempotent custom element registration - 26 new tests covering all behaviors - Exported from router barrel, index.ts, and full.ts Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/256885ee-6468-4fd5-af4c-8df3cda00862 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix(router): improve bq-link active matching to respect path segment boundaries Fixes incorrect active-class matching where /user would match /user-profile. Now correctly requires path segment boundary (/ separator) for non-exact matches. Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/256885ee-6468-4fd5-af4c-8df3cda00862 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * feat(plugin): implement global plugin system (P3 §3.14) Add `use(plugin)` for global plugin registration with: - BQueryPlugin interface: { name, install(ctx, options) } - PluginInstallContext with directive() and component() helpers - Custom directives integrated into view module's processElement - Idempotent plugin installation (deduplicated by name) - getInstalledPlugins(), isInstalled(), getCustomDirective(s) - resetPlugins() for testing - 36 comprehensive tests covering all APIs and edge cases - Wired into package.json exports, vite.config.ts, index.ts, full.ts Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/c8f58093-94b1-4051-bd44-32acd83ed915 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * feat(devtools): implement P3 §3.15 DevTools module Add runtime debugging utilities for bQuery: - enableDevtools()/isDevtoolsEnabled() - toggle development mode - trackSignal()/untrackSignal()/inspectSignals() - signal inspector - inspectStores() - store state inspection via registry - inspectComponents() - detect registered custom elements in DOM - recordEvent()/getTimeline()/clearTimeline() - timeline event log - logSignals()/logStores()/logComponents()/logTimeline() - console helpers - getDevtoolsState() - full state snapshot Wired into package.json, vite.config.ts, src/index.ts, src/full.ts 37 comprehensive tests, 1079 total (0 failures) Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b28fdc00-5f0b-4a6a-82ea-1a71cdfe7892 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * feat(testing): implement P3 §3.16 Testing Utilities module Add @bquery/bquery/testing with six utilities: - renderComponent(tagName, options) — mount custom elements for testing - flushEffects() — synchronously flush pending reactive effects - mockSignal(value) — controllable signal with set()/reset() - mockRouter(options) — lightweight mock router without History API - fireEvent(el, event, options) — dispatch events and flush effects - waitFor(predicate, options) — async polling assertion helper Wired into package.json, vite.config.ts, src/index.ts, src/full.ts 58 comprehensive tests, 1137 total (0 failures) Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/ee604414-0fc8-4ab5-956c-8430fd65d284 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * test(testing): add initialValue immutability test for mockSignal Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/ee604414-0fc8-4ab5-956c-8430fd65d284 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * feat(ssr): implement P3 §3.17 SSR/Pre-rendering module Add new @bquery/bquery/ssr module with: - renderToString(template, data, options) - server-side template rendering - hydrateMount(selector, context, { hydrate: true }) - client-side hydration - serializeStoreState(options) - serialize store state to <script> tag - deserializeStoreState(globalKey) - read SSR state on client - hydrateStore(id, state) / hydrateStores(stateMap) - apply SSR state Supports bq-text, bq-if, bq-show, bq-for, bq-class, bq-style, bq-html, bq-bind:attr directives in SSR mode. XSS protection via HTML entity escaping in serialized script tags. 63 new tests, full suite: 1201 pass, 0 fail across 20 files. Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f4bb8aa5-3a4a-4985-a2ee-589bd7037d99 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix(ci): resolve test typecheck issues and extend labeler areas Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/c2d4d819-1aa3-4d83-8165-0867028e799a Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix(codeql): resolve advanced security alerts in route parsing and SSR Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/371a4223-6e2e-4e38-9ff6-d12a43030afd Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix(codeql): harden i18n deepMerge result storage Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/6ae53d8a-17c7-4ab3-9e00-48e224c4a525 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix(ssr): support arbitrary serialize global keys Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b3da22b5-c4a6-4b9c-8441-b85b68a82345 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix(review): address follow-up review comments Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/65ceb9ee-57d6-4eb4-ad2c-f82f5fdd43cf Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix(store): guard invalid persisted deserialization Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/07a8d6bc-7f07-49ad-9642-39a4433d087d Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix(dnd): keep ghost drag offset accumulated Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b5efaa5d-f17e-498a-a589-e0f4c9b62fe3 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix(review): address follow-up router and scope issues Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/316457d1-5be1-4f31-92b8-b51ac538b0fb Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix follow-up review comments for media and docs Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3c4c6a79-87b7-46fc-b46a-0cb48f7c71d6 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: address final router and media review follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/1a8ea220-b17e-47c7-bc22-cbe6b7c9243a Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: tighten router review follow-up edge cases Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/1a8ea220-b17e-47c7-bc22-cbe6b7c9243a Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: preserve replace scroll state and clarify root link matching Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/1a8ea220-b17e-47c7-bc22-cbe6b7c9243a Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: address latest router media and async review follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/661ad0ba-3d1f-49d6-ad8f-ce32497f801c Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix latest review follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/12cb8d56-ef72-4ea0-9f19-62087bc756d4 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix latest router review follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/cb4ba277-999e-4bb1-9af4-b5794f4cfd99 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix latest review thread follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/a08549e2-5072-4781-86ae-fbb1cbbf58e5 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: address latest SSR router and plugin review follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/fdb4822a-e835-4ec8-9b6d-045a15a42cc2 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: address latest router, media, store, and motion review follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/a1687df0-2d60-4a2b-aecb-dd03453a42cf Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * test: tighten follow-up regression assertions Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/a1687df0-2d60-4a2b-aecb-dd03453a42cf Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: address latest router, plugin, and store review follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/4ac6bb3e-4266-481d-b243-c286171bd039 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: address latest router and ssr review follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/c656b68d-1e26-47ad-8488-9fc0970e68f0 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix hydration type and attribute scope handling Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/0094b226-f76a-4f2e-9f4b-2ae886b91adc Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix deferred attribute-change component scope Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/98085801-780b-4fdf-b690-1e0626a36053 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * refine deferred scope initialization Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/98085801-780b-4fdf-b690-1e0626a36053 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix review feedback for droppable and hydration safeguards Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/48134ce3-b554-4b5f-8272-22e92bbd07f8 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * chore: clarify droppable test flush timing Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/48134ce3-b554-4b5f-8272-22e92bbd07f8 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * docs: clarify shared listener cleanup behavior Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/48134ce3-b554-4b5f-8272-22e92bbd07f8 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * chore: polish review follow-up naming Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/48134ce3-b554-4b5f-8272-22e92bbd07f8 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * docs: clarify final review nits Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/48134ce3-b554-4b5f-8272-22e92bbd07f8 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * Fix final PR review follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/881683e5-6c3c-4232-9290-70cabbec03ce Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix follow-up review thread issues Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/86998fd1-75d3-4d30-9e13-f2980af668ee Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * Fix router constraint and SSR review follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b806b9c0-e9ec-4c53-928a-0a123fccfa00 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * Tighten SSR serializer review follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b806b9c0-e9ec-4c53-928a-0a123fccfa00 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix review follow-ups for SSR forms and router Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/28db5d3e-2fc8-4533-8647-23ca1f6f107c Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * harden preserved router history state Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/28db5d3e-2fc8-4533-8647-23ca1f6f107c Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * Fix latest review thread follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f85f31ef-72c2-4789-89f6-e8e25f43c802 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * Polish review follow-up fixes Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f85f31ef-72c2-4789-89f6-e8e25f43c802 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * Tighten parallax cleanup regression Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f85f31ef-72c2-4789-89f6-e8e25f43c802 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * Resolve final review nits Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f85f31ef-72c2-4789-89f6-e8e25f43c802 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * Finalize teardown safety fixes Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f85f31ef-72c2-4789-89f6-e8e25f43c802 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: reject malformed router param constraints consistently Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b7e6e34e-c106-4f7b-8337-91068bae0ec7 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: address remaining review follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/19558e34-256d-47cc-a529-bcc6eeabe839 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: polish follow-up review notes Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/19558e34-256d-47cc-a529-bcc6eeabe839 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * docs: clarify morph display fallback Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/19558e34-256d-47cc-a529-bcc6eeabe839 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: address follow-up review feedback Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/8ca9e6af-0689-4aba-b60e-bd1a69610495 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix follow-up review issues for motion reactive and ssr Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/2a06ebf9-fff5-4608-af95-11f0f91232da Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: address latest review follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f82e26dd-119b-4df3-8266-9a2784f66074 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * chore: install deps for review fixes Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/0521ca3a-2884-4d1b-befa-aecfcce84ace Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: address review security findings Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/0521ca3a-2884-4d1b-befa-aecfcce84ace Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: finalize SSR escaping compatibility Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/0521ca3a-2884-4d1b-befa-aecfcce84ace Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * perf: cache constraint regexes in review fixes Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/0521ca3a-2884-4d1b-befa-aecfcce84ace Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: harden follow-up review findings Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/0521ca3a-2884-4d1b-befa-aecfcce84ace Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * chore: polish SSR protocol guard naming Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/0521ca3a-2884-4d1b-befa-aecfcce84ace Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * Potential fix for code scanning alert no. 38: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Jonas Pfalzgraf <jolun.swtor@gmail.com> * Potential fix for code scanning alert no. 39: DOM text reinterpreted as HTML Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Jonas Pfalzgraf <jolun.swtor@gmail.com> * fix: address latest review follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3acc4581-6418-41e3-8389-d7f3b0f9aa05 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * perf: polish router review follow-ups Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3acc4581-6418-41e3-8389-d7f3b0f9aa05 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * test: cover long constrained router paths end-to-end Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3acc4581-6418-41e3-8389-d7f3b0f9aa05 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * perf: avoid fallback candidate array allocations Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3acc4581-6418-41e3-8389-d7f3b0f9aa05 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: disallow empty router wildcard candidates Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3acc4581-6418-41e3-8389-d7f3b0f9aa05 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: allow empty wildcard suffix matches Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/3acc4581-6418-41e3-8389-d7f3b0f9aa05 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * fix: address follow-up review thread comments Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/03b45c29-7ee7-4f25-8a4e-79ed9c4500ee Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * refactor: polish follow-up review fixes Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/03b45c29-7ee7-4f25-8a4e-79ed9c4500ee Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * refactor: clarify persistence and DOM guards Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/03b45c29-7ee7-4f25-8a4e-79ed9c4500ee Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * style: tighten skip-link DOM guard checks Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/03b45c29-7ee7-4f25-8a4e-79ed9c4500ee Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> * refactor: enhance skipLink functionality and improve environment checks * refactor: improve onAdopted lifecycle handling and enhance persisted store migration logic * refactor: improve code formatting and readability across multiple files - Updated type definitions in `src/store/types.ts` for better clarity. - Enhanced readability of function definitions in `src/storybook/index.ts` and `src/view/custom-directives.ts`. - Reformatted export statements in `src/testing/index.ts` for consistency. - Improved function signatures in `src/testing/testing.ts` for better alignment. - Added tests in `tests/a11y.test.ts` and `tests/component.test.ts` to handle edge cases. - Refactored test cases in `tests/devtools.test.ts`, `tests/i18n.test.ts`, and `tests/media.test.ts` for better structure. - Enhanced error handling in `tests/plugin.test.ts` and `tests/router.test.ts`. - Added new tests in `tests/store.test.ts` to ensure state persistence during migrations. - General cleanup and formatting adjustments across various test files for improved maintainability. * refactor: enhance security by preventing prototype pollution in query parsing and object expression evaluation * refactor: enhance component scope management and improve media query listener handling * refactor: improve media query listener handling and enhance skipLink functionality * refactor: enhance prototype pollution prevention and improve skip link ID generation * refactor: enhance form serialization and improve morphElement animation handling * refactor: improve droppable logic and enhance BqLinkElement active class handling * refactor: improve skip link target resolution and enhance error handling in component lifecycle * refactor: enhance skip link behavior, improve network status handling, and add rollback for plugin directives * refactor: prevent tabindex addition to naturally focusable elements and enhance component registration rollback handling * refactor: add environment checks for droppable and parallax functions to ensure compatibility with document and RAF APIs * refactor: enhance type definitions, improve error handling, and update tests for better clarity and functionality * refactor: enhance form serialization security, improve network status cleanup, and preserve user-authored active classes in router --------- Signed-off-by: Jonas Pfalzgraf <jolun.swtor@gmail.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com> Co-authored-by: Jonas Pfalzgraf <info@josunlp.de> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/f3b4da78-0d41-468a-8ed4-02cb5d34cd7e Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Applied the latest follow-up in Moved shared dev-environment detection into a low-level internal utility, removed the view/component dependency on Validation: targeted plugin/component/store suites pass, No UI changes in this update. |
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/ad5e7aad-f306-4d62-9956-efe8226d30b9 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Applied the latest follow-up in Shared env detection now treats Node-like runtimes without Validation: targeted store/plugin suites pass, No UI changes in this update. |
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/d97659a7-1ca5-4fca-a99b-3ece36f785c3 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Applied the latest follow-up in The env detector now requires real Node markers before treating a missing- Validation: targeted store/component suites pass, No UI changes in this update. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 121 out of 136 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
src/component/index.ts:1
- The changelog/release notes indicate
ComponentStateKeyis part of the exported public type surface, but it isn’t re-exported from the component entry point here. AddComponentStateKeyto theexport type { ... } from './types'list (or adjust the release notes/docs if it’s intentionally not public).
/**
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/498ecafb-f407-443c-a136-8b9ce3ade50f Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Applied the latest follow-up in
Validation: targeted SSR/router/store suites pass, No UI changes in this update. |
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/b9508fd8-eb02-4fdd-9ebd-bab28ac625ee Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Applied the latest follow-up in
Validation: targeted store/component suites pass, No UI changes in this update. |
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/bQuery/bQuery/sessions/6de6f85d-8022-4297-83e7-5ff883179766 Co-authored-by: JosunLP <20913954+JosunLP@users.noreply.github.com>
Applied in I tightened the textarea shadow-label divergence check (and aligned the input variant), softened the |
| MockSignal, | ||
| RenderComponentOptions, | ||
| RenderResult, | ||
| Route, |
There was a problem hiding this comment.
This root entry point already re-exports the router's Route type via export * from './router/index'. Re-exporting the testing module's Route type under the same name will cause a duplicate export name conflict. Fix by aliasing the testing type (e.g., export type { Route as TestingRoute } ...) or renaming the testing type to something unambiguous like MockRoute.
| Route, | |
| Route as TestingRoute, |
| console.warn( | ||
| `[bQuery][view] Unknown directive "${name}" (parsed as "${directive}") on <${el.tagName.toLowerCase()}>. This may be a typo or a missing custom directive registration.` | ||
| ); |
There was a problem hiding this comment.
The warning string references name, but in this diff hunk there's no guarantee name is in scope (whereas directive clearly is). If name is not defined in this function scope, this will throw a ReferenceError when logging. Use the in-scope directive identifier (or rename variables so the original attribute name is explicitly available and used here).
| import type { ReadonlySignal } from '../reactive/index'; | ||
|
|
||
| /** | ||
| * Type definitions for the bQuery accessibility (a11y) module. | ||
| * | ||
| * @module bquery/a11y | ||
| */ |
There was a problem hiding this comment.
The module-level JSDoc (including @module) comes after an import. If you rely on TypeDoc/module doc extraction, this can prevent the comment from being treated as the module doc. Move the module JSDoc block to the very top of the file (before imports) to ensure it’s recognized consistently.
| import type { ReadonlySignal } from '../reactive/index'; | |
| /** | |
| * Type definitions for the bQuery accessibility (a11y) module. | |
| * | |
| * @module bquery/a11y | |
| */ | |
| /** | |
| * Type definitions for the bQuery accessibility (a11y) module. | |
| * | |
| * @module bquery/a11y | |
| */ | |
| import type { ReadonlySignal } from '../reactive/index'; |
This pull request introduces significant improvements to project documentation, contributor guidelines, and developer workflow for bQuery.js. It updates and expands the documentation to reflect new modules, clarifies public API update procedures, and enhances test and CI workflows. The changes also refine the project's architecture documentation and labeling system to support new feature areas.
Documentation and Contribution Workflow Updates:
.github/copilot-instructions.mdto provide a concise orientation, clarify source-of-truth files, outline public API update requirements, and document common workflows and pitfalls. The new instructions emphasize keeping documentation and agent context in sync when public APIs change..clinerulesand.cursorrulesto require updating documentation (README.md,AGENT.md,llms.txt, and relevant guides) when public module surfaces change, and to document new public modules and usage patterns. [1] [2] [3]Architecture and API Documentation Enhancements:
AGENT.mdto reflect new modules (forms,i18n,a11y,dnd,media,plugin,devtools,testing,ssr,storybook), updated the version to 1.7.0, and documented new exports and helpers across modules. [1] [2] [3] [4] [5]Developer Workflow and CI Improvements:
.github/workflows/test.ymlto add a type-check step for tests, improving CI reliability..github/labeler.ymlto support new feature module directories, ensuring PRs are properly categorized.Review Feedback Fixes:
SanitizeOptionsre-export insrc/security/index.tsto use./typesinstead of./sanitize, ensuring type exports work correctly.fadeoption frommorphElement(), updatedparallax()options todirection/respectReducedMotion, fixedtypewriter()controls to.done/.stop(), correcteddroppable()callback to usezoneinstead ofdropzone, and removed unsupportedmaxTimelineEntriesfrom devtools guide.mediaQuery().destroy()insrc/media/media-query.tsto useObject.definePropertyfor consistency withviewport.tsandnetwork.ts.$onActionobserver error logging behindisDevinsrc/store/create-store.tsto reduce noise in production builds.canSkipInputRender/canSkipTextareaRenderinsrc/component/library.tsto prevent skipping re-renders when the DOM has diverged from expected props.(?:...), with focused regressions for both accepted and rejected patterns.src/a11y/media-preferences.tssoprefersContrast()reuses existingMediaQueryListinstances instead of re-runningmatchMedia()on every update.isDevto avoid noisy production startup and retry logging when storage is unavailable or blocked.Routetype fromsrc/index.tsso the root entry point matches the testing module's public type surface.bq-*directives in the view processor to make typos and missing custom directive registrations easier to diagnose.bQuery routerprefix.Routetype-surface regression test so CItest:typesvalidates against the full route contract.process/NODE_ENVare not detectable, removed the new view/component dependency on store internals, and added aglobalThis.__BQUERY_DEV__override so dev diagnostics can still be enabled without aprocessshim.NODE_ENVstill default to development, while browser/no-processenvironments remain production-safe.processshims without Node markers no longer enable dev-only diagnostics in production builds.globalThis.__BQUERY_DEV__toggles take effect consistently after module import.$onActionlogger for environments whereconsoleis unavailable.breakpoints().destroy()descriptor with the other media signal handles by making it configurable and using the same handle-style method shape.$onActionlifecycle behaviors: listener ordering, sync/async after-hook timing, and error isolation ensuring listener failures don't change action results.\k<name>), nested quantifier rejection (ReDoS protection), and safe constraint validation.prefersContrast()media-query reuse, unknown view-directive warnings, schema-preserving persisted-state merges, invalid route constraint regex diagnostics, the root testingRoutetype export surface, production-safe no-processdev logging behavior, explicit__BQUERY_DEV__override behavior for view/component/store diagnostics, real Node-like missing-NODE_ENVdev defaults, browser process-shim production-safe behavior, late override toggles after module import across view/store/component diagnostics, and breakpoint destroy descriptor consistency.Most important changes:
Documentation and Contribution Process
.github/copilot-instructions.mdto clarify project orientation, source-of-truth files, public API update workflow, and documentation map..clinerulesand.cursorrulesto require updating documentation and guides when public APIs change, and to document new modules and usage patterns. [1] [2] [3]Architecture and API Documentation
AGENT.mdwith new modules, updated version to 1.7.0, and added documentation for new exports and helpers incomponent,storybook,motion, andsecuritymodules. [1] [2] [3] [4] [5]Developer Workflow and CI
Code Quality and Correctness
destroy()pattern, gated store observer logging to dev mode, restored component skip-render DOM consistency checks, and reduced persisted-store warning noise in production.matchMedia()calls on updates.globalThis.__BQUERY_DEV__, preserving development defaults in real Node-like runtimes withoutNODE_ENV, preventing lightweight browser process shims from enabling production logging, and allowing late override toggles to take effect after import across view/store/component diagnostics.Routetype from the root entry point for a more consistent public API surface.destroy()behavior across media helpers.$onActionlifecycle, router constraint security behavior, contrast media-query reuse, unknown view-directive warnings, schema-preserving persisted-state merges, root testing type exports, production-safe no-processdev logging, explicit__BQUERY_DEV__override behavior, real Node-like missing-NODE_ENVdevelopment defaults, browser process-shim production-safe behavior, late override toggle behavior across view/store/component diagnostics, and breakpoint destroy descriptor consistency.📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.