feat!: modernize repo — TypeScript, hooks, GitHub Actions#46
Merged
Conversation
- Rewrite component from React 16 class to functional component with hooks - Convert to TypeScript with exported type definitions - Add pauseOnHover and loop props (closes #14, closes #22) - Fix scrollWhen="overflow" duplicate span rendering (closes #44) - Migrate CI from Travis CI to GitHub Actions (ci.yml + release.yml) - Upgrade all dependencies: Rollup 4, Jest 29, ESLint 8, React 18 - Replace Enzyme with React Testing Library - Widen React peer dependency to >=16.8.0 - Update README with new props, TypeScript examples, and CI badges BREAKING CHANGE: Component is now a functional component. PropTypes removed in favor of TypeScript types. Peer dependency widened to react >=16.8.0. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Callbacks now read current prop values from a propsRef instead of closing over them. This prevents the useCallback dependency chain from recreating every function on prop changes and avoids restarting the animation loop unnecessarily. The useEffect now only depends on children and delay. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The previous lockfile was generated via a corporate proxy registry, causing npm ci to hang in GitHub Actions. Regenerated with the public npm registry. Also bumped CI matrix from Node 18/20 to 20/22 since semantic-release deps require Node >= 20. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
No need to test across Node versions for a frontend React library. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pauseOnHoverprop (closes Pause on hover #14) andloopprop (closes Add loop prop #22)scrollWhen="overflow"duplicate span rendering (closes A problem with setting scrollWhen #44)ci.yml+release.yml)>=16.8.0BREAKING CHANGE: Component is now a functional component. PropTypes removed in favor of TypeScript types.
Test plan
npm run buildpasses (UMD + ESM bundles)npm run lintpassesnpm testpasses (10/10 tests)🤖 Generated with Claude Code