-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add React Native android support (#91)
Co-authored-by: Hugo Dias <hugomrdias@gmail.com>
- Loading branch information
1 parent
c00c353
commit b2b02a5
Showing
18 changed files
with
359 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict' | ||
|
||
module.exports = { | ||
require: require.resolve('./rn-test.require.js'), | ||
runner: 'mocha', | ||
modules: [ | ||
'react-native-url-polyfill', | ||
'web-streams-polyfill', | ||
'text-encoding' | ||
], | ||
patches: [{ | ||
path: require.resolve('react-native-polyfill-globals/patches/react-native+0.63.3.patch') | ||
}] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict' | ||
|
||
const { polyfill: polyfillReadableStream } = require('react-native-polyfill-globals/src/readable-stream') | ||
const { polyfill: polyfillURL } = require('react-native-polyfill-globals/src/url') | ||
const { polyfill: polyfillEncoding } = require('react-native-polyfill-globals/src/encoding') | ||
|
||
polyfillURL() | ||
polyfillReadableStream() | ||
polyfillEncoding() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// @ts-nocheck | ||
'use strict' | ||
// @ts-ignore | ||
const { Headers, Request, Response, fetch } = require('react-native-fetch-api') | ||
|
||
/** @type {import('electron-fetch').default} */ | ||
const rnFetch = fetch | ||
/** @type {import('electron-fetch').Headers} */ | ||
const rnHeaders = Headers | ||
/** @type {import('electron-fetch').Request} */ | ||
const rnRequest = Request | ||
/** @type {import('electron-fetch').Response} */ | ||
const rnResponse = Response | ||
module.exports = rnFetch | ||
module.exports.Headers = rnHeaders | ||
module.exports.Request = rnRequest | ||
module.exports.Response = rnResponse | ||
module.exports.default = rnFetch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.