Skip to content

Commit 02c849b

Browse files
committed
Prepare for 2.4.4 📝 ⬆️
Changelog updated, Versions updated. React to 16.2.0 Node module to 2.4.4 Gem to 2.4.4
1 parent 70add3f commit 02c849b

File tree

10 files changed

+383
-236
lines changed

10 files changed

+383
-236
lines changed

CHANGELOG.md

+26-6
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,50 @@
88

99
#### Bug Fixes
1010

11+
## 2.4.4
12+
13+
#### New Features
14+
15+
- React 16.2 prebundled #856, #874
16+
- Use Fragments instead of Divs by default #856
17+
- Explicitly support Ruby 2.5 #857
18+
- Add support for controller rendering using `camelize_props` #869
19+
- Many readme, doc and guide updates including Typescript #873, #865, #862, #854, #852, #849
20+
21+
#### Deprecation
22+
23+
- Drop explicit support for Ruby 2.1 #866
24+
- Drop explicit support for Rails 3, 4.0, 4.1 #866
25+
- If the gem continues to work on Ruby and Rails below what is in Travis, it is accidental.
26+
27+
#### Bug Fixes
28+
29+
- Correct behaviour of Turbolinks 5 mounting #868, 848
30+
- Correct behaviour of JQuery3 removing "on" #867, 762
31+
1132
## 2.4.3
33+
1234
#### Bug Fixes
35+
1336
- Call ReactDOM.render() when react_component :prerender option is falsy, instead of ReactDOM.hydrate() #844, #842
1437

1538
## 2.4.2
1639
#### Bug Fixes
40+
1741
- ReactDOM.hydrate() may not be defined for everyone, it will now use hydrate if it is defined or fallback to render #832
1842

1943
## 2.4.1
2044

21-
#### Breaking Changes
22-
2345
#### New Features
46+
2447
- Webpacker gets ES6 components by default #822
2548
- ReactDOM.hydrate() #828
2649
- Documentation updates #830
2750

2851
#### Deprecation
2952

3053
#### Bug Fixes
54+
3155
- Webpacker local manifest sometimes had double asset_hosts if the dev server was running #834 thanks @joeyparis
3256

3357
## 2.4.0
@@ -37,10 +61,6 @@
3761
- (Sprockets) Prebundled React upgraded to 16 #792
3862
- (Sprockets) Addons removed #792
3963

40-
#### New Features
41-
42-
#### Deprecation
43-
4464
#### Bug Fixes
4565

4666
- Coffeescript generator exports correctly #799, #800

