Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fc7b165

Browse files
committed
2.0.2
1 parent 18a4f5b commit fc7b165

File tree

8 files changed

+22
-23
lines changed

8 files changed

+22
-23
lines changed

‎CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88

99
#### Bug Fixes
1010

11+
## 2.0.2 (April 13, 2017)
12+
13+
#### New Features
14+
15+
- Rerun events detection at any time with `ReactRailsUJS.detectEvents()` #693
16+
- Make the NPM version of `react_ujs` match the Rubygem version
17+
18+
`2.0.1` was skipped because a bad version of `react_ujs` was published to NPM.
19+
1120
## 2.0.0 (April 13, 2017)
1221

1322
#### Breaking Changes

‎Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ namespace :ujs do
7171
end
7272

7373
desc "Publish the package in ./react_ujs/ to npm as `react_ujs`"
74-
task :publish do
74+
task publish: :update do
7575
Dir.chdir("react_ujs") do
7676
`npm publish`
7777
end

‎VERSIONS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ You can control what version of React.js (and JSXTransformer) is used by `react-
1010
| Gem | React.js |
1111
|----------|----------|
1212
| master | 15.4.2 |
13+
| 2.0.2 | 15.4.2 |
1314
| 2.0.0 | 15.4.2 |
1415
| 1.11.0 | 15.4.2 |
1516
| 1.10.0 | 15.4.1 |

‎lib/assets/javascripts/react_ujs.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ var turbolinksClassicEvents = __webpack_require__(10)
117117
// see what things are globally available
118118
// and setup event handlers to those things
119119
module.exports = function(ujs) {
120-
121120
if (ujs.handleEvent) {
122121
// We're calling this a second time -- remove previous handlers
123122
turbolinksClassicEvents.teardown(ujs)
@@ -385,13 +384,9 @@ module.exports = {
385384
},
386385

387386
teardown: function(ujs) {
388-
if (ujs.jQuery) {
389-
ujs.removeEvent("ready", ujs.handleMount);
390-
} else if ('addEventListener' in window) {
391-
ujs.removeEvent('DOMContentLoaded', ujs.handleMount);
392-
} else {
393-
ujs.removeEvent('onload', ujs.handleMount);
394-
}
387+
ujs.removeEvent("ready", ujs.handleMount);
388+
ujs.removeEvent('DOMContentLoaded', ujs.handleMount);
389+
ujs.removeEvent('onload', ujs.handleMount);
395390
}
396391
}
397392

@@ -408,7 +403,7 @@ module.exports = {
408403
ujs.handleEvent('pjax:beforeReplace', ujs.handleUnmount);
409404
},
410405

411-
teardown: function() {
406+
teardown: function(ujs) {
412407
ujs.removeEvent('ready', ujs.handleMount);
413408
ujs.removeEvent('pjax:end', ujs.handleMount);
414409
ujs.removeEvent('pjax:beforeReplace', ujs.handleUnmount);

‎lib/react/rails/version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module React
22
module Rails
33
# If you change this, make sure to update VERSIONS.md
4-
# And the version hint in README.md, if needed
5-
VERSION = "2.0.0"
4+
# and republish the UJS by updating package.json and `bundle exec rake ujs:publish`
5+
VERSION = "2.0.2"
66
end
77
end

‎react_ujs/dist/react_ujs.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ var turbolinksClassicEvents = __webpack_require__(10)
117117
// see what things are globally available
118118
// and setup event handlers to those things
119119
module.exports = function(ujs) {
120-
121120
if (ujs.handleEvent) {
122121
// We're calling this a second time -- remove previous handlers
123122
turbolinksClassicEvents.teardown(ujs)
@@ -385,13 +384,9 @@ module.exports = {
385384
},
386385

387386
teardown: function(ujs) {
388-
if (ujs.jQuery) {
389-
ujs.removeEvent("ready", ujs.handleMount);
390-
} else if ('addEventListener' in window) {
391-
ujs.removeEvent('DOMContentLoaded', ujs.handleMount);
392-
} else {
393-
ujs.removeEvent('onload', ujs.handleMount);
394-
}
387+
ujs.removeEvent("ready", ujs.handleMount);
388+
ujs.removeEvent('DOMContentLoaded', ujs.handleMount);
389+
ujs.removeEvent('onload', ujs.handleMount);
395390
}
396391
}
397392

@@ -408,7 +403,7 @@ module.exports = {
408403
ujs.handleEvent('pjax:beforeReplace', ujs.handleUnmount);
409404
},
410405

411-
teardown: function() {
406+
teardown: function(ujs) {
412407
ujs.removeEvent('ready', ujs.handleMount);
413408
ujs.removeEvent('pjax:end', ujs.handleMount);
414409
ujs.removeEvent('pjax:beforeReplace', ujs.handleUnmount);

‎react_ujs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react_ujs",
3-
"version": "1.0.0",
3+
"version": "2.0.2",
44
"description": "Rails UJS for the react-rails gem",
55
"main": "index.js",
66
"repository": "reactjs/react-rails",

‎react_ujs/src/events/detect.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ var turbolinksClassicEvents = require("./turbolinksClassic")
77
// see what things are globally available
88
// and setup event handlers to those things
99
module.exports = function(ujs) {
10-
console.log(ujs.handleEvent)
1110
if (ujs.handleEvent) {
1211
// We're calling this a second time -- remove previous handlers
1312
turbolinksClassicEvents.teardown(ujs)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /