|
3 | 3 | <summary> |
4 | 4 | Changes that have landed in master but are not yet released. |
5 | 5 | </summary> |
6 | | - Breaking Changes: |
| 6 | +</details> |
| 7 | + |
| 8 | +## 0.4.0 (August 10, 2018) |
| 9 | +Breaking Changes: |
7 | 10 |
|
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 | +``` |
14 | 17 |
|
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. |
17 | 19 |
|
18 | | - Non-breaking Changes: |
| 20 | +* #19 - `generateProps.init()` *must* be called prior to components being imported or `generateProps()` being called. |
19 | 21 |
|
20 | | - * Generator callbacks now receive the `propName` as an argument. |
| 22 | +Non-breaking Changes: |
21 | 23 |
|
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 |
29 | 30 | }) |
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 | +``` |
35 | 36 |
|
36 | 37 | ## 0.3.0 (October 5, 2017) |
37 | 38 | * Generators are now deterministic by default. Previously, snapshot tests might break if `oneOf` or `oneOfType` were used. |
|
0 commit comments