@exodus/react-native-webview 11.26.1-exodus.30 → 11.26.1-exodus.32

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.
Files changed (96) hide show
  1. package/.all-contributorsrc +185 -0
  2. package/.circleci/config.yml +66 -0
  3. package/.eslintignore +2 -0
  4. package/.eslintrc.js +94 -0
  5. package/.flowconfig +88 -0
  6. package/.flowconfig.android +88 -0
  7. package/.gitattributes +12 -0
  8. package/.github/CODEOWNERS +1 -0
  9. package/.github/ISSUE_TEMPLATE/bug-report.md +42 -0
  10. package/.github/ISSUE_TEMPLATE/feature_request.md +30 -0
  11. package/.github/workflows/android-ci.yml +35 -0
  12. package/.github/workflows/detox.yml +20 -0
  13. package/.github/workflows/ios-ci.yml +31 -0
  14. package/.github/workflows/scripts/install-vs-features.ps1 +108 -0
  15. package/.github/workflows/stale.yml +17 -0
  16. package/.gitignore +62 -0
  17. package/.idea/.gitignore +5 -0
  18. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  19. package/.idea/misc.xml +9 -0
  20. package/.idea/modules.xml +8 -0
  21. package/.idea/react-native-webview.iml +9 -0
  22. package/.idea/vcs.xml +6 -0
  23. package/.idea/workspace.xml +104 -0
  24. package/.prettierrc.js +10 -0
  25. package/.releaserc +15 -0
  26. package/.vscode/settings.json +9 -0
  27. package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java +6 -0
  28. package/apple/RNCWebView.m +16 -1
  29. package/babel.config.js +11 -0
  30. package/bin/setup +26 -0
  31. package/docs/Contributing.md +102 -0
  32. package/docs/Custom-Android.md +222 -0
  33. package/docs/Custom-iOS.md +236 -0
  34. package/docs/Debugging.md +101 -0
  35. package/docs/Getting-Started.md +142 -0
  36. package/docs/Guide.md +613 -0
  37. package/docs/Reference.md +1639 -0
  38. package/example/.gitignore +14 -0
  39. package/example/.watchmanconfig +1 -0
  40. package/example/App.tsx +262 -0
  41. package/example/android/build.gradle +15 -0
  42. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  43. package/example/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  44. package/example/android/gradle.properties +34 -0
  45. package/example/android/gradlew +234 -0
  46. package/example/android/gradlew.bat +89 -0
  47. package/example/android/settings.gradle +12 -0
  48. package/example/app.json +20 -0
  49. package/example/assets/test.html +9 -0
  50. package/example/babel.config.js +3 -0
  51. package/example/examples/Alerts.tsx +72 -0
  52. package/example/examples/ApplePay.tsx +23 -0
  53. package/example/examples/Background.tsx +54 -0
  54. package/example/examples/Downloads.tsx +57 -0
  55. package/example/examples/Injection.tsx +161 -0
  56. package/example/examples/LocalPageLoad.tsx +16 -0
  57. package/example/examples/Messaging.tsx +63 -0
  58. package/example/examples/NativeWebpage.tsx +22 -0
  59. package/example/examples/Scrolling.tsx +68 -0
  60. package/example/examples/Uploads.tsx +69 -0
  61. package/example/index.js +9 -0
  62. package/example/ios/Podfile +8 -0
  63. package/example/ios/Podfile.lock +445 -0
  64. package/jest-setups/jest.setup.js +8 -0
  65. package/jest.config.js +184 -0
  66. package/lib/WebView.android.d.ts.map +1 -0
  67. package/lib/WebView.android.js +5 -6
  68. package/lib/WebView.d.ts.map +1 -0
  69. package/lib/WebView.ios.d.ts.map +1 -0
  70. package/lib/WebView.ios.js +3 -1
  71. package/lib/WebView.styles.d.ts.map +1 -0
  72. package/lib/WebViewNativeComponent.android.d.ts.map +1 -0
  73. package/lib/WebViewNativeComponent.ios.d.ts.map +1 -0
  74. package/lib/WebViewShared.d.ts.map +1 -0
  75. package/lib/WebViewTypes.d.ts.map +1 -0
  76. package/lib/index.d.ts.map +1 -0
  77. package/lib/validation.d.ts +4 -0
  78. package/lib/validation.d.ts.map +1 -0
  79. package/lib/validation.js +9 -0
  80. package/metro.config.js +57 -0
  81. package/package.json +1 -1
  82. package/src/WebView.android.tsx +255 -0
  83. package/src/WebView.ios.tsx +230 -0
  84. package/src/WebView.styles.ts +44 -0
  85. package/src/WebView.tsx +18 -0
  86. package/src/WebViewNativeComponent.android.ts +8 -0
  87. package/src/WebViewNativeComponent.ios.ts +8 -0
  88. package/src/WebViewShared.tsx +318 -0
  89. package/src/WebViewTypes.ts +941 -0
  90. package/src/__tests__/WebViewShared-test.js +292 -0
  91. package/src/__tests__/__snapshots__/WebViewShared-test.js.snap +13 -0
  92. package/src/__tests__/validation-test.js +39 -0
  93. package/src/index.ts +4 -0
  94. package/src/validation.ts +13 -0
  95. package/tsconfig.json +24 -0
  96. package/yarn.lock +13397 -0
@@ -0,0 +1,185 @@
1
+ {
2
+ "projectName": "react-native-webview",
3
+ "projectOwner": "react-native-webview",
4
+ "repoType": "github",
5
+ "repoHost": "https://github.com",
6
+ "files": [
7
+ "README.md"
8
+ ],
9
+ "imageSize": 100,
10
+ "commit": false,
11
+ "contributors": [
12
+ {
13
+ "login": "titozzz",
14
+ "name": "Thibault Malbranche",
15
+ "avatar_url": "https://avatars1.githubusercontent.com/u/6181446?v=4",
16
+ "profile": "https://twitter.com/titozzz",
17
+ "contributions": [
18
+ "code",
19
+ "ideas",
20
+ "review",
21
+ "doc",
22
+ "maintenance",
23
+ "test",
24
+ "infra",
25
+ "question"
26
+ ]
27
+ },
28
+ {
29
+ "login": "jamonholmgren",
30
+ "name": "Jamon Holmgren",
31
+ "avatar_url": "https://avatars3.githubusercontent.com/u/1479215?v=4",
32
+ "profile": "https://jamonholmgren.com",
33
+ "contributions": [
34
+ "code",
35
+ "ideas",
36
+ "review",
37
+ "doc",
38
+ "maintenance",
39
+ "test",
40
+ "example",
41
+ "question"
42
+ ]
43
+ },
44
+ {
45
+ "login": "andreipfeiffer",
46
+ "name": "Andrei Pfeiffer",
47
+ "avatar_url": "https://avatars1.githubusercontent.com/u/2570562?v=4",
48
+ "profile": "https://github.com/andreipfeiffer",
49
+ "contributions": [
50
+ "code",
51
+ "review",
52
+ "ideas"
53
+ ]
54
+ },
55
+ {
56
+ "login": "Salakar",
57
+ "name": "Michael Diarmid",
58
+ "avatar_url": "https://avatars0.githubusercontent.com/u/5347038?v=4",
59
+ "profile": "https://twitter.com/mikediarmid",
60
+ "contributions": [
61
+ "code",
62
+ "review",
63
+ "ideas",
64
+ "tool"
65
+ ]
66
+ },
67
+ {
68
+ "login": "smathson",
69
+ "name": "Scott Mathson",
70
+ "avatar_url": "https://avatars3.githubusercontent.com/u/932981?v=4",
71
+ "profile": "http://smathson.github.io",
72
+ "contributions": [
73
+ "code",
74
+ "doc"
75
+ ]
76
+ },
77
+ {
78
+ "login": "YangXiaomei",
79
+ "name": "Margaret",
80
+ "avatar_url": "https://avatars0.githubusercontent.com/u/8221990?v=4",
81
+ "profile": "https://github.com/YangXiaomei",
82
+ "contributions": [
83
+ "code",
84
+ "doc"
85
+ ]
86
+ },
87
+ {
88
+ "login": "jordansexton",
89
+ "name": "Jordan Sexton",
90
+ "avatar_url": "https://avatars2.githubusercontent.com/u/1173161?v=4",
91
+ "profile": "https://stylisted.com",
92
+ "contributions": [
93
+ "code",
94
+ "doc"
95
+ ]
96
+ },
97
+ {
98
+ "login": "MalcolmScruggs",
99
+ "name": "Malcolm Scruggs",
100
+ "avatar_url": "https://avatars1.githubusercontent.com/u/22333355?v=4",
101
+ "profile": "https://github.com/MalcolmScruggs",
102
+ "contributions": [
103
+ "code",
104
+ "tool",
105
+ "test"
106
+ ]
107
+ },
108
+ {
109
+ "login": "Momazo7u7",
110
+ "name": "Momazo7u7",
111
+ "avatar_url": "https://avatars0.githubusercontent.com/u/42069617?v=4",
112
+ "profile": "https://github.com/Momazo7u7",
113
+ "contributions": [
114
+ "doc"
115
+ ]
116
+ },
117
+ {
118
+ "login": "marconett",
119
+ "name": "Marco",
120
+ "avatar_url": "https://avatars1.githubusercontent.com/u/3315507?v=4",
121
+ "profile": "https://marco-nett.de",
122
+ "contributions": [
123
+ "doc"
124
+ ]
125
+ },
126
+ {
127
+ "login": "jeluard",
128
+ "name": "Julien Eluard",
129
+ "avatar_url": "https://avatars1.githubusercontent.com/u/359723?v=4",
130
+ "profile": "https://github.com/jeluard",
131
+ "contributions": [
132
+ "doc"
133
+ ]
134
+ },
135
+ {
136
+ "login": "CubeSugar",
137
+ "name": "Jian Wei",
138
+ "avatar_url": "https://avatars3.githubusercontent.com/u/3667305?v=4",
139
+ "profile": "https://github.com/CubeSugar",
140
+ "contributions": [
141
+ "code",
142
+ "doc"
143
+ ]
144
+ },
145
+ {
146
+ "login": "svbutko",
147
+ "name": "Sergei Butko",
148
+ "avatar_url": "https://avatars2.githubusercontent.com/u/14828004?v=4",
149
+ "profile": "https://www.linkedin.com/in/svbutko/",
150
+ "contributions": [
151
+ "doc"
152
+ ]
153
+ },
154
+ {
155
+ "login": "TMomemt",
156
+ "name": "TMomemt",
157
+ "avatar_url": "https://avatars3.githubusercontent.com/u/42024947?v=4",
158
+ "profile": "https://github.com/TMomemt",
159
+ "contributions": [
160
+ "code"
161
+ ]
162
+ },
163
+ {
164
+ "login": "ericlewis",
165
+ "name": "Eric Lewis",
166
+ "avatar_url": "https://avatars0.githubusercontent.com/u/674503?v=4",
167
+ "profile": "http://www.try.com",
168
+ "contributions": [
169
+ "code",
170
+ "doc"
171
+ ]
172
+ },
173
+ {
174
+ "login": "dvicory",
175
+ "name": "Daniel Vicory",
176
+ "avatar_url": "https://avatars2.githubusercontent.com/u/1542454?v=4",
177
+ "profile": "https://bzfx.net",
178
+ "contributions": [
179
+ "code",
180
+ "doc"
181
+ ]
182
+ }
183
+ ],
184
+ "contributorsPerLine": 7
185
+ }
@@ -0,0 +1,66 @@
1
+ defaults: &defaults
2
+ working_directory: ~/code
3
+ docker:
4
+ - image: cimg/node:16.13.0-browsers
5
+
6
+ version: 2
7
+ jobs:
8
+ setup:
9
+ <<: *defaults
10
+ steps:
11
+ - checkout
12
+ - restore_cache:
13
+ name: Restore node modules
14
+ keys:
15
+ - node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
16
+
17
+ - run:
18
+ name: Install dependencies
19
+ command: yarn --pure-lockfile
20
+
21
+ - save_cache:
22
+ name: Save node modules
23
+ key: node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
24
+ paths:
25
+ - node_modules
26
+
27
+ tests:
28
+ <<: *defaults
29
+ steps:
30
+ - checkout
31
+ - restore_cache:
32
+ name: Restore node modules
33
+ keys:
34
+ - node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
35
+
36
+ - run:
37
+ name: Lint checks
38
+ command: yarn ci
39
+
40
+ publish:
41
+ <<: *defaults
42
+ steps:
43
+ - checkout
44
+ - restore_cache:
45
+ name: Restore node modules
46
+ keys:
47
+ - node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
48
+
49
+ - run:
50
+ name: Publish to NPM
51
+ command: yarn ci:publish
52
+
53
+ workflows:
54
+ version: 2
55
+ ci:
56
+ jobs:
57
+ - setup
58
+ - tests:
59
+ requires:
60
+ - setup
61
+ - publish:
62
+ requires:
63
+ - tests
64
+ filters:
65
+ branches:
66
+ only: master
package/.eslintignore ADDED
@@ -0,0 +1,2 @@
1
+ lib/
2
+ babel.config.js
package/.eslintrc.js ADDED
@@ -0,0 +1,94 @@
1
+ module.exports = {
2
+ // Airbnb is the base, prettier is here so that eslint doesn't conflict with prettier
3
+ extends: ['airbnb', 'prettier', 'prettier/react', 'plugin:react-hooks/recommended'],
4
+ parser: '@typescript-eslint/parser',
5
+ plugins: ['react', 'react-native', 'import', '@typescript-eslint'],
6
+ rules: {
7
+ 'no-console': 'off',
8
+ 'no-underscore-dangle': 'off',
9
+ // Lines will be broken before binary operators
10
+ 'operator-linebreak': ['error', 'before'],
11
+ // Allow imports from dev and peer dependencies
12
+ 'import/no-extraneous-dependencies': [
13
+ 'error',
14
+ { devDependencies: true, peerDependencies: true },
15
+ ],
16
+ 'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }],
17
+ // This rule doesn't play nice with Prettier
18
+ 'react/jsx-one-expression-per-line': 'off',
19
+ // This rule doesn't play nice with Prettier
20
+ 'react/jsx-wrap-multilines': 'off',
21
+ // Remove this rule because we only destructure props, but never state
22
+ 'react/destructuring-assignment': 'off',
23
+ 'react/prop-types': 'off',
24
+ 'react/jsx-props-no-spreading': 'off',
25
+ 'react/static-property-placement': 'off',
26
+ 'react/state-in-constructor': 'off',
27
+ '@typescript-eslint/adjacent-overload-signatures': 'error',
28
+ '@typescript-eslint/array-type': [
29
+ 'error',
30
+ {
31
+ default: 'array',
32
+ },
33
+ ],
34
+ '@typescript-eslint/generic-type-naming': ['error', '^[a-zA-Z]+$'],
35
+ '@typescript-eslint/no-array-constructor': 'error',
36
+ '@typescript-eslint/no-empty-interface': 'error',
37
+ '@typescript-eslint/no-explicit-any': 'error',
38
+ '@typescript-eslint/no-extraneous-class': 'error',
39
+ '@typescript-eslint/no-inferrable-types': 'error',
40
+ '@typescript-eslint/no-misused-new': 'error',
41
+ '@typescript-eslint/no-namespace': 'error',
42
+ '@typescript-eslint/no-non-null-assertion': 'error',
43
+ '@typescript-eslint/consistent-type-assertions': [
44
+ 'error',
45
+ {
46
+ assertionStyle: 'as',
47
+ },
48
+ ],
49
+ '@typescript-eslint/no-parameter-properties': 'error',
50
+ '@typescript-eslint/no-this-alias': 'error',
51
+ '@typescript-eslint/triple-slash-reference': [
52
+ 'error',
53
+ { path: 'never', types: 'never', lib: 'never' },
54
+ ],
55
+ '@typescript-eslint/no-type-alias': [
56
+ 'error',
57
+ {
58
+ allowAliases: 'always',
59
+ allowCallbacks: 'always',
60
+ allowMappedTypes: 'always',
61
+ },
62
+ ],
63
+ '@typescript-eslint/no-unused-vars': [
64
+ 'error',
65
+ { ignoreRestSiblings: true },
66
+ ],
67
+ '@typescript-eslint/consistent-type-definitions': [
68
+ 'error',
69
+ 'interface',
70
+ ],
71
+ '@typescript-eslint/prefer-namespace-keyword': 'error',
72
+ '@typescript-eslint/type-annotation-spacing': 'error',
73
+ },
74
+ settings: {
75
+ 'import/resolver': {
76
+ node: {
77
+ extensions: [
78
+ '.js',
79
+ '.android.js',
80
+ '.ios.js',
81
+ '.jsx',
82
+ '.android.jsx',
83
+ '.ios.jsx',
84
+ '.tsx',
85
+ '.ts',
86
+ '.android.tsx',
87
+ '.android.ts',
88
+ '.ios.tsx',
89
+ '.ios.ts',
90
+ ],
91
+ },
92
+ },
93
+ },
94
+ };
package/.flowconfig ADDED
@@ -0,0 +1,88 @@
1
+ [ignore]
2
+ ; This flowconfig is forked by platform - the only difference between them is which suffix is ignored.
3
+ .*/*[.]android.js
4
+ ;.*/*[.]ios.js
5
+
6
+ ; Ignore templates for 'react-native init'
7
+ .*/local-cli/templates/.*
8
+
9
+ ; Ignore the Dangerfile
10
+ node_modules/react-native/bots/dangerfile.js
11
+
12
+ ; Ignore "BUCK" generated dirs
13
+ node_modules/react-native/\.buckd/
14
+
15
+ ; Ignore unexpected extra "@providesModule"
16
+ .*/node_modules/.*/node_modules/fbjs/.*
17
+
18
+ ; Ignore duplicate module providers
19
+ ; For RN Apps installed via npm, "Libraries" folder is inside
20
+ ; "node_modules/react-native" but in the source repo it is in the root
21
+ .*/Libraries/react-native/React.js
22
+
23
+ ; Ignore polyfills
24
+ .*/Libraries/polyfills/.*
25
+
26
+ ; Ignore metro
27
+ .*/node_modules/metro/.*
28
+
29
+ ; Ignore "config-chain"'s test folder - it has a corrupt JSON file that's tripping flow
30
+ .*/node_modules/config-chain/test/*.
31
+
32
+ ; These should not be required directly
33
+ ; require from fbjs/lib instead: require('fbjs/lib/invariant')
34
+ .*/node_modules/invariant/.*
35
+ .*/node_modules/warning/.*
36
+
37
+ [include]
38
+
39
+ [libs]
40
+ node_modules/react-native/Libraries/react-native/react-native-interface.js
41
+ node_modules/react-native/flow/
42
+ node_modules/react-native/flow-github/
43
+
44
+ [lints]
45
+
46
+ [options]
47
+ emoji=true
48
+
49
+ esproposal.optional_chaining=enable
50
+ esproposal.nullish_coalescing=enable
51
+
52
+ module.system=haste
53
+ module.system.haste.use_name_reducers=true
54
+ # keep the following in sync with server/haste/hasteImpl.js
55
+ # get basename
56
+ module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
57
+ # strip .js or .js.flow suffix
58
+ module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
59
+ # strip platform suffix
60
+ module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
61
+ module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
62
+ module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
63
+ module.system.haste.paths.blacklist=.*/__tests__/.*
64
+ module.system.haste.paths.blacklist=.*/__mocks__/.*
65
+ module.system.haste.paths.whitelist=<PROJECT_ROOT>/js/.*
66
+ module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
67
+ module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
68
+ module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
69
+ module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
70
+ ; Surpress error `Duplicate module provider` until the slimmening is done
71
+ module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Components/WebView/*.
72
+ module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Components/WKWebView/*.
73
+
74
+ munge_underscores=true
75
+
76
+ module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
77
+
78
+ suppress_type=$FlowIssue
79
+ suppress_type=$FlowFixMe
80
+ suppress_type=$FlowFixMeProps
81
+ suppress_type=$FlowFixMeState
82
+
83
+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_android\\)?_oss|react_native\\(_android\\)?_fb][a-z,_]*\\)?)\\)
84
+ suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_android\\)?_oss|react_native\\(_android\\)?_fb][a-z,_]*\\)?)\\)?:? #[0-9]+
85
+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
86
+ suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
87
+
88
+ [strict]
@@ -0,0 +1,88 @@
1
+ [ignore]
2
+ ; This flowconfig is forked by platform - the only difference between them is which suffix is ignored.
3
+ ;.*/*[.]android.js
4
+ .*/*[.]ios.js
5
+
6
+ ; Ignore templates for 'react-native init'
7
+ .*/local-cli/templates/.*
8
+
9
+ ; Ignore the Dangerfile
10
+ node_modules/react-native/bots/dangerfile.js
11
+
12
+ ; Ignore "BUCK" generated dirs
13
+ node_modules/react-native/\.buckd/
14
+
15
+ ; Ignore unexpected extra "@providesModule"
16
+ .*/node_modules/.*/node_modules/fbjs/.*
17
+
18
+ ; Ignore duplicate module providers
19
+ ; For RN Apps installed via npm, "Libraries" folder is inside
20
+ ; "node_modules/react-native" but in the source repo it is in the root
21
+ .*/Libraries/react-native/React.js
22
+
23
+ ; Ignore polyfills
24
+ .*/Libraries/polyfills/.*
25
+
26
+ ; Ignore metro
27
+ .*/node_modules/metro/.*
28
+
29
+ ; Ignore "config-chain"'s test folder - it has a corrupt JSON file that's tripping flow
30
+ .*/node_modules/config-chain/test/*.
31
+
32
+ ; These should not be required directly
33
+ ; require from fbjs/lib instead: require('fbjs/lib/invariant')
34
+ .*/node_modules/invariant/.*
35
+ .*/node_modules/warning/.*
36
+
37
+ [include]
38
+
39
+ [libs]
40
+ node_modules/react-native/Libraries/react-native/react-native-interface.js
41
+ node_modules/react-native/flow/
42
+ node_modules/react-native/flow-github/
43
+
44
+ [lints]
45
+
46
+ [options]
47
+ emoji=true
48
+
49
+ esproposal.optional_chaining=enable
50
+ esproposal.nullish_coalescing=enable
51
+
52
+ module.system=haste
53
+ module.system.haste.use_name_reducers=true
54
+ # keep the following in sync with server/haste/hasteImpl.js
55
+ # get basename
56
+ module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
57
+ # strip .js or .js.flow suffix
58
+ module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
59
+ # strip platform suffix
60
+ module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
61
+ module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
62
+ module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
63
+ module.system.haste.paths.blacklist=.*/__tests__/.*
64
+ module.system.haste.paths.blacklist=.*/__mocks__/.*
65
+ module.system.haste.paths.whitelist=<PROJECT_ROOT>/js/.*
66
+ module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
67
+ module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
68
+ module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
69
+ module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
70
+ ; Surpress error `Duplicate module provider` until the slimmening is done
71
+ module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Components/WebView/*.
72
+ module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Components/WKWebView/*.
73
+
74
+ munge_underscores=true
75
+
76
+ module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
77
+
78
+ suppress_type=$FlowIssue
79
+ suppress_type=$FlowFixMe
80
+ suppress_type=$FlowFixMeProps
81
+ suppress_type=$FlowFixMeState
82
+
83
+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_android\\)?_oss|react_native\\(_android\\)?_fb][a-z,_]*\\)?)\\)
84
+ suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native\\(_android\\)?_oss|react_native\\(_android\\)?_fb][a-z,_]*\\)?)\\)?:? #[0-9]+
85
+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
86
+ suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
87
+
88
+ [strict]
package/.gitattributes ADDED
@@ -0,0 +1,12 @@
1
+ * text=auto
2
+
3
+ *.bat text eol=crlf
4
+ *.def text eol=crlf
5
+ *.filters text eol=crlf
6
+ *.idl text eol=crlf
7
+ *.props text eol=crlf
8
+ *.ps1 text eol=crlf
9
+ *.sln text eol=crlf
10
+ *.vcxproj text eol=crlf
11
+ *.xaml text eol=crlf
12
+
@@ -0,0 +1 @@
1
+ * @titozzz @jamonholmgren
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: Bug report
3
+ about: Something is not working as expected
4
+ title: ''
5
+ labels: 'Type: bug report'
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ <!---
11
+ Hello and thank you for taking the time to report a bug.
12
+ This is a community repository, meaning that it's everyone's responsibility to address bugs and send pull requests.
13
+ Maintainers will be here to help/guide you if you have questions.
14
+ Please search in the opened issues before submitting a new one.
15
+ Issues with no activity for a long time will be closed.
16
+ --->
17
+ **Bug description:**
18
+ <!---
19
+ A clear and concise description of what the bug is.
20
+ --->
21
+
22
+ **To Reproduce:**
23
+ <!---
24
+ Here you should put a link to a repository with a reproduction of the bug
25
+ Please also describe the steps required for the bug to happen
26
+ --->
27
+
28
+ **Expected behavior:**
29
+ <!---
30
+ A clear and concise description of what you expected to happen.
31
+ --->
32
+
33
+ **Screenshots/Videos:**
34
+ <!---
35
+ If applicable, add screenshots to help explain your problem.
36
+ --->
37
+
38
+ **Environment:**
39
+ - OS:
40
+ - OS version:
41
+ - react-native version:
42
+ - react-native-webview version:
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: 'Type: feature request'
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ <!---
11
+ Hello and thank you for taking the time to report a bug.
12
+ This is a community repository, meaning that it's everyone's responsibility to address bugs and send pull requests.
13
+ Maintainers will be here to help/guide you if you have questions.
14
+ Please search in the opened issues before submitting a new one.
15
+ Issues with no activity for a long time will be closed.
16
+ --->
17
+ **Is your feature request related to a problem? If so, Please describe.**
18
+ <!---
19
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
20
+ --->
21
+
22
+ **Describe the solutions you came up with**
23
+ <!---
24
+ A clear and concise description of what you want to happen.
25
+ --->
26
+
27
+ **Additional context**
28
+ <!---
29
+ Add any other context about the feature request here.
30
+ --->
@@ -0,0 +1,35 @@
1
+ name: Android
2
+ on: [push, pull_request]
3
+ jobs:
4
+ build:
5
+ strategy:
6
+ matrix:
7
+ os: [ubuntu-latest]
8
+ runs-on: ${{ matrix.os }}
9
+ steps:
10
+ - name: Checkout
11
+ uses: actions/checkout@v2
12
+ - name: Set up Node.js
13
+ uses: actions/setup-node@v2.5.1
14
+ with:
15
+ node-version: 16
16
+ - name: Set up JDK
17
+ uses: actions/setup-java@v2.5.0
18
+ with:
19
+ distribution: temurin
20
+ java-version: 11
21
+ - name: Cache /node_modules
22
+ uses: actions/cache@v2
23
+ with:
24
+ path: node_modules
25
+ key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
26
+ - name: Install npm dependencies
27
+ run: yarn --frozen-lockfile
28
+ shell: bash
29
+ - name: Build Android test app
30
+ uses: gradle/gradle-build-action@v2.1.3
31
+ with:
32
+ gradle-version: wrapper
33
+ arguments: --no-daemon clean build check test
34
+ build-root-directory: example/android
35
+ timeout-minutes: 60
@@ -0,0 +1,20 @@
1
+ name: 'Detox CI Tests'
2
+ on: [push, pull_request]
3
+
4
+ jobs:
5
+ tests:
6
+ name: 'Running tests'
7
+ runs-on: 'macOS-latest'
8
+ steps:
9
+ - uses: actions/checkout@master
10
+ - uses: actions/setup-node@master
11
+ with:
12
+ node-version: 16
13
+ - name: Setup - Install Yarn
14
+ run: YARN_GPG=NO curl -o- -L https://yarnpkg.com/install.sh | bash
15
+ - name: Setup - Install NPM Dependencies
16
+ run: yarn --frozen-lockfile
17
+ - name: Setup - Install CocoaPods CLI
18
+ run: sudo gem install cocoapods -v 1.8.4
19
+ - name: Run tests
20
+ run: yarn ci