Ver código fonte

fixed rn38 warning

Daniel Zlotin 7 anos atrás
pai
commit
4080aec7a6
2 arquivos alterados com 19 adições e 0 exclusões
  1. 14
    0
      playground/scripts/fixRN38.js
  2. 5
    0
      playground/scripts/quickInstall.js

+ 14
- 0
playground/scripts/fixRN38.js Ver arquivo

@@ -0,0 +1,14 @@
1
+const _ = require('lodash');
2
+const shellUtils = require('shell-utils');
3
+const fs = require('fs');
4
+
5
+function run() {
6
+  console.log('fixing RCTJSStackFrame.m to not break analysis'); //eslint-disable-line
7
+
8
+  const path = `${process.cwd()}/node_modules/react-native/React/Base/RCTJSStackFrame.h`;
9
+  const lines = String(fs.readFileSync(path)).split('\n');
10
+  lines[24] = '+ (NSArray<RCTJSStackFrame *> *)stackFramesWithDictionaries:(NSArray *)dicts;';
11
+  fs.writeFileSync(path, lines.join('\n'));
12
+}
13
+
14
+run();

+ 5
- 0
playground/scripts/quickInstall.js Ver arquivo

@@ -31,12 +31,17 @@ function hardlinkNavigation() {
31 31
   shellUtils.exec.execSync(`hardlink ../ ./node_modules/react-native-navigation/ || true`);
32 32
 }
33 33
 
34
+function fixRN38() {
35
+  shellUtils.exec.execSync(`node ./scripts/fixRN38.js`);
36
+}
37
+
34 38
 function run() {
35 39
   removeHardlinks();
36 40
   removeNodeModules();
37 41
   copyNodeModulesFromNavigation();
38 42
   installNavigation();
39 43
   ignoreReactWarnings();
44
+  fixRN38();
40 45
 }
41 46
 
42 47
 run();