VERSIONS.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ You can control what version of React.js (and JSXTransformer) is used by `react-
99

1010
| Gem | React.js |
1111
|----------|----------|
12-
| master | 16.1.1 |
12+
| master | 16.2.0 |
13+
| 2.4.4 | 16.2.0 |
1314
| 2.4.3 | 16.1.1 |
1415
| 2.4.2 | 16.1.1 |
1516
| 2.4.1 | 16.0.0 |

lib/assets/react-source/development/react-server.js

+64-8
Original file line numberDiff line numberDiff line change
@@ -2495,6 +2495,27 @@
24952495
*/
24962496
componentWillUnmount: 'DEFINE_MANY',
24972497

2498+
/**
2499+
* Replacement for (deprecated) `componentWillMount`.
2500+
*
2501+
* @optional
2502+
*/
2503+
UNSAFE_componentWillMount: 'DEFINE_MANY',
2504+
2505+
/**
2506+
* Replacement for (deprecated) `componentWillReceiveProps`.
2507+
*
2508+
* @optional
2509+
*/
2510+
UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',
2511+
2512+
/**
2513+
* Replacement for (deprecated) `componentWillUpdate`.
2514+
*
2515+
* @optional
2516+
*/
2517+
UNSAFE_componentWillUpdate: 'DEFINE_MANY',
2518+
24982519
// ==== Advanced methods ====
24992520

25002521
/**
@@ -2510,6 +2531,23 @@
25102531
updateComponent: 'OVERRIDE_BASE'
25112532
};
25122533

2534+
/**
2535+
* Similar to ReactClassInterface but for static methods.
2536+
*/
2537+
var ReactClassStaticInterface = {
2538+
/**
2539+
* This method is invoked after a component is instantiated and when it
2540+
* receives new props. Return an object to update state in response to
2541+
* prop changes. Return null to indicate no change to state.
2542+
*
2543+
* If an object is returned, its keys will be merged into the existing state.
2544+
*
2545+
* @return {object || null}
2546+
* @optional
2547+
*/
2548+
getDerivedStateFromProps: 'DEFINE_MANY_MERGED'
2549+
};
2550+
25132551
/**
25142552
* Mapping from class specification keys to special processing functions.
25152553
*
@@ -2744,6 +2782,7 @@
27442782
if (!statics) {
27452783
return;
27462784
}
2785+
27472786
for (var name in statics) {
27482787
var property = statics[name];
27492788
if (!statics.hasOwnProperty(name)) {
@@ -2760,14 +2799,25 @@
27602799
name
27612800
);
27622801

2763-
var isInherited = name in Constructor;
2764-
_invariant(
2765-
!isInherited,
2766-
'ReactClass: You are attempting to define ' +
2767-
'`%s` on your component more than once. This conflict may be ' +
2768-
'due to a mixin.',
2769-
name
2770-
);
2802+
var isAlreadyDefined = name in Constructor;
2803+
if (isAlreadyDefined) {
2804+
var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)
2805+
? ReactClassStaticInterface[name]
2806+
: null;
2807+
2808+
_invariant(
2809+
specPolicy === 'DEFINE_MANY_MERGED',
2810+
'ReactClass: You are attempting to define ' +
2811+
'`%s` on your component more than once. This conflict may be ' +
2812+
'due to a mixin.',
2813+
name
2814+
);
2815+
2816+
Constructor[name] = createMergedResultFunction(Constructor[name], property);
2817+
2818+
return;
2819+
}
2820+
27712821
Constructor[name] = property;
27722822
}
27732823
}
@@ -3077,6 +3127,12 @@
30773127
'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
30783128
spec.displayName || 'A component'
30793129
);
3130+
warning(
3131+
!Constructor.prototype.UNSAFE_componentWillRecieveProps,
3132+
'%s has a method called UNSAFE_componentWillRecieveProps(). ' +
3133+
'Did you mean UNSAFE_componentWillReceiveProps()?',
3134+
spec.displayName || 'A component'
3135+
);
30803136
}
30813137

30823138
// Reduce time spent doing lookups by setting these on the prototype.

lib/assets/react-source/development/react.js

+64-8
Original file line numberDiff line numberDiff line change
@@ -18518,6 +18518,27 @@
1851818518
*/
1851918519
componentWillUnmount: 'DEFINE_MANY',
1852018520

18521+
/**
18522+
* Replacement for (deprecated) `componentWillMount`.
18523+
*
18524+
* @optional
18525+
*/
18526+
UNSAFE_componentWillMount: 'DEFINE_MANY',
18527+
18528+
/**
18529+
* Replacement for (deprecated) `componentWillReceiveProps`.
18530+
*
18531+
* @optional
18532+
*/
18533+
UNSAFE_componentWillReceiveProps: 'DEFINE_MANY',
18534+
18535+
/**
18536+
* Replacement for (deprecated) `componentWillUpdate`.
18537+
*
18538+
* @optional
18539+
*/
18540+
UNSAFE_componentWillUpdate: 'DEFINE_MANY',
18541+
1852118542
// ==== Advanced methods ====
1852218543

1852318544
/**
@@ -18533,6 +18554,23 @@
1853318554
updateComponent: 'OVERRIDE_BASE'
1853418555
};
1853518556

18557+
/**
18558+
* Similar to ReactClassInterface but for static methods.
18559+
*/
18560+
var ReactClassStaticInterface = {
18561+
/**
18562+
* This method is invoked after a component is instantiated and when it
18563+
* receives new props. Return an object to update state in response to
18564+
* prop changes. Return null to indicate no change to state.
18565+
*
18566+
* If an object is returned, its keys will be merged into the existing state.
18567+
*
18568+
* @return {object || null}
18569+
* @optional
18570+
*/
18571+
getDerivedStateFromProps: 'DEFINE_MANY_MERGED'
18572+
};
18573+
1853618574
/**
1853718575
* Mapping from class specification keys to special processing functions.
1853818576
*
@@ -18767,6 +18805,7 @@
1876718805
if (!statics) {
1876818806
return;
1876918807
}
18808+
1877018809
for (var name in statics) {
1877118810
var property = statics[name];
1877218811
if (!statics.hasOwnProperty(name)) {
@@ -18783,14 +18822,25 @@
1878318822
name
1878418823
);
1878518824

18786-
var isInherited = name in Constructor;
18787-
_invariant(
18788-
!isInherited,
18789-
'ReactClass: You are attempting to define ' +
18790-
'`%s` on your component more than once. This conflict may be ' +
18791-
'due to a mixin.',
18792-
name
18793-
);
18825+
var isAlreadyDefined = name in Constructor;
18826+
if (isAlreadyDefined) {
18827+
var specPolicy = ReactClassStaticInterface.hasOwnProperty(name)
18828+
? ReactClassStaticInterface[name]
18829+
: null;
18830+
18831+
_invariant(
18832+
specPolicy === 'DEFINE_MANY_MERGED',
18833+
'ReactClass: You are attempting to define ' +
18834+
'`%s` on your component more than once. This conflict may be ' +
18835+
'due to a mixin.',
18836+
name
18837+
);
18838+
18839+
Constructor[name] = createMergedResultFunction(Constructor[name], property);
18840+
18841+
return;
18842+
}
18843+
1879418844
Constructor[name] = property;
1879518845
}
1879618846
}
@@ -19100,6 +19150,12 @@
1910019150
'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',
1910119151
spec.displayName || 'A component'
1910219152
);
19153+
warning(
19154+
!Constructor.prototype.UNSAFE_componentWillRecieveProps,
19155+
'%s has a method called UNSAFE_componentWillRecieveProps(). ' +
19156+
'Did you mean UNSAFE_componentWillReceiveProps()?',
19157+
spec.displayName || 'A component'
19158+
);
1910319159
}
1910419160

1910519161
// Reduce time spent doing lookups by setting these on the prototype.

0 commit comments

Comments
 (0)