Skip to content

Commit

Permalink
fix: upgrade use-elapsed-time to fix an issue with reset
Browse files Browse the repository at this point in the history
  • Loading branch information
vydimitrov committed Sep 5, 2021
1 parent bfbffa1 commit ac0bdad
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Change Log

## 3.0.0 ( ---- , 2021)
## 3.0.1 (September 5th, 2021)

**Fix:**

- upgraded `use-elapsed-time` to 3.0.2, which fixes an issue where reset method was taking any kind of value as newStartAt value. Not it checks if the value provided is a number

## 3.0.0 ( September 5th , 2021)

**Breaking Changes:**

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "use-count-up",
"version": "3.0.0",
"version": "3.0.1",
"description": "React/React Native component and hook to animate counting up or down to a number",
"main": "./lib/index.js",
"module": "./lib/index.module.js",
Expand Down Expand Up @@ -51,7 +51,7 @@
},
"homepage": "https://github.com/vydimitrov/use-count-up#readme",
"dependencies": {
"use-elapsed-time": "3.0.1"
"use-elapsed-time": "3.0.2"
},
"peerDependencies": {
"react": ">=16.8.0"
Expand Down
9 changes: 3 additions & 6 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import {
ReturnValue as ETReturnValue,
Props as ETProps,
} from 'use-elapsed-time'
import { Props as ETProps } from 'use-elapsed-time'

export type ReturnValue = number | string | React.ReactNode

Expand All @@ -17,7 +14,7 @@ export interface ReturnProps {
/** Current value of the count up animation */
value: ReturnValue
/** Method to start over the animation*/
reset: ETReturnValue['reset']
reset: () => void
}

export interface Props {
Expand All @@ -42,7 +39,7 @@ export interface Props {
/** Function that formats the output value */
formatter?: (value: number) => ReturnValue
/** Update interval in seconds. Determines how often the animated value will change. When set to 0 the value will update on each key frame. Default: 0 */
updateInterval?: ETProps['updateInterval']
updateInterval?: number
/** On value update event handler. It receives the current value */
onUpdate?: (value: ReturnValue) => void
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2988,10 +2988,10 @@ urlgrey@1.0.0:
dependencies:
fast-url-parser "^1.1.3"

use-elapsed-time@3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/use-elapsed-time/-/use-elapsed-time-3.0.1.tgz#43e562d711a1779580bb7548e14619c4dcfacfa1"
integrity sha512-Z83sKnBukVIgKYQFP1xgXgL5m9OPAkJ3bw2U9ghdemsdR3Z1Ju0Mco7SPVbgcNIJ2VJgZB/nurFouDOCC4P7Ag==
use-elapsed-time@3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/use-elapsed-time/-/use-elapsed-time-3.0.2.tgz#ef22bf520e60f9873fd102925a2d5cbc5d4faaf5"
integrity sha512-2EY9lJ5DWbAvT8wWiEp6Ztnl46DjXz2j78uhWbXaz/bg3OfpbgVucCAlcN8Bih6hTJfFTdVYX9L6ySMn5py/wQ==

uuid@^8.0.0:
version "8.3.2"
Expand Down

0 comments on commit ac0bdad

Please sign in to comment.