From 96292d8fdeb7e36ae9e319844111c60abebf5b34 Mon Sep 17 00:00:00 2001 From: Andrii Selivanov Date: Tue, 13 Feb 2018 14:56:54 +0200 Subject: [PATCH] [project] Another solution to fix the crash. --- .babelrc | 5 +++- App.js | 5 ---- package-lock.json | 73 +++++++++++++++++++++++++++-------------------- package.json | 1 - 4 files changed, 46 insertions(+), 38 deletions(-) diff --git a/.babelrc b/.babelrc index a9ce1369e..da462ad70 100644 --- a/.babelrc +++ b/.babelrc @@ -1,3 +1,6 @@ { - "presets": ["react-native"] + "presets": ["react-native"], + "plugins": [ + "transform-async-to-generator" + ] } diff --git a/App.js b/App.js index e679b0ada..26bb2f2d6 100644 --- a/App.js +++ b/App.js @@ -4,11 +4,6 @@ import { Navigation } from 'react-native-navigation'; import configureStore from './src/config/configureStore'; import { registerScreens } from './src/screens/screens'; import { screen, appStyle, tabsStyle } from './src/global/Screens'; -import asyncToGenerator from 'async-to-generator' - -// Fix for https://github.com/Bit-Nation/BITNATION-Pangea-mobile/issues/166 -// Related with https://github.com/facebook/react-native/issues/4844 -babelHelpers.asyncToGenerator = asyncToGenerator; const store = configureStore(); registerScreens(store, Provider); diff --git a/package-lock.json b/package-lock.json index 0aadb3ac6..c56b4eb33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -601,11 +601,6 @@ "async": "2.6.0" } }, - "async-to-generator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/async-to-generator/-/async-to-generator-1.1.0.tgz", - "integrity": "sha1-HiDtMd8A7r3tk6FGlRbwNiExNMY=" - }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -994,7 +989,8 @@ "babel-plugin-jest-hoist": { "version": "22.1.0", "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.1.0.tgz", - "integrity": "sha512-Og5sjbOZc4XUI3njqwYhS6WLTlHQUJ/y5+dOqmst8eHrozYZgT4OMzAaYaxhk75c2fBVYwn7+mNEN97XDO7cOw==" + "integrity": "sha512-Og5sjbOZc4XUI3njqwYhS6WLTlHQUJ/y5+dOqmst8eHrozYZgT4OMzAaYaxhk75c2fBVYwn7+mNEN97XDO7cOw==", + "dev": true }, "babel-plugin-react-transform": { "version": "3.0.0", @@ -1659,6 +1655,7 @@ "version": "22.1.0", "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-22.1.0.tgz", "integrity": "sha512-ps2UYz7IQpP2IgZ41tJjUuUDTxJioprHXD8fi9DoycKDGNqB3nAX/ggy1S3plaQd43ktBvMS1FkkyGNoBujFpg==", + "dev": true, "requires": { "babel-plugin-jest-hoist": "22.1.0", "babel-plugin-syntax-object-rest-spread": "6.13.0" @@ -1974,7 +1971,7 @@ "babel-cli": "6.26.0", "babel-core": "6.26.0", "babel-eslint": "8.2.1", - "babel-jest": "22.1.0", + "babel-jest": "22.2.2", "babel-plugin-transform-async-to-generator": "6.24.1", "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", "babel-plugin-transform-flow-strip-types": "6.22.0", @@ -1993,12 +1990,46 @@ }, "dependencies": { "babel-jest": { - "version": "22.1.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-22.1.0.tgz", - "integrity": "sha512-5pKRFTlDr+x1JESNRd5leqvxEJk3dRwVvIXikB6Lr4BWZbBppk1Wp+BLUzxWL8tM+EYGLCWgfqkD35Sft8r8Lw==", + "version": "22.2.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-22.2.2.tgz", + "integrity": "sha512-GOutNE3jhFj5WWLd09e9+kkPwzqOSWRj1J1YslVxnKkmgKaWjfvE9k3JGMf8MJYGzEZr6dVK5bg9RWRi/2tGiQ==", "requires": { "babel-plugin-istanbul": "4.1.5", - "babel-preset-jest": "22.1.0" + "babel-preset-jest": "22.2.0" + } + }, + "babel-plugin-jest-hoist": { + "version": "22.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.2.0.tgz", + "integrity": "sha512-NwicD5n1YQaj6sM3PVULdPBDk1XdlWvh8xBeUJg3nqZwp79Vofb8Q7GOVeWoZZ/RMlMuJMMrEAgSQl/p392nLA==" + }, + "babel-preset-jest": { + "version": "22.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-22.2.0.tgz", + "integrity": "sha512-p61cPMGYlSgfNScn1yQuVnLguWE4bjhB/br4KQDMbYZG+v6ryE5Ch7TKukjA6mRuIQj1zhyou7Sbpqrh4/N6Pg==", + "requires": { + "babel-plugin-jest-hoist": "22.2.0", + "babel-plugin-syntax-object-rest-spread": "6.13.0" + } + }, + "web3": { + "version": "git+https://github.com/ethereum/web3.js.git#89b9cb9e046edf22ecac706f5d5983c6d764f84d", + "requires": { + "bignumber.js": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", + "crypto-js": "3.1.8", + "utf8": "2.1.2", + "xhr2": "0.1.4", + "xmlhttprequest": "1.8.0" + }, + "dependencies": { + "bignumber.js": { + "version": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2" + }, + "crypto-js": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.8.tgz", + "integrity": "sha1-cV8HC/YBTyrpkqmLOSkli3E/CNU=" + } } } } @@ -15058,26 +15089,6 @@ } } }, - "web3": { - "version": "git+https://github.com/ethereum/web3.js.git#89b9cb9e046edf22ecac706f5d5983c6d764f84d", - "requires": { - "bignumber.js": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2", - "crypto-js": "3.1.8", - "utf8": "2.1.2", - "xhr2": "0.1.4", - "xmlhttprequest": "1.8.0" - }, - "dependencies": { - "bignumber.js": { - "version": "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2" - }, - "crypto-js": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.8.tgz", - "integrity": "sha1-cV8HC/YBTyrpkqmLOSkli3E/CNU=" - } - } - }, "web3-provider-engine": { "version": "13.6.0", "resolved": "https://registry.npmjs.org/web3-provider-engine/-/web3-provider-engine-13.6.0.tgz", diff --git a/package.json b/package.json index 38fc4a5dd..c49b4301d 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "dependencies": { "BITNATION-Pangea-libs": "git+https://github.com/Bit-Nation/BITNATION-Pangea-libs.git#0.3.1", "assert": "^1.4.1", - "async-to-generator": "^1.1.0", "awilix": "^3.0.1", "bignumber.js": "^5.0.0", "buffer": "^4.9.1",