Skip to content

Commit 16503ee

Browse files
authored
Merge pull request #812 from BookOfGreg/prebundle-the-correct-react
Prepare for 2.4.0
2 parents 2d53816 + 123b0aa commit 16503ee

File tree

10 files changed

+22452
-36141
lines changed

10 files changed

+22452
-36141
lines changed

CHANGELOG.md

+27-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,33 @@
22

33
#### Breaking Changes
44

5-
- React Deprecations for 15.4, 15.5, 15.6 in preparation for 16 handled in prebundled version
5+
#### New Features
6+
7+
#### Deprecation
8+
9+
#### Bug Fixes
10+
11+
## 2.4.0
12+
13+
#### Breaking Changes
14+
15+
- (Sprockets) Prebundled React upgraded to 16 #792
16+
- (Sprockets) Addons removed # 792
17+
18+
#### New Features
19+
20+
#### Deprecation
21+
22+
#### Bug Fixes
23+
24+
- Coffeescript generator exports correctly #799, #800
25+
- Running detector manually no longer breaks if Turbolinks is not preset #802
26+
27+
## 2.3.1
28+
29+
#### Breaking Changes
30+
31+
- React Deprecations for 15.4, 15.5, 15.6 in preparation for 16 handled in prebundled version #789, #798
632

733
#### New Features
834

README.md

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
[![Code Climate](https://img.shields.io/codeclimate/github/reactjs/react-rails.svg?style=flat-square)](https://codeclimate.com/github/reactjs/react-rails)
77
[![Test Coverage](https://img.shields.io/codeclimate/coverage/github/reactjs/react-rails.svg?style=flat-square)](https://codeclimate.com/github/reactjs/react-rails/coverage)
88

9+
Gem version 2.4.x onwards and master will no longer have React Addons.
10+
11+
If you need to make changes for the prebundled react, see the migration docs here:
12+
https://reactjs.org/blog/2016/11/16/react-v15.4.0.html
13+
https://reactjs.org/blog/2017/04/07/react-v15.5.0.html
14+
https://reactjs.org/blog/2017/06/13/react-v15.6.0.html
15+
916
`react-rails` makes it easy to use [React](http://facebook.github.io/react/) and [JSX](http://facebook.github.io/react/docs/jsx-in-depth.html) in your Ruby on Rails (3.2+) application. Learn more:
1017

1118
- React's [Getting Started guide](https://facebook.github.io/react/docs/getting-started.html)

Rakefile

+12-5
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,22 @@ def copy_react_asset(webpack_file, destination_file)
1212
FileUtils.cp(full_webpack_path, full_destination_path)
1313
end
1414

15+
# Move to `dirname` and execute `yarn {cmd}`
16+
def yarn_run_in(dirname, cmd)
17+
Dir.chdir(dirname) do
18+
`yarn #{cmd}`
19+
end
20+
end
21+
1522
namespace :react do
1623
desc 'Run the JS build process to put files in the gem source'
1724
task update: [:install, :build, :copy]
1825

26+
desc 'Install the JavaScript dependencies'
27+
task :install do
28+
yarn_run_in('react-builds', 'upgrade')
29+
end
30+
1931
desc 'Build the JS bundles with Webpack'
2032
task :build do
2133
yarn_run_in('react-builds', 'build')
@@ -29,11 +41,6 @@ namespace :react do
2941
copy_react_asset("#{environment}/react-server.js", "#{environment}/react-server.js")
3042
end
3143
end
32-
33-
desc 'Install the JavaScript dependencies'
34-
task :install do
35-
yarn_run_in('react-builds', 'upgrade')
36-
end
3744
end
3845

3946
namespace :ujs do

VERSIONS.md

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

1010
| Gem | React.js |
1111
|----------|----------|
12-
| master | 15.6.2 |
12+
| master | 16.0.0 |
13+
| 2.4.0 | 16.0.0 |
14+
| 2.3.1 | 15.6.2 | Updated Addons
1315
| 2.3.0 | 15.6.2 |
1416
| 2.2.1 | 15.4.2 |
1517
| 2.2.0 | 15.4.2 |

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

+4,579-18,303
Large diffs are not rendered by default.

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

+17,815-17,789
Large diffs are not rendered by default.

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

+2-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

+5-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/react/rails/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ module React
22
module Rails
33
# If you change this, make sure to update VERSIONS.md
44
# and republish the UJS by updating package.json and `bundle exec rake ujs:publish`
5-
VERSION = '2.3.0'
5+
VERSION = '2.4.0'
66
end
77
end

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react_ujs",
3-
"version": "2.3.1",
3+
"version": "2.4.0",
44
"description": "Rails UJS for the react-rails gem",
55
"main": "react_ujs/index.js",
66
"files": [

0 commit comments

Comments
 (0)