Skip to content

Conversation

@kbader-godaddy
Copy link
Contributor

Summary

Fixes TypeScript compilation errors that were blocking CI:

  • Cannot find module '@bento/types' when importing RenderPropData from @bento/use-props
  • @bento/use-props has no exported member named 'RenderPropData'
  • Type inference error in @bento/scroll-lock where setAttribute received unknown type

Root causes:

  1. @bento/use-props exports RenderPropData interface which uses AnyObject from @bento/types, but the dependency was in devDependencies instead of dependencies, causing type resolution failures for consumers
  2. Object.entries() has weak type inference, causing value to be typed as unknown in the scroll-lock setAttribute call

Impact: Unblocks CI and ensures proper type resolution for downstream consumers of @bento/use-props

Changes Made

  • @bento/use-props: Moved @bento/types from devDependencies to dependencies
  • @bento/scroll-lock: Added type assertion (as string) for setAttribute call to satisfy TypeScript
  • Updated package-lock.json to reflect dependency changes

Test Plan

  • ✅ All existing tests pass (100% coverage maintained)
  • ✅ TypeScript compilation succeeds without errors
  • ✅ Linting passes (biome + tsc --noEmit)
  • ✅ Verified @bento/scroll-lock tests: 28 tests passing
  • ✅ Verified @bento/use-props tests: 42 tests passing

Checklist

  • My code follows the project's code style (biome)
  • I have added/updated tests that prove my fix is effective or that my feature works
  • I have added/updated documentation (README, Storybook stories, etc.)
  • All new and existing tests pass locally
  • I have added a changeset (run npm run changeset if this affects packages)
  • I have reviewed my own code and commented any complex areas

@kbader-godaddy kbader-godaddy requested a review from a team as a code owner December 18, 2025 17:57
Copilot AI review requested due to automatic review settings December 18, 2025 17:57
@changeset-bot
Copy link

changeset-bot bot commented Dec 18, 2025

🦋 Changeset detected

Latest commit: 672b598

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@bento/use-props Patch
@bento/scroll-lock Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kbader-godaddy kbader-godaddy self-assigned this Dec 18, 2025
Copy link
Contributor

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 resolves TypeScript compilation errors that were blocking CI by fixing type dependency resolution and inference issues in two packages.

  • Moved @bento/types from devDependencies to dependencies in @bento/use-props to resolve module resolution failures
  • Added type assertion in @bento/scroll-lock to address weak type inference from Object.entries()

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/use-props/package.json Moved @bento/types to dependencies to ensure exported type RenderPropData resolves correctly for consumers
packages/scroll-lock/src/index.tsx Added type assertion for setAttribute value parameter to satisfy TypeScript compiler

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

@kbader-godaddy kbader-godaddy merged commit fdbcf4e into main Dec 18, 2025
3 checks passed
@kbader-godaddy kbader-godaddy deleted the fix/type-dependency-errors branch December 18, 2025 18:10
@github-actions github-actions bot mentioned this pull request Dec 18, 2025
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.

5 participants