Skip to content

Commit ffe0347

Browse files
committed
Update built UJS and publish
1 parent c001a41 commit ffe0347

File tree

6 files changed

+31
-25
lines changed

6 files changed

+31
-25
lines changed

lib/assets/javascripts/react_ujs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ module.exports = function(ujs) {
110110
} else {
111111
turbolinksClassicDeprecatedEvents.setup(ujs);
112112
}
113-
} else if ($ && typeof $.pjax === 'function') {
113+
} else if (typeof $ !== "undefined" && typeof $.pjax === 'function') {
114114
pjaxEvents.setup(ujs);
115115
} else {
116116
nativeEvents.setup(ujs);
@@ -313,7 +313,7 @@ if (typeof window !== "undefined") {
313313
// but we really need it!
314314
// We need access to this object for server rendering, and
315315
// we can't do a dynamic `require`, so we'll grab it from here:
316-
this.ReactRailsUJS = ReactRailsUJS
316+
self.ReactRailsUJS = ReactRailsUJS
317317

318318
module.exports = ReactRailsUJS
319319

react_ujs/dist/react_ujs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ module.exports = function(ujs) {
110110
} else {
111111
turbolinksClassicDeprecatedEvents.setup(ujs);
112112
}
113-
} else if ($ && typeof $.pjax === 'function') {
113+
} else if (typeof $ !== "undefined" && typeof $.pjax === 'function') {
114114
pjaxEvents.setup(ujs);
115115
} else {
116116
nativeEvents.setup(ujs);
@@ -313,7 +313,7 @@ if (typeof window !== "undefined") {
313313
// but we really need it!
314314
// We need access to this object for server rendering, and
315315
// we can't do a dynamic `require`, so we'll grab it from here:
316-
this.ReactRailsUJS = ReactRailsUJS
316+
self.ReactRailsUJS = ReactRailsUJS
317317

318318
module.exports = ReactRailsUJS
319319

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": "0.1.2",
3+
"version": "0.2.0",
44
"description": "Rails UJS for the react-rails gem",
55
"main": "index.js",
66
"repository": "reactjs/react-rails",

react_ujs/yarn.lock

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ ajv-keywords@^1.1.1:
2121
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c"
2222

2323
ajv@^4.7.0, ajv@^4.9.1:
24-
version "4.11.5"
25-
resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.5.tgz#b6ee74657b993a01dce44b7944d56f485828d5bd"
24+
version "4.11.6"
25+
resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.6.tgz#947e93049790942b2a2d60a8289b28924d39f987"
2626
dependencies:
2727
co "^4.6.0"
2828
json-stable-stringify "^1.0.1"
@@ -162,8 +162,8 @@ boom@2.x.x:
162162
hoek "2.x.x"
163163

164164
brace-expansion@^1.0.0:
165-
version "1.1.6"
166-
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9"
165+
version "1.1.7"
166+
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59"
167167
dependencies:
168168
balanced-match "^0.4.1"
169169
concat-map "0.0.1"
@@ -231,7 +231,7 @@ browserify-zlib@^0.1.4:
231231
dependencies:
232232
pako "~0.2.0"
233233

234-
buffer-shims@^1.0.0:
234+
buffer-shims@~1.0.0:
235235
version "1.0.0"
236236
resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51"
237237

@@ -557,8 +557,8 @@ forever-agent@~0.6.1:
557557
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
558558

559559
form-data@~2.1.1:
560-
version "2.1.2"
561-
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4"
560+
version "2.1.4"
561+
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1"
562562
dependencies:
563563
asynckit "^0.4.0"
564564
combined-stream "^1.0.5"
@@ -678,8 +678,8 @@ hawk@~3.1.3:
678678
sntp "1.x.x"
679679

680680
hmac-drbg@^1.0.0:
681-
version "1.0.0"
682-
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.0.tgz#3db471f45aae4a994a0688322171f51b8b91bee5"
681+
version "1.0.1"
682+
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
683683
dependencies:
684684
hash.js "^1.0.3"
685685
minimalistic-assert "^1.0.0"
@@ -1276,15 +1276,15 @@ read-pkg@^1.0.0:
12761276
path-type "^1.0.0"
12771277

12781278
"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.4, readable-stream@^2.2.6:
1279-
version "2.2.6"
1280-
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.6.tgz#8b43aed76e71483938d12a8d46c6cf1a00b1f816"
1279+
version "2.2.9"
1280+
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8"
12811281
dependencies:
1282-
buffer-shims "^1.0.0"
1282+
buffer-shims "~1.0.0"
12831283
core-util-is "~1.0.0"
12841284
inherits "~2.0.1"
12851285
isarray "~1.0.0"
12861286
process-nextick-args "~1.0.6"
1287-
string_decoder "~0.10.x"
1287+
string_decoder "~1.0.0"
12881288
util-deprecate "~1.0.1"
12891289

12901290
readdirp@^2.0.0:
@@ -1464,10 +1464,16 @@ string-width@^1.0.1, string-width@^1.0.2:
14641464
is-fullwidth-code-point "^1.0.0"
14651465
strip-ansi "^3.0.0"
14661466

1467-
string_decoder@^0.10.25, string_decoder@~0.10.x:
1467+
string_decoder@^0.10.25:
14681468
version "0.10.31"
14691469
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
14701470

1471+
string_decoder@~1.0.0:
1472+
version "1.0.0"
1473+
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.0.tgz#f06f41157b664d86069f84bdbdc9b0d8ab281667"
1474+
dependencies:
1475+
buffer-shims "~1.0.0"
1476+
14711477
stringstream@~0.0.4:
14721478
version "0.0.5"
14731479
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
@@ -1550,8 +1556,8 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0:
15501556
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
15511557

15521558
uglify-js@^2.8.5:
1553-
version "2.8.21"
1554-
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.21.tgz#1733f669ae6f82fc90c7b25ec0f5c783ee375314"
1559+
version "2.8.22"
1560+
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.22.tgz#d54934778a8da14903fa29a326fb24c0ab51a1a0"
15551561
dependencies:
15561562
source-map "~0.5.1"
15571563
yargs "~3.10.0"

test/dummy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"rails-erb-loader": "^4.0.0",
2222
"react": "^15.4.2",
2323
"react-dom": "^15.4.2",
24-
"react_ujs": "^0.1.2",
24+
"react_ujs": "^0.2.0",
2525
"sass-loader": "^6.0.3",
2626
"style-loader": "^0.16.1",
2727
"webpack": "^2.3.3",

test/dummy/yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3450,9 +3450,9 @@ react@^15.4.2:
34503450
loose-envify "^1.1.0"
34513451
object-assign "^4.1.0"
34523452

3453-
react_ujs@^0.1.2:
3454-
version "0.1.2"
3455-
resolved "https://registry.yarnpkg.com/react_ujs/-/react_ujs-0.1.2.tgz#8d3ff185d8a22d1b53c6e7a6b6362be3425e6f01"
3453+
react_ujs@^0.2.0:
3454+
version "0.2.0"
3455+
resolved "https://registry.yarnpkg.com/react_ujs/-/react_ujs-0.2.0.tgz#4eb5141e6bd1cb6a220db7154843aabbfe1b4199"
34563456

34573457
read-cache@^1.0.0:
34583458
version "1.0.0"

0 commit comments

Comments
 (0)