[Snyk] Upgrade countup.js from 2.0.7 to 2.8.0 #1833
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.
Snyk has created this PR to upgrade countup.js from 2.0.7 to 2.8.0.
ℹ️ 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.
The recommended version is 15 versions ahead of your current version.
The recommended version was released on a year ago.
Release notes
Package name: countup.js
Added
onStartCallback
option, useful for when scroll spy is enabled, thanks to @ cherrol !Reverted change which made "main" in package.json point to the module file, instead of the umd file. It now points again at the umd file.
When revamping the build, I tried to resolve a rollup warning that had been occurring on the build for a long time:
It occurs because of typescript's Object.assign polyfill, which uses
this
on the global scope. If you setcontext: 'window'
in the rollup config, it will silence the warning, but it will cause issues if CountUp is not run in the browser. Allowing rollup to rewrite this to undefined on just the global scope is harmless and doesn't break anything, so I reverted the change.This release doesn't change the CountUp code at all, just the distribution files - The requestAnimationFrame polyfill is no longer bundled with CountUp but served separately. The other files in dist remain the same. More details in the PR: #311
Support animation plugins: A plugin is a class instance or object passed in options for the
plugin
param that implements a render method:The plugin's render method will be called on each frame to display the formatted value instead of CountUp's.
Added new option,
onCompleteCallback
which gets called when the animation completes. You can still pass a callback to the start method, and it will override whatever is passed in the options.Make it so when scroll spy is enabled, and
scrollSpyOnce
is false, CountUp will re-animate when scrolling up, as well as down, thanks to @ paidgeuseIndianSeparators
which will format a number like "1,00,000" instead of "100,000"printValue
method to potentially fix react issueFixes #287 which was a bug where, when using smart easing and counting down, the animation would take longer than configured. It also fixed an issue which caused 2 easing cycles to run for the same scenario.
Fix window check for SSR, thanks to @ johakr
Important
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: