Repository navigation
fix: keep lenis/react external and clear October 2026 advisories - #27
Merged
Merged
Conversation
clementroche
approved these changes
Oct 28, 2026
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.
What this does
Fixes a bug in the published 1.0.3 where scroll triggers ignore Lenis: the build shipped its own copy of
lenis/react, so hamo never saw the app's<ReactLenis>and fell back to native scroll. Declaringlenisas a peer dependency keeps it external. Also clears the October 2026 security advisories in the playground and gets the playground building again. Bumps to 1.0.4.Summary
package.json: addlenis: ^1.1.0topeerDependencies. tsdown keeps peers external, sodist/use-scroll-trigger-*.mjsanddist/scroll-trigger/debugger.mjsnowimport { useLenis } from "lenis/react"instead of bundling a secondLenisContext. It is a required peer because the mainhamoentry exportsuseScrollTrigger.playground/package.json: Astro 4 to 7 (@astrojs/react7,@astrojs/check0.9.12). Astro 4 pins Vite 5, Zod 3 and Sharp 0.33, which have no patched releases for the October advisories (vite/launch-editor GHSA-587h, -698v, -r825, -rq7h, -9jrq; sharp GHSA-wq5f; zod GHSA-mrhx; astro GHSA-98hj). Dev-only; the published package was never affected.lenisas a dev dependency ofpackages/react(where it is imported), nullable refs and typed position props inscroll-trigger-app.tsx, and removal ofcore.astro, which pointed at files that never existed.Test Plan
bun install && bun audit: expect no vulnerabilitiesbun run build, thengrep -n 'lenis' dist/*.mjs: expect onlyfrom "lenis/react"imports and nocreateContextin the store chunkcd playground && bun run build: expect 0astro checkerrors and 3 pages built<ReactLenis root>,useScrollTriggerprogress follows Lenis scroll (not yet checked in a browser)Screenshots: before/after needed only as a sanity check. The playground edits are type-only, and the removed
/corepage could never build.