Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [#165057751] Transpile typescript with babel #2151

Merged
merged 26 commits into from
Aug 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4c432b5
[#173888442] update react-native-webview
fabriziofff Aug 10, 2020
fdcc0cd
[#173917003] upgrade redux saga to 1.1.3
fabriziofff Aug 11, 2020
6e69575
fix all typescript errors
fabriziofff Aug 11, 2020
e67ee75
fix delay
fabriziofff Aug 11, 2020
6251333
Merge branch 'master' into 173888442-update-react-native-webview
fabriziofff Aug 11, 2020
86c2652
Merge remote-tracking branch 'origin/173888442-update-react-native-we…
fabriziofff Aug 11, 2020
4cd6405
Merge branch 'master' into 173888442-update-react-native-webview
fabriziofff Aug 11, 2020
b310136
Merge remote-tracking branch 'origin/173888442-update-react-native-we…
fabriziofff Aug 11, 2020
d07d29f
fix lint
fabriziofff Aug 11, 2020
bc5b85e
fix lint
fabriziofff Aug 11, 2020
a016436
fix saga test
fabriziofff Aug 11, 2020
8a61e00
Merge remote-tracking branch 'origin/master' into 173888442-update-re…
fabriziofff Aug 11, 2020
30a9405
Merge branch '173888442-update-react-native-webview' into 173917003-u…
fabriziofff Aug 11, 2020
c6acf45
Merge remote-tracking branch 'origin/master' into 173888442-update-re…
fabriziofff Aug 11, 2020
6a1611b
Merge branch '173888442-update-react-native-webview' into 173917003-u…
fabriziofff Aug 11, 2020
687c034
Merge branch 'master' into 173888442-update-react-native-webview
fabriziofff Aug 12, 2020
fa27668
Merge branch '173888442-update-react-native-webview' into 173917003-u…
fabriziofff Aug 12, 2020
3de8a69
[#165057751] Migrate Typescript transpile to babel
fabriziofff Aug 12, 2020
daacb06
Merge branch 'master' into 173888442-update-react-native-webview
fabriziofff Aug 13, 2020
c02550f
Merge branch '173888442-update-react-native-webview' into 173917003-u…
fabriziofff Aug 13, 2020
06316b4
Merge branch '173917003-upgrade-redux-saga' into 165057751-transpile-…
fabriziofff Aug 13, 2020
3715c31
Merge branch 'master' into 165057751-transpile-typescript-with-babel
Undermaken Aug 13, 2020
9e509b6
Merge remote-tracking branch 'origin/master' into 165057751-transpile…
fabriziofff Aug 14, 2020
26781f4
Merge remote-tracking branch 'origin/165057751-transpile-typescript-w…
fabriziofff Aug 14, 2020
e655479
Merge remote-tracking branch 'origin/master' into 165057751-transpile…
fabriziofff Aug 14, 2020
1044b75
Merge branch 'master' into 165057751-transpile-typescript-with-babel
Undermaken Aug 14, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion metro.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
module.exports = {
transformer: {
babelTransformerPath: require.resolve('react-native-typescript-transformer')
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: false
}
})
}
};
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@
"plist": "^3.0.1",
"postinstall-postinstall": "^1.0.0",
"prettier": "1.14.2",
"react-native-typescript-transformer": "^1.2.12",
"react-test-renderer": "16.13.1",
"redux-saga-test-plan": "4.0.0-rc.3",
"rn-nodeify": "^10.0.1",
Expand Down
2 changes: 1 addition & 1 deletion ts/__mocks__/react-native-keychain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* A mocked version of the Keychain
*/

type KeychainDB = {
export type KeychainDB = {
[key: string]: {
username: string;
password: string;
Expand Down
3 changes: 1 addition & 2 deletions ts/components/InstabugChatsComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import variables from "../theme/variables";
import ButtonDefaultOpacity from "./ButtonDefaultOpacity";
import CustomBadge from "./ui/CustomBadge";
import IconFont from "./ui/IconFont";
import reportType = BugReporting.reportType;

interface OwnProps {
color?: string;
Expand Down Expand Up @@ -79,7 +78,7 @@ class InstabugChatsComponent extends React.PureComponent<Props, State> {
// Register to the instabug dismiss event. (https://docs.instabug.com/docs/react-native-bug-reporting-event-handlers#section-after-dismissing-instabug)
// This event is fired when chat or bug screen is dismissed
BugReporting.onSDKDismissedHandler(
(dismiss: dismissType, _: reportType): void => {
(dismiss: dismissType, _: BugReporting.reportType): void => {
// Due an Instabug library bug, we can't use the report parameter because it always has "bug" as value.
// We need to differentiate the type of report then use instabugReportType
if (this.state.instabugReportType.isSome()) {
Expand Down
2 changes: 1 addition & 1 deletion ts/theme/fonts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const fontWeights = {

type FontFamily = keyof typeof fonts;
export type FontWeight = keyof typeof fontWeights;
const enum FontStyle {
enum FontStyle {
"normal" = "normal",
"italic" = "italic"
}
Expand Down
2 changes: 1 addition & 1 deletion ts/utils/keychain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const PIN_KEY = "PIN";
export async function setGenericPasswordWithDefaultAccessibleOption(
username: string,
password: string,
options?: Options
options?: Keychain.Options
) {
return Keychain.setGenericPassword(username, password, {
...options,
Expand Down
13 changes: 6 additions & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"compilerOptions": {
"target": "es2015",
"module": "es2015",
"target": "esnext",
"module": "commonjs",
"lib": ["es6", "dom"],
"jsx": "react",
"noEmit": true,
"moduleResolution": "node",
Expand All @@ -16,14 +17,12 @@
"noUnusedParameters": true,
"noUnusedLocals": true,
"strictFunctionTypes": true,
"skipLibCheck": true
"skipLibCheck": true,
"isolatedModules": true
},
"lib": [
"dom"
],
"exclude": [
"android",
"ios",
"node_modules"
]
}
}
27 changes: 2 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3095,7 +3095,7 @@ [email protected], chalk@^1.0.0, chalk@^1.1.3:
strip-ansi "^3.0.0"
supports-color "^2.0.0"

chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.0, chalk@^2.4.1, chalk@^2.4.2:
chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
Expand Down Expand Up @@ -3965,7 +3965,7 @@ deepmerge@^3.2.0:
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.3.0.tgz#d3c47fd6f3a93d517b14426b0628a17b0125f5f7"
integrity sha512-GRQOafGHwMHpjPx9iCvTgpu9NojZ49q794EEL94JVEw6VaeA8XTUyBKvAkOOjBX9oJNiV6G3P+T+tihFjo2TqA==

deepmerge@^4.0.0, deepmerge@^4.2.2:
deepmerge@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955"
integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==
Expand Down Expand Up @@ -4819,11 +4819,6 @@ find-cache-dir@^2.0.0:
make-dir "^2.0.0"
pkg-dir "^3.0.0"

find-root@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4"
integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==

find-up@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
Expand Down Expand Up @@ -6690,11 +6685,6 @@ jetifier@^1.6.2:
resolved "https://registry.yarnpkg.com/jetifier/-/jetifier-1.6.6.tgz#fec8bff76121444c12dc38d2dad6767c421dab68"
integrity sha512-JNAkmPeB/GS2tCRqUzRPsTOHpGDah7xP18vGJfIjZC+W2sxEHbxgJxetIjIqhjQ3yYbYNEELkM/spKLtwoOSUQ==

jju@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/jju/-/jju-1.4.0.tgz#a3abe2718af241a2b2904f84a625970f389ae32a"
integrity sha1-o6vicYryQaKykE+EpiWXDzia4yo=

"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
Expand Down Expand Up @@ -9375,19 +9365,6 @@ react-native-touch-id@^4.4.1:
resolved "https://registry.yarnpkg.com/react-native-touch-id/-/react-native-touch-id-4.4.1.tgz#8b1bb2d04c30bac36bb9696d2d723e719c4a8b08"
integrity sha512-1jTl8fC+0fxvqegy/XXTyo6vMvPhjzkoDdaqoYZx0OH8AT250NuXnNPyKktvigIcys3+2acciqOeaCall7lrvg==

react-native-typescript-transformer@^1.2.12:
version "1.2.13"
resolved "https://registry.yarnpkg.com/react-native-typescript-transformer/-/react-native-typescript-transformer-1.2.13.tgz#be92a3d110dbb2cf2f4aebe60a935be124cfb7ed"
integrity sha512-uLL6U9BirM+gKRZNKqJQW+m1onh+goiwDqG4+9XSy5dUhjmkjCkbx8j2eahie9hFcHJdnknJ6wRAEF5/7mGWmw==
dependencies:
babel-traverse "^6.26.0"
chalk "^2.4.0"
deepmerge "^4.0.0"
find-root "^1.1.0"
jju "^1.3.0"
semver "^5.4.1"
source-map "^0.5.6"

react-native-vector-icons@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-7.0.0.tgz#5b92ed363c867645daad48c559e1f99efcfbb813"
Expand Down