victory-native
Advanced tools
Comparing version 32.0.1 to 32.0.2
# VictoryNative Changelog | ||
## 32.0.1 (2019-05-18) | ||
## 32.0.2 (2019-04-01) | ||
- [#451](https://github.com/FormidableLabs/victory-native/pull/451) Updates the demo to use `react-native@~0.59.0`. Thanks @ratson | ||
- [#452](https://github.com/FormidableLabs/victory-native/pull/452) Fixes crashes with react-native-svg v7.0.0 - v9.2.3. Thanks @msand | ||
- [#456](https://github.com/FormidableLabs/victory-native/pull/456) Adds a work around for a clipPath caching issue | ||
## 32.0.1 (2019-03-18) | ||
- [#450](https://github.com/FormidableLabs/victory-native/pull/450)updates lodash to fix a security vulnerability | ||
@@ -6,0 +12,0 @@ |
@@ -7,3 +7,5 @@ import React from "react"; | ||
import { VictoryClipContainer } from "victory-core/es"; | ||
import { uniqueId } from "lodash"; | ||
export default class extends VictoryClipContainer { | ||
@@ -16,2 +18,8 @@ static defaultProps = Object.assign({}, VictoryClipContainer.defaultProps, { | ||
}); | ||
// There seems to be a caching issue with clip paths. | ||
// This is required to make clip paths update when animating | ||
componentDidUpdate() { | ||
this.clipId = uniqueId("victory-clip-"); | ||
} | ||
} |
import React from "react"; | ||
import PropTypes from "prop-types"; | ||
import { Defs, ClipPath } from "react-native-svg"; | ||
import { Defs, ClipPath, G } from "react-native-svg"; | ||
@@ -16,10 +16,14 @@ export default class VClipPath extends React.Component { | ||
const { children, clipId } = this.props; | ||
// Wrap in G not to cause exceptions in old react-native-svg | ||
// https://github.com/FormidableLabs/victory-native/issues/432#issuecomment-475927581 | ||
return ( | ||
<Defs> | ||
<ClipPath id={clipId}> | ||
{children} | ||
</ClipPath> | ||
</Defs> | ||
<G> | ||
<Defs> | ||
<ClipPath id={clipId}> | ||
{children} | ||
</ClipPath> | ||
</Defs> | ||
</G> | ||
); | ||
} | ||
} |
{ | ||
"name": "victory-native", | ||
"version": "32.0.1", | ||
"version": "32.0.2", | ||
"description": "Shared libraries and components for Victory", | ||
@@ -22,4 +22,2 @@ "main": "lib/index.js", | ||
"scripts": { | ||
"start": "./node_modules/react-native/scripts/packager.sh start --reset-cache", | ||
"demo:ios": "react-native run-ios --project-path demo/ios", | ||
"lint": "eslint test/spec/**/*.js lib/**/*.js demo/**/*.js", | ||
@@ -48,7 +46,5 @@ "test": "mocha --compilers test/compiler.js --recursive test/spec/*.js" | ||
"react": "^16.4.0", | ||
"react-dom": "^16.4.0", | ||
"react-native": "~0.56.0", | ||
"react-native": "~0.59.0", | ||
"react-native-svg": "^8.0.10", | ||
"react-native-svg-mock": "^2.0.0", | ||
"react-navigation": "^1.0.3", | ||
"react-test-renderer": "^16.4.0" | ||
@@ -55,0 +51,0 @@ }, |
@@ -52,3 +52,3 @@ # Victory Native | ||
* `victory-native@^30.0.0` requires `react-native-svg@6.1.x` or `react-native-svg@^6.5.0` | ||
* `victory-native@^30.0.0` requires `react-native-svg@6.1.x` or `react-native-svg@^6.5.0`and above | ||
* `victory-native@^0.16.2` requires `react-native-svg@6.1.x` or `react-native-svg@^6.5.0` | ||
@@ -60,16 +60,15 @@ * ~~`victory-native@~0.16.0` requires `react-native-svg@6.0.0`~~ No longer supported | ||
If you'd like to contribute to `victory-native`, you can use the local demo app to test your changes on the iOS simulator. (But if you're just getting started with `victory-native` and want to see a demo, we recommend using [victory-native-demo][victory-native-demo], as it supports Android and is simpler to set up.) | ||
If you'd like to contribute to `victory-native`, you can use the local demo app to test your changes on the iOS simulator. | ||
```sh | ||
# Install | ||
$ npm install -g react-native-cli # if you haven't already | ||
$ git clone https://github.com/FormidableLabs/victory-native | ||
$ cd victory-native | ||
$ npm install | ||
$ yarn install | ||
$ cd demo | ||
$ yarn install | ||
$ yarn start | ||
# Start the react-native packager in a terminal that will remain running | ||
$ npm start | ||
# Run the demo from a new terminal window | ||
$ npm run demo:ios | ||
$ npx react-native run-ios | ||
``` | ||
@@ -79,5 +78,2 @@ | ||
Do **not** run `npm install` in the `demo/` directory, or the packager packager will crash due to | ||
"duplicate @providesModule declarations" found in `node_modules/` and `demo/node_modules`. | ||
### Documentation | ||
@@ -84,0 +80,0 @@ |
74825
23
1298
87