Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WebSocket compatibility with event-target-shim ^1.0.5 #7261

Closed
wants to merge 1 commit into from

Conversation

philikon
Copy link
Contributor

event-target-shim versions before 1.1.0 do not support taking an array for EventTarget. react-native requires ^1.0.5, so this fixes compatibility with those earlier versions.

Test Plan: ran WebSocket UIExplorer example with earlier version of event-target-shim.

@ghost
Copy link

ghost commented Apr 27, 2016

By analyzing the blame information on this pull request, we identified @satya164 and @lindskogen to be potential reviewers.

@ghost ghost added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Apr 27, 2016
philikon referenced this pull request Apr 27, 2016
Summary:- Get rid of no longer necessary WebSocket.js v WebSocketBase.js split
- Use `EventTarget(list, of, events)` as base class to auto-generate `oneventname` getters/setters that get invoked along with other event handlers
- Type annotation `any` considered harmful, especially when we can easily spell out the actual type
- Throw in some `const` goodness for free

**Test Plan:** Launch UIExplorer example app, supplied `websocket_test_server` script, and try different combinations of sending and receiving text and binary data on both iOS and Android.
Closes #6889

Differential Revision: D3184835

Pulled By: mkonicek

fb-gh-sync-id: f21707f4e97aa5a79847f5157e0a9f132a1a01cd
fbshipit-source-id: f21707f4e97aa5a79847f5157e0a9f132a1a01cd
@martinbigio
Copy link
Contributor

A few tests fail but they look unrelated.

@martinbigio
Copy link
Contributor

@facebook-github-bot ship

@philikon
Copy link
Contributor Author

Nah, that's not unrelated. Stupid mock... Let me fix.

@philikon
Copy link
Contributor Author

(It's just the test mock, so the actual code is fine.)

@ghost
Copy link

ghost commented Apr 27, 2016

@philikon updated the pull request.

@martinbigio
Copy link
Contributor

@facebook-github-bot shipit

@ghost ghost added GH Review: accepted Import Started This pull request has been imported. This does not imply the PR has been approved. and removed GH Review: review-needed labels Apr 27, 2016
@ghost
Copy link

ghost commented Apr 27, 2016

Thanks for importing. If you are an FB employee go to Phabricator to review.

@ghost ghost closed this in 8891f22 Apr 27, 2016
ptmt pushed a commit to ptmt/react-native that referenced this pull request May 9, 2016
Summary:
event-target-shim versions before 1.1.0 do not support taking an array for `EventTarget`. react-native requires `^1.0.5`, so this fixes compatibility with those earlier versions.

**Test Plan:** ran WebSocket UIExplorer example with earlier version of event-target-shim.
Closes facebook#7261

Differential Revision: D3230881

Pulled By: martinbigio

fb-gh-sync-id: 6a22d58841a4b401a200fece64d13a70043fb09a
fbshipit-source-id: 6a22d58841a4b401a200fece64d13a70043fb09a
zebulgar pushed a commit to nightingale/react-native that referenced this pull request Jun 18, 2016
Summary:
event-target-shim versions before 1.1.0 do not support taking an array for `EventTarget`. react-native requires `^1.0.5`, so this fixes compatibility with those earlier versions.

**Test Plan:** ran WebSocket UIExplorer example with earlier version of event-target-shim.
Closes facebook#7261

Differential Revision: D3230881

Pulled By: martinbigio

fb-gh-sync-id: 6a22d58841a4b401a200fece64d13a70043fb09a
fbshipit-source-id: 6a22d58841a4b401a200fece64d13a70043fb09a
samerce pushed a commit to iodine/react-native that referenced this pull request Aug 23, 2016
Summary:
event-target-shim versions before 1.1.0 do not support taking an array for `EventTarget`. react-native requires `^1.0.5`, so this fixes compatibility with those earlier versions.

**Test Plan:** ran WebSocket UIExplorer example with earlier version of event-target-shim.
Closes facebook#7261

Differential Revision: D3230881

Pulled By: martinbigio

fb-gh-sync-id: 6a22d58841a4b401a200fece64d13a70043fb09a
fbshipit-source-id: 6a22d58841a4b401a200fece64d13a70043fb09a
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants