Skip to content

Commit 8664449

Browse files
committed
0.4.0
1 parent fdc6344 commit 8664449

File tree

2 files changed

+25
-24
lines changed

2 files changed

+25
-24
lines changed

CHANGELOG.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,36 @@
33
<summary>
44
Changes that have landed in master but are not yet released.
55
</summary>
6-
Breaking Changes:
6+
</details>
7+
8+
## 0.4.0 (August 10, 2018)
9+
Breaking Changes:
710

8-
* Default generators now produce values that match their `propName`.
9-
```js
10-
generate({ foo: PropType.string, bar: PropTypes.object })
11-
// Old: => { foo: 'string', bar: {} }
12-
// New: => { foo: 'foo', bar: { bar: 'bar' } }
13-
```
11+
* #21 - Default generators now produce values that match their `propName`.
12+
```js
13+
generate({ foo: PropType.string, bar: PropTypes.object })
14+
// Old: => { foo: 'string', bar: {} }
15+
// New: => { foo: 'foo', bar: { bar: 'bar' } }
16+
```
1417

15-
* Generator callbacks now receive `propName` as their first argument, and their definitions' argument as the second.
16-
* `generateProps.init()` *must* be called prior to components being imported or `generateProps()` being called.
18+
* #21 - Generator callbacks now receive `propName` as their first argument, and their definitions' argument as the second.
1719

18-
Non-breaking Changes:
20+
* #19 - `generateProps.init()` *must* be called prior to components being imported or `generateProps()` being called.
1921

20-
* Generator callbacks now receive the `propName` as an argument.
22+
Non-breaking Changes:
2123

22-
* Fixed: Deeply nested props wouldn't respect opts argument.
23-
```js
24-
generate({
25-
foo: PropType.shape({
26-
bar: PropType.shape({
27-
baz: PropType.string
28-
})
24+
* #17 - Fixed: Deeply nested props wouldn't respect opts argument.
25+
```js
26+
generate({
27+
foo: PropType.shape({
28+
bar: PropType.shape({
29+
baz: PropType.string
2930
})
30-
}, { optional: true })
31-
// Old: => { foo: {} }
32-
// New: => { foo: { bar: { baz: 'baz' } } }
33-
```
34-
</details>
31+
})
32+
}, { optional: true })
33+
// Old: => { foo: {} }
34+
// New: => { foo: { bar: { baz: 'baz' } } }
35+
```
3536

3637
## 0.3.0 (October 5, 2017)
3738
* Generators are now deterministic by default. Previously, snapshot tests might break if `oneOf` or `oneOfType` were used.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-generate-props",
3-
"version": "0.3.0",
3+
"version": "0.4.0",
44
"description": "Generate default props based on your React component's PropTypes",
55
"main": "dist/main.js",
66
"engines": {

0 commit comments

Comments
 (0)