unicorn-demo-app 6.19.3 → 6.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unicorn-demo-app",
3
- "version": "6.19.3",
3
+ "version": "6.20.0",
4
4
  "main": "src/index.js",
5
5
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
6
6
  "license": "MIT",
package/src/demoApp.js CHANGED
@@ -128,3 +128,30 @@ Navigation.events().registerAppLaunchedListener(() => {
128
128
  registerScreens(Navigation.registerComponent.bind(Navigation));
129
129
  getDefaultScreenAndStartApp();
130
130
  });
131
+
132
+
133
+ /* Setting Intl Polyfills
134
+ This is due to lack of Intl support in Hermes engine
135
+ */
136
+
137
+ if (global.HermesInternal) {
138
+ if (Constants.isIOS) {
139
+
140
+ // Polyfills required to use Intl with Hermes engine
141
+ require('@formatjs/intl-getcanonicallocales/polyfill').default;
142
+ require('@formatjs/intl-locale/polyfill').default;
143
+ require('@formatjs/intl-pluralrules/polyfill').default;
144
+ require('@formatjs/intl-pluralrules/locale-data/en').default;
145
+ require('@formatjs/intl-numberformat/polyfill').default;
146
+ require('@formatjs/intl-numberformat/locale-data/en').default;
147
+ require('@formatjs/intl-datetimeformat/polyfill').default;
148
+ require('@formatjs/intl-datetimeformat/locale-data/en').default;
149
+ require('@formatjs/intl-datetimeformat/add-all-tz').default;
150
+ } else {
151
+ require('@formatjs/intl-getcanonicallocales/polyfill');
152
+ require('@formatjs/intl-locale/polyfill');
153
+ require('@formatjs/intl-datetimeformat/polyfill');
154
+ require('@formatjs/intl-datetimeformat/locale-data/en');
155
+ require('@formatjs/intl-datetimeformat/add-all-tz');
156
+ }
157
+ }
@@ -2,7 +2,8 @@ import _ from 'lodash';
2
2
  import React, {Component} from 'react';
3
3
  import AsyncStorage from '@react-native-community/async-storage';
4
4
  import PropTypes from 'prop-types';
5
- import {StyleSheet, FlatList, ViewPropTypes} from 'react-native';
5
+ import {StyleSheet, FlatList} from 'react-native';
6
+ import {ViewPropTypes} from 'deprecated-react-native-prop-types';
6
7
  import {Navigation} from 'react-native-navigation';
7
8
  import {gestureHandlerRootHOC} from 'react-native-gesture-handler';
8
9
  import {
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import renderer from 'react-test-renderer';
3
+
4
+ describe('AvatarScreen', () => {
5
+ let AvatarScreen;
6
+
7
+ beforeEach(() => {
8
+ AvatarScreen = require('../componentScreens/AvatarsScreen').default;
9
+ });
10
+
11
+ it('renders screen', () => {
12
+ const tree = renderer.create(<AvatarScreen/>).toJSON();
13
+ expect(tree).toMatchSnapshot();
14
+ });
15
+ });