Browse Source

[RN] Drop no longer needed polyfills

They were required only on Android because of its old JSC version. With the JSC
version bump they are no longer required.
master
Saúl Ibarra Corretgé 6 years ago
parent
commit
a1cc9bce91

+ 0
- 24
index.android.js View File

1
-// The type field of react-native application loader's React Element is created
2
-// as number and not Symbol, because it's not been defined by the polyfill yet.
3
-// We import the application renderer, before Symbol is defined, in order to use
4
-// number types as well. Otherwise this will result in the invariant exception,
5
-// because fiber thingy will not recognise root react-native component as React
6
-// Element, but as an Object.
7
-//
8
-// See node_modules/react-native/Libraries/polyfills/babelHelpers.js
9
-// :babelHelpers.createRawReactElement - that's where first react-native element
10
-// is created (super early - it's the app loader).
11
-//
12
-// See node_modules/react-native/Libraries/Renderer/ReactNativeFiber-dev.js
13
-// and look for REACT_ELEMENT_TYPE definition - it's defined later when Symbol
14
-// has been defined and type will not match.
15
-//
16
-// As an alternative solution we could stop using/polyfilling Symbols and
17
-// replace with classpath string constants or some kind of a wrapper around
18
-// that.
19
-
20
-import 'react-native/Libraries/ReactNative/renderApplication';
21
-
22
-// Android doesn't provide Symbol
23
-import 'es6-symbol/implement';
24
-
25
 import './react/index.native';
1
 import './react/index.native';
26
 
2
 

+ 4
- 0
package-lock.json View File

5727
       "version": "1.0.0",
5727
       "version": "1.0.0",
5728
       "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
5728
       "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
5729
       "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
5729
       "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
5730
+      "dev": true,
5730
       "requires": {
5731
       "requires": {
5731
         "es5-ext": "^0.10.9"
5732
         "es5-ext": "^0.10.9"
5732
       }
5733
       }
6231
       "version": "0.10.39",
6232
       "version": "0.10.39",
6232
       "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.39.tgz",
6233
       "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.39.tgz",
6233
       "integrity": "sha512-AlaXZhPHl0po/uxMx1tyrlt1O86M6D5iVaDH8UgLfgek4kXTX6vzsRfJQWC2Ku+aG8pkw1XWzh9eTkwfVrsD5g==",
6234
       "integrity": "sha512-AlaXZhPHl0po/uxMx1tyrlt1O86M6D5iVaDH8UgLfgek4kXTX6vzsRfJQWC2Ku+aG8pkw1XWzh9eTkwfVrsD5g==",
6235
+      "dev": true,
6234
       "requires": {
6236
       "requires": {
6235
         "es6-iterator": "~2.0.3",
6237
         "es6-iterator": "~2.0.3",
6236
         "es6-symbol": "~3.1.1"
6238
         "es6-symbol": "~3.1.1"
6240
       "version": "2.0.3",
6242
       "version": "2.0.3",
6241
       "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
6243
       "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
6242
       "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
6244
       "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
6245
+      "dev": true,
6243
       "requires": {
6246
       "requires": {
6244
         "d": "1",
6247
         "d": "1",
6245
         "es5-ext": "^0.10.35",
6248
         "es5-ext": "^0.10.35",
6277
       "version": "3.1.1",
6280
       "version": "3.1.1",
6278
       "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
6281
       "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
6279
       "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
6282
       "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
6283
+      "dev": true,
6280
       "requires": {
6284
       "requires": {
6281
         "d": "1",
6285
         "d": "1",
6282
         "es5-ext": "~0.10.14"
6286
         "es5-ext": "~0.10.14"

+ 0
- 2
package.json View File

36
     "@atlaskit/tooltip": "9.1.1",
36
     "@atlaskit/tooltip": "9.1.1",
37
     "@webcomponents/url": "0.7.1",
37
     "@webcomponents/url": "0.7.1",
38
     "autosize": "1.18.13",
38
     "autosize": "1.18.13",
39
-    "es6-iterator": "2.0.3",
40
-    "es6-symbol": "3.1.1",
41
     "i18next": "8.4.3",
39
     "i18next": "8.4.3",
42
     "i18next-browser-languagedetector": "2.0.0",
40
     "i18next-browser-languagedetector": "2.0.0",
43
     "i18next-xhr-backend": "1.4.2",
41
     "i18next-xhr-backend": "1.4.2",

+ 0
- 13
react/features/base/lib-jitsi-meet/native/polyfills-browser.js View File

1
-import Iterator from 'es6-iterator';
2
 import BackgroundTimer from 'react-native-background-timer';
1
 import BackgroundTimer from 'react-native-background-timer';
3
 import '@webcomponents/url'; // Polyfill for URL constructor
2
 import '@webcomponents/url'; // Polyfill for URL constructor
4
 
3
 
123
         global.removeEventListener = () => {};
122
         global.removeEventListener = () => {};
124
     }
123
     }
125
 
124
 
126
-    // Array.prototype[@@iterator]
127
-    //
128
-    // Required by:
129
-    // - for...of statement use(s) in lib-jitsi-meet
130
-    const arrayPrototype = Array.prototype;
131
-
132
-    if (typeof arrayPrototype['@@iterator'] === 'undefined') {
133
-        arrayPrototype['@@iterator'] = function() {
134
-            return new Iterator(this);
135
-        };
136
-    }
137
-
138
     // document
125
     // document
139
     //
126
     //
140
     // Required by:
127
     // Required by:

Loading…
Cancel
Save