[Snyk] Upgrade gsap from 3.11.4 to 3.12.5 #19
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.
This PR was automatically created by Snyk using the credentials of a real user.
Snyk has created this PR to upgrade gsap from 3.11.4 to 3.12.5.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Release notes
Package name: gsap
IMPROVED: ScrollTrigger's ignoreMobileResize is true by default now because a few versions back we switched to calculating the window height based on 100vh instead of window.innerHeight, so it really isn't necessary to force a .refresh() on mobile resize (address bar showing/hiding). This change improves performance on mobile devices because it skips the expensive refresh() when the address bar shows/hides.
IMPROVED: removed a DisplayObject check in PixiPlugin so that it's more compatible with the upcoming release of Pixi.js version 8. See #561
IMPROVED: the anticipatePin feature works when scrolling in either direction (previously it worked when scrolling forward only). See https://gsap.com/community/forums/topic/39521-anticipatepin-in-reverse/
FIXED: regression in 3.12.3 could cause a ScrollTrigger that has a numeric scrub value and a snap to prematurely jump to the final progress value when the snap finished rather than waiting for the scrub to finish. See https://gsap.com/community/forums/topic/39363-scrolltrigger-scrub-clip-path-flicker-when-scroll-back/ and #567
FIXED: regression in 3.12.3 could cause a tween with repeatRefresh: true AND a non-zero repeatDelay not to refresh. See https://codepen.io/GreenSock/pen/yLwLgNQ/db88d564d6308b9fcff7b65efb95febf?editors=1010
FIXED: if you set a ScrollSmoother's effects() in a delayed fashion (after two ticks elapse after page load), it may not calculate offsets properly. See https://gsap.com/community/forums/topic/39380-scroll-smoother-effects-targets-jump-on-effectstrue/
FIXED: regression in 3.12.3: if the playhead lands exactly on top of the yoyo position of a keyframed tween, it may render at the state before the animation started (just for 1 tick). See #558
FIXED: if you set invalidateOnRefresh: true on a ScrollTrigger that's attached to a .fromTo() tween, it may not render at the initial state on refresh(). See https://gsap.com/community/forums/topic/39386-svgdraw-window-resize-issues/
FIXED: if you create a gsap.matchMedia() inside a gsap.context() and then revert() that Context, it may not clear out non-matching media queries (they may fire again when matching). See https://gsap.com/community/forums/topic/39481-pin-spacer-is-double-the-height-it-should-be-after-window-resize/
FIXED: if the system clock changes backwards to an earlier time, it could cause animations to stop. See #568
FIXED: if a flexbox child is pinned by ScrollTrigger and pinSpacing is false, flex-basis is now set to the pixel height/width of the element to avoid common layout problems.
FIXED: missing TypeScript parameter for ScrollTrigger.clearScrollMemory(). See #571
FIXED: if you set a default stagger value via gsap.defaults(), it could cause an error in ScrollTrigger if you create one with a numeric scrub. See https://gsap.com/community/forums/topic/39600-scrolltrigger-numeric-scrub-throws-console-errors-in-gsap-core-cannot-read-properties-of-undefined-reading-totalprogress/
FIXED: if a motionPath tween had a start or end value that wraps around and would land precisely on an anchor point that is not at the very start or end of a path, it could render incorrectly. See https://gsap.com/community/forums/topic/39594-why-are-content-1-and-content-2-overlaped-also-what-is-the-best-way-to-add-a-timeline-to-a-main-tween-or-timeline/
FIXED: regression in 3.12.3 could cause ScrollTriggers in gsap.matchMedia() to stop functioning after quick resizes that pass the matchMedia bounds. See https://gsap.com/community/forums/topic/39241-animations-freeze-after-a-few-window-resizes-and-using-gsapmatchmedia/
FIXED: overwriting a scrollTo tween in such a way that didn't leave any more properties tweening, onInterrupt() wasn't invoked.
FIXED: SplitText TypeScript definitions file needed an "elements" property. See #564
FIXED: if you Promise.all() or .then() a timeline that already finished and has a zero duration, that Promise may not resolve properly. See https://gsap.com/community/forums/topic/39291-promiseall-dont-resolve-when-overwrite/
FIXED: regression in 3.12.3 could cause transforms (x, y, scaleX, scaleY, rotation, etc.) on SVG elements to calculate the origin incorrectly. See https://gsap.com/community/forums/topic/39197-update-3123-broke-my-code-for-animating-clip-paths and #563
IMPROVED: gsap.context() and gsap.matchMedia() functions will get a 2nd argument that we'll call "contextSafe" which is like a wrapper for any function that you'd like to keep in the context. So any GSAP animations/ScrollTriggers/Draggables/Observers that are created during the execution of that function will be added to the context and the selector text will be scoped.
IMPROVED: added a suppressEvents parameter to Tween/Timeline/Animation .timeScale() method so that you can optionally prevent it from suppressing events when altering the timeScale. See #551
IMPROVED added an ignoreSpeed [3rd] parameter to ScrollSmoother's offset() method to allow you to specify whether you want to get the value that corresponds to the window's scroll position or the ScrollSmoother's scrollTop value. See https://greensock.com/forums/topic/35108-problems-with-the-scrollsmoother-plug-in-speed-option-in-gsap-3114/
IMPROVED: Observer now fires an onStop with an onMove (previously it would only fire after a press). See https://greensock.com/forums/topic/38469-observer-misunderstanding-with-onchange-onmove-and-onstop/
IMPROVED: slight change to TypeScript definitions for EaseString allows arbitrary strings while also activating code hinting for the common ones in more environments. See #556
IMPROVED: animations/ScrollTriggers created inside a ScrollTrigger's callback like onEnter/onLeave/onToggle/onEnterBack/onLeaveBack will be added to the original Context (if one existed), meaning selector text will be scoped properly. See https://gsap.com/community/forums/topic/38850-reactgsap-why-i-cant-use-class-selector-in-scrolltrigger-inside-gsapcontext/
IMPROVED: a ScrollTrigger's snap end position is limited to the resolution of the browser's scroll (whole pixels only), thus if you have a scrubbed animation that's supposed to snap to a very specific spot on that animation, it may end slightly off of that but now a correction runs at the end of the snap to ensure that it gets set PRECISELY to that snapped position. See https://gsap.com/community/forums/topic/38937-scrolltrigger-timeline-snapping-with-label-doesnt-snap-precisely-to-label-position/
IMPROVED: the gsap-trial files will now work on domains that end in ".local" (for testing only please)
FIXED: for an Observer, if you pressed, started dragging but released within 3 pixels of the original press, it wouldn't fire the onDragEnd. See https://greensock.com/forums/topic/37510-the-problem-that-ondragend-is-not-called-in-observer/
FIXED: if you revert() a context/matchMedia that has a reversed animation, it may not render things in the proper order, potentially leaving inline styles when it shouldn't. See https://greensock.com/forums/topic/37432-issues-with-horizontalloop-helper/
FIXED: if Draggable is applied to an where the document isn't defined initially, an error could be thrown. See #549
FIXED: if you apply a speed to a ScrollSmoother (other than 1), the offset() method would return a value that corresponds to the window's scroll position rather than the ScrollSmoother's scrollTop (which is affected by speed). See https://greensock.com/forums/topic/35108-problems-with-the-scrollsmoother-plug-in-speed-option-in-gsap-3114/
FIXED: if you apply an onUpdate to a .fromTo() tween, the scope ("this") would be linked to the zero-duration "from" tween instead of the actual tween instance you'd expect, thus its progress() would be 1 instead of 0 at the very start.
FIXED: if you define position: absolute on a SplitText and then revert(), the width/height inline styles could remain instead of getting cleared out. See https://greensock.com/forums/topic/38391-responsive-behavior-using-splittext/
FIXED: if you create a ScrollTrigger with a "snap" and pin inside a gsap.matchMedia(), it could lead to incorrect positioning of the pinned element after a resize that makes it no longer match.
FIXED: if you set a CSS value to "auto" (like height or width) via a GSAP tween and then you revert() it, the original computed value could be left as an inline style instead of cleared out.
FIXED: if you call kill() or revert() on a MotionPathHelper in certain specific conditions, it may delete the original itself.
FIXED: worked around a very rare scenario where document.createElement() returns undefined and would consequently throw an error in CSSPlugin. See #553
FIXED: if you create a staggered animation inside a gsap.context() or gsap.matchMedia() that affects the same element(s) as a gsap.set() that happened before that staggered animation and then the context/matchMedia gets reverted, the initial value may not get reverted properly.
FIXED: if you animate a percentage-based width/height of an element whose parent has padding and/or is flexbox/grid, and the target element doesn't have that property already set inline, it may miscalculate the starting value of the tween. Related to https://gsap.com/community/forums/topic/38599-how-to-animate-object-fit/
FIXED: if you create multiple SplitText instances on the same element inside a gsap.context() and then revert() that Context, it may not fully revert the element to its original state. See https://gsap.com/community/forums/topic/38734-splittext-innerwrap-renders-twice-in-strictmode/
FIXED: if you set allowNestedScroll: true in the ScrollTrigger.normalizeScroll() feature, touch-scrolling on a link on a mobile device could result in a click event firing on that link. See https://gsap.com/community/forums/topic/38770-why-does-the-burger-menu-scroll-along-with-the-content-on-mobile/#comment-193009
FIXED: if you set end: "max" or clamp() the end of a ScrollTrigger that has a pin, and the pinSpacing was extending the page taller, the dynamic adjustment of the end value would also affect the pinSpacing, reducing the maximum scroll area which then wouldn't be accurately reflected in the final end value.
FIXED: if you define a stagger with grid: "auto" on an Array of elements that don't wrap at all (not really a grid), the last element's timing wouldn't be correct. See https://gsap.com/community/forums/topic/38536-when-scrolling-down-a-batch-the-stagger-doesnt-seem-to-work-correctly/
FIXED: if you clamp() a ScrollTrigger's start value and it would naturally (without clamping) resolve to beyond the maximum scroll position, it wouldn't get clamped. Starting values were only clamped such that they weren't allowed to be negative (focused on the top of the page only, not the bottom too).
FIXED: if you dynamically added/created a ScrollTrigger while ScrollSmoother was mid-scrub, it could lead to the scroll jumping. See https://gsap.com/community/forums/topic/37515-dynamic-scrolltrigger-with-pin-inside-a-scrollsmoother/
FIXED: if you run SplitText on text that has words separated by non-breaking spaces ( ), it wouldn't recognize that as a word delimiter. See https://gsap.com/community/forums/topic/37271-why-does-the-splitted-node-from-splittext-includes-extra-whitespace-note-only-the-node-which-is-next-tag/
FIXED: Flip.fit() is now gsap.context()-aware so that it'll revert inline styles when the context is reverted.
FIXED: regression in 3.11 that could cause transformOrigin to lose its "z" portion if you apply it in a .from() or .fromTo() tween or a context that gets reverted. See https://gsap.com/community/forums/topic/38958-rotatey-not-working-in-nuxt/
FIXED: if you call gsap.registerPlugin(Observer) multiple times, it could throw an error.
IMPROVED: on mobile devices where the address bar shows/hides and sometimes causes a jump after scrolling stops, particularly if there are multiple pins, ScrollTrigger now calculates positions based on 100vh instead of window.innerHeight because the former doesn't change whereas the latter does. This essentially avoids the "jump" in most cases (unless the elements on your page actually resize).
IMPROVED: consolidated "scroll" event listeners in ScrollTrigger so fewer are added to the main document. Functionally it makes no difference, but there is at least one synthetic test online that would [incorrectly] complain.
FIXED: regression in PixiPlugin caused an error related to filters. See #541
FIXED: regression in 3.12.0 caused ScrollTriggers that were applied to timelines inside a gsap.context() not to get reverted properly when revert() was called on the context. See https://greensock.com/forums/topic/37278-updating-to-312-3121-breaks-pinning/
FIXED: if you insert a tween/callback into a timeline at a position EARLIER than where the playhead currently is, it may not render immediately, or if it's a callback it may fire on the next render when it actually shouldn't. See https://greensock.com/forums/topic/37218-timeline-trigger-all-callbacks-with-specific-timing-when-play/
FIXED: regression in 3.12.0 caused an error in Draggable if you enable inertia and then disable() the Draggable instance. See https://greensock.com/forums/topic/37397-draggable-error-in-version-12-when-using-disable/
FIXED: regression in 3.11.0 could cause a repeating tween/timeline to render at the wrong iteration if it was reversed and then a totalTime() was set that was beyond the first iteration.
FIXED: if you revert() a gsap.context() that has a reversed animation that'd cause its startTime to be lower than -1 and it had .fromTo() tweens, the "from" revert happened out of order which might have left the starting values incorrect.
FIXED: regression in 3.12.0 could cause a ScrollTrigger's snapping to act incorrectly in a very specific scenario, like if mid-scroll the start/end values change.
FIXED: For a ScrollTrigger with a containerAnimation, a regression in 3.12.0 caused values passed into .setPositions() to be interpreted as scroll positions instead of time values. See https://greensock.com/forums/topic/36910-horizontal-scrollsmoother-with-scrolltrigger-and-anchors/#comment-185615
FIXED: Regression in 3.12.0 caused ScrollSmoother's "lag" feature not to function properly.
Read more
Read more
Read more
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs