Skip to content

chore: reintegrate the helpers in the main package#40

Merged
jsulpis merged 1 commit intomainfrom
refactor/helpers
Mar 9, 2026
Merged

chore: reintegrate the helpers in the main package#40
jsulpis merged 1 commit intomainfrom
refactor/helpers

Conversation

@jsulpis
Copy link
Owner

@jsulpis jsulpis commented Mar 9, 2026

No description provided.

Copilot AI review requested due to automatic review settings March 9, 2026 21:22
@vercel
Copy link

vercel bot commented Mar 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
usegl Ready Ready Preview, Comment Mar 9, 2026 9:53pm

Copy link

Copilot AI left a comment

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 merges the previously separate packages/helpers workspace package directly into the main lib/ package (@radiance/gl), simplifying the monorepo structure by eliminating the packages/* workspace and consolidating everything under lib/.

Changes:

  • Removes packages/helpers (its source files are moved to lib/src/helpers/) and updates pnpm-workspace.yaml to only include lib/ and docs/.
  • Updates lib/src/index.ts to re-export helpers (loop, onResize, onPointerEvents) directly from lib/src/helpers/ instead of @radiance/helpers.
  • Migrates and self-contains the lib/ package: new Dockerfile, compose.yml, playwright.config.ts, Astro playground, test screenshots, and all supporting infrastructure that previously lived in packages/gl.

Reviewed changes

Copilot reviewed 16 out of 226 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pnpm-workspace.yaml Replaces packages/* with lib as the sole library workspace package
packages/helpers/** Entirely removed; helpers are now in lib/src/helpers/
lib/src/helpers/loop.ts Moved from packages/helpers, unchanged; module-level registry has a potential memory/stale reference issue
lib/src/helpers/onResize.ts Moved from packages/helpers; disconnect is not bound to the observer instance
lib/src/helpers/onPointerEvents.ts Moved from packages/helpers; BoundingRect type is no longer publicly exported
lib/src/helpers/watchBoundingRect.ts Renamed UseBoundingRectParamsWatchBoundingRectParams
lib/src/index.ts Adds direct helper exports, removes @radiance/helpers re-export
lib/Dockerfile New self-contained Dockerfile; missing pnpm-lock.yaml copy
lib/compose.yml Simplified build context (no more cross-package context references)
lib/tests/screenshots.spec.ts Visual regression test spec (migrated from packages/gl/tests/)
lib/src/** All other source files migrated from packages/gl/src/
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)

lib/src/index.ts:54

  • The watchBoundingRect function is not exported from lib/src/index.ts. While it is used internally by onPointerEvents, its companion types (WatchBoundingRectParams, BoundingRect) were previously exported via @radiance/helpers. The BoundingRect type is still used in the public signature of onPointerEvents (as a property of HandlerArgs), so consumers who need to type that argument will not be able to import BoundingRect directly. Either export watchBoundingRect and its types from index.ts, or re-export the BoundingRect type separately.
    lib/src/helpers/watchBoundingRect.ts:51
  • The type UseBoundingRectParams has been renamed to WatchBoundingRectParams in the diff. If any existing external consumers (e.g. docs or downstream packages) were using UseBoundingRectParams by name, this is a breaking rename. Ensure the old name is not exposed in any published API surface.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jsulpis jsulpis force-pushed the refactor/helpers branch from 53c6154 to 93774a4 Compare March 9, 2026 21:53
@jsulpis jsulpis merged commit 4ba2d3c into main Mar 9, 2026
8 checks passed
@jsulpis jsulpis deleted the refactor/helpers branch March 9, 2026 22:02
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