From 17d57fbeed1c643bdbdc5d4324893968ed7703bb Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 12 Mar 2020 03:59:32 -0700 Subject: [PATCH 01/70] Update pacakges and references to version Note that we don't have typings for 0.62 yet, so we explicitly allow typings for 0.61 until it's out. --- .ado/windows-vs-pr.yml | 2 +- packages/E2ETest/package.json | 8 +- .../package.json | 8 +- packages/playground/package.json | 8 +- packages/react-native-win32/package.json | 8 +- .../package.json | 10 +- vnext/package.json | 8 +- yarn.lock | 601 ++++++++++-------- 8 files changed, 345 insertions(+), 308 deletions(-) diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index a568dbe2d41..50235028f87 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -469,7 +469,7 @@ jobs: language: $(language) configuration: $(configuration) platform: $(platform) - version: 0.61.5 + version: 0.62.0-rc.3 vsComponents: $(VsComponents) - job: RNWExtraChecks diff --git a/packages/E2ETest/package.json b/packages/E2ETest/package.json index 0c6d08ea1c1..42409ca110f 100644 --- a/packages/E2ETest/package.json +++ b/packages/E2ETest/package.json @@ -23,9 +23,9 @@ }, "dependencies": { "react": "16.9.0", - "react-native": "0.61.5", - "react-native-windows": "0.61.0-beta.55", - "react-native-windows-extended": "0.61.0-beta.66", + "react-native": "0.62.0-rc.3", + "react-native-windows": "0.0.0-master.1", + "react-native-windows-extended": "0.0.0-master.1", "rnpm-plugin-windows": "^0.5.1-0" }, "devDependencies": { @@ -34,7 +34,7 @@ "@types/jasmine": "2.8.7", "@types/node": "^10.14.8", "@types/react": "16.9.0", - "@types/react-native": "~0.61.5", + "@types/react-native": "~0.62.0-0 || ~0.61.5", "@wdio/appium-service": "5.12.1", "@wdio/cli": "5.12.1", "@wdio/dot-reporter": "5.12.1", diff --git a/packages/microsoft-reactnative-sampleapps/package.json b/packages/microsoft-reactnative-sampleapps/package.json index 7407030f465..fc47dd55707 100644 --- a/packages/microsoft-reactnative-sampleapps/package.json +++ b/packages/microsoft-reactnative-sampleapps/package.json @@ -15,16 +15,16 @@ }, "dependencies": { "react": "16.9.0", - "react-native": "0.61.5", - "react-native-windows": "0.61.0-beta.55", - "react-native-windows-extended": "0.61.0-beta.66", + "react-native": "0.62.0-rc.3", + "react-native-windows": "0.0.0-master.1", + "react-native-windows-extended": "0.0.0-master.1", "rnpm-plugin-windows": "^0.5.1-0" }, "devDependencies": { "@babel/core": "7.5.5", "@babel/runtime": "7.5.5", "@types/react": "16.9.0", - "@types/react-native": "~0.61.5", + "@types/react-native": "~0.62.0-0 || ~0.61.5", "just-scripts": "^0.36.1", "metro-react-native-babel-preset": "0.55.0", "react-test-renderer": "16.8.6" diff --git a/packages/playground/package.json b/packages/playground/package.json index c10d0b02e0c..6a5661647ce 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -13,16 +13,16 @@ }, "dependencies": { "react": "16.9.0", - "react-native": "0.61.5", - "react-native-windows": "0.61.0-beta.55", - "react-native-windows-extended": "0.61.0-beta.66", + "react-native": "0.62.0-rc.3", + "react-native-windows": "0.0.0-master.1", + "react-native-windows-extended": "0.0.0-master.1", "rnpm-plugin-windows": "^0.5.1-0" }, "devDependencies": { "@babel/core": "7.5.5", "@babel/runtime": "7.5.5", "@types/react": "16.9.0", - "@types/react-native": "~0.61.5", + "@types/react-native": "~0.62.0-0 || ~0.61.5", "just-scripts": "^0.36.1", "metro-react-native-babel-preset": "0.55.0", "react-test-renderer": "16.8.6" diff --git a/packages/react-native-win32/package.json b/packages/react-native-win32/package.json index b3f9c00f3f2..bc754fdc3c2 100644 --- a/packages/react-native-win32/package.json +++ b/packages/react-native-win32/package.json @@ -1,6 +1,6 @@ { "name": "@office-iss/react-native-win32", - "version": "0.61.0-beta.14", + "version": "0.0.0-master.1", "description": "Implementation of react native on top of Office's Win32 platform.", "license": "MIT", "main": "./Libraries/react-native/react-native-implementation.win32.js", @@ -49,19 +49,19 @@ "@types/node": "^12.11.2", "@types/prop-types": "15.5.1", "@types/react": "16.9.0", - "@types/react-native": "~0.61.5", + "@types/react-native": "~0.62.0-0 || ~0.61.5", "flow-bin": "^0.105.0", "jscodeshift": "^0.6.2", "just-scripts": "^0.36.1", "react": "16.9.0", "react-native-windows-override-tools": "^0.0.1", - "react-native": "0.61.5", + "react-native": "0.62.0-rc.3", "rimraf": "^3.0.0" }, "peerDependencies": { "react": "16.9.0", "react-dom": "16.8.6", - "react-native": "0.61.5" + "react-native": "0.62.0-rc.3" }, "beachball": { "defaultNpmTag": "beta", diff --git a/packages/react-native-windows-extended/package.json b/packages/react-native-windows-extended/package.json index d573651c1bd..dea134ca2e6 100644 --- a/packages/react-native-windows-extended/package.json +++ b/packages/react-native-windows-extended/package.json @@ -1,6 +1,6 @@ { "name": "react-native-windows-extended", - "version": "0.61.0-beta.66", + "version": "0.0.0-master.1", "description": "Additional react-native-windows components that are not part of RN lean-core.", "main": "lib/index.js", "repository": { @@ -18,14 +18,14 @@ "license": "MIT", "private": false, "dependencies": { - "react-native-windows": "0.61.0-beta.55" + "react-native-windows": "0.0.0-master.1" }, "devDependencies": { "@react-native-community/eslint-config": "^0.0.5", "@types/es6-collections": "^0.5.29", "@types/es6-promise": "0.0.32", "@types/react": "16.9.0", - "@types/react-native": "~0.61.5", + "@types/react-native": "~0.62.0-0 || ~0.61.5", "@typescript-eslint/eslint-plugin": "^1.5.0", "@typescript-eslint/parser": "^1.5.0", "clang-format": "1.2.4", @@ -34,12 +34,12 @@ "just-scripts": "^0.36.1", "prettier": "1.13.6", "react": "16.9.0", - "react-native": "0.61.5", + "react-native": "0.62.0-rc.3", "typescript": "3.5.3" }, "peerDependencies": { "react": "16.9.0", - "react-native": "0.61.5" + "react-native": "0.62.0-rc.3" }, "beachball": { "defaultNpmTag": "beta", diff --git a/vnext/package.json b/vnext/package.json index 34ef33e870c..e606773376c 100644 --- a/vnext/package.json +++ b/vnext/package.json @@ -1,6 +1,6 @@ { "name": "react-native-windows", - "version": "0.61.0-beta.55", + "version": "0.0.0-master.1", "license": "MIT", "repository": { "type": "git", @@ -45,7 +45,7 @@ "@types/es6-promise": "0.0.32", "@types/ora": "^3.2.0", "@types/react": "16.9.0", - "@types/react-native": "~0.61.5", + "@types/react-native": "~0.62.0-0 || ~0.61.5", "eslint": "5.1.0", "eslint-plugin-prettier": "2.6.2", "flow-bin": "^0.105.0", @@ -54,12 +54,12 @@ "prettier": "1.17.0", "react": "16.9.0", "react-native-windows-override-tools": "^0.0.1", - "react-native": "0.61.5", + "react-native": "0.62.0-rc.3", "typescript": "3.5.3" }, "peerDependencies": { "react": "16.9.0", - "react-native": "0.61.5" + "react-native": "0.62.0-rc.3" }, "beachball": { "defaultNpmTag": "beta", diff --git a/yarn.lock b/yarn.lock index 338a547eb7b..6b52dd8fbdc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -59,7 +59,7 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.0.0", "@babel/generator@^7.4.0", "@babel/generator@^7.5.5", "@babel/generator@^7.8.4": +"@babel/generator@^7.4.0", "@babel/generator@^7.5.5", "@babel/generator@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.4.tgz#35bbc74486956fe4251829f9f6c48330e8d0985e" integrity sha512-PwhclGdRpNAf3IxZb0YVuITPZmmrXz9zf6fH8lT4XbrmfQKr6ryBzhv593P5C6poJRciFCL/eHGW2NuGrgEyxA== @@ -69,6 +69,16 @@ lodash "^4.17.13" source-map "^0.5.0" +"@babel/generator@^7.5.0": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.7.tgz#870b3cf7984f5297998152af625c4f3e341400f7" + integrity sha512-DQwjiKJqH4C3qGiyQCAExJHoZssn49JTMJgZ8SANGgVFdkupcUhLOdkAeoC6kmHZCPfoDG5M0b6cFlSN5wW7Ew== + dependencies: + "@babel/types" "^7.8.7" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + "@babel/generator@^7.8.6": version "7.8.6" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.6.tgz#57adf96d370c9a63c241cd719f9111468578537a" @@ -785,6 +795,15 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-typescript" "^7.8.3" +"@babel/plugin-transform-typescript@^7.5.0": + version "7.8.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.8.7.tgz#48bccff331108a7b3a28c3a4adc89e036dc3efda" + integrity sha512-7O0UsPQVNKqpHeHLpfvOG4uXmlw+MOxYvUv6Otc9uH5SYMIxvF6eBdjkWvC3f9G+VXe0RsNExyAQBeTRug/wqQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.8.3" + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-typescript" "^7.8.3" + "@babel/plugin-transform-unicode-regex@^7.0.0", "@babel/plugin-transform-unicode-regex@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz#0cef36e3ba73e5c57273effb182f46b91a1ecaad" @@ -1236,6 +1255,16 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^13.0.0" +"@jest/types@^25.1.0": + version "25.1.0" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.1.0.tgz#b26831916f0d7c381e11dbb5e103a72aed1b4395" + integrity sha512-VpOtt7tCrgvamWZh1reVsGADujKigBUFTi19mlRjqEGsE8qH4r3s+skY33dNdXOwyZIvuftZ5tqdF1IgsMejMA== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^1.1.1" + "@types/yargs" "^15.0.0" + chalk "^3.0.0" + "@jimp/bmp@^0.5.4": version "0.5.4" resolved "https://registry.yarnpkg.com/@jimp/bmp/-/bmp-0.5.4.tgz#b7b375aa774f26154912569864d5466e71333ef1" @@ -2569,61 +2598,67 @@ command-line-args "^5.0.2" command-line-usage "^5.0.5" -"@react-native-community/cli-debugger-ui@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-3.0.0.tgz#d01d08d1e5ddc1633d82c7d84d48fff07bd39416" - integrity sha512-m3X+iWLsK/H7/b7PpbNO33eQayR/+M26la4ZbYe1KRke5Umg4PIWsvg21O8Tw4uJcY8LA5hsP+rBi/syBkBf0g== +"@react-native-community/cli-debugger-ui@^4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-4.2.1.tgz#da22aa1cf8d04fe1aa2759873916473e81c4450b" + integrity sha512-/lvb39Pgo7bM9rsJ2aMomM7jCGWRpnO2iLECJz1ehC49Fblbosh3qtTsg9WWEVTHoY/34GhaQ7EzQxdSfH8pwg== dependencies: serve-static "^1.13.1" -"@react-native-community/cli-platform-android@^3.0.0": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-3.0.3.tgz#e652abce79a7c1e3a8280228123e99df2c4b97b6" - integrity sha512-rNO9DmRiVhB6aP2DVUjEJv7ecriTARDZND88ny3xNVUkrD1Y+zwF6aZu3eoT52VXOxLCSLiJzz19OiyGmfqxYg== +"@react-native-community/cli-platform-android@^4.2.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-4.3.0.tgz#905061bca89f8daa85825b04f977c0c120bc74f4" + integrity sha512-X/EnLJvyU5Mvm7KIG6aOSA0tH6UC7xWvaQIjmbtba7wm8ZgAbrvnTK1JeAqiZ0Fw+wpPfZRvrR61gZBlVIq8ew== dependencies: - "@react-native-community/cli-tools" "^3.0.0" - chalk "^2.4.2" + "@react-native-community/cli-tools" "^4.2.2" + chalk "^3.0.0" execa "^1.0.0" + fs-extra "^8.1.0" + glob "^7.1.3" jetifier "^1.6.2" + lodash "^4.17.15" logkitty "^0.6.0" slash "^3.0.0" xmldoc "^1.1.2" -"@react-native-community/cli-platform-ios@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-3.0.0.tgz#3a48a449c0c33af3b0b3d19d3256de99388fe15f" - integrity sha512-QoNVlDj8eMXRZk9uktPFsctHurQpv9jKmiu6mQii4NEtT2npE7g1hbWpRNojutBsfgmCdQGDHd9uB54eeCnYgg== +"@react-native-community/cli-platform-ios@^4.2.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-4.3.0.tgz#337f7a87d30e8fb5f4240ab85833adc27e50a480" + integrity sha512-MxBut+/xkh86OYFOggGrQuPb/uRtU5egs48VY+gU/2Aubhza7/q+12Vr2Oxu+wb5VNQWGLlYYquMSorIuRj7Bw== dependencies: - "@react-native-community/cli-tools" "^3.0.0" - chalk "^2.4.2" + "@react-native-community/cli-tools" "^4.2.2" + chalk "^3.0.0" + glob "^7.1.3" js-yaml "^3.13.1" + lodash "^4.17.15" + plist "^3.0.1" xcode "^2.0.0" -"@react-native-community/cli-tools@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-3.0.0.tgz#fe48b80822ed7e49b8af051f9fe41e22a2a710b1" - integrity sha512-8IhQKZdf3E4CR8T7HhkPGgorot/cLkRDgneJFDSWk/wCYZAuUh4NEAdumQV7N0jLSMWX7xxiWUPi94lOBxVY9g== +"@react-native-community/cli-tools@^4.2.2": + version "4.2.2" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-4.2.2.tgz#953354bc4d14afa76483cdd097a18407016dab34" + integrity sha512-soo2GKb7cZNLy2uWN0TUeww+N1YTBfu7rk5ujLOXzFd+XxfpJTK9/HQ3RjHLsuA+aV8nlx8SmaielgxfKFPePQ== dependencies: - chalk "^2.4.2" - lodash "^4.17.5" + chalk "^3.0.0" + lodash "^4.17.15" mime "^2.4.1" node-fetch "^2.5.0" -"@react-native-community/cli-types@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-3.0.0.tgz#488d46605cb05e88537e030f38da236eeda74652" - integrity sha512-ng6Tm537E/M42GjE4TRUxQyL8sRfClcL7bQWblOCoxPZzJ2J3bdALsjeG3vDnVCIfI/R0AeFalN9KjMt0+Z/Zg== +"@react-native-community/cli-types@^4.3.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-4.3.0.tgz#800ef014b6cb41bed18c4bde3f6eb617792038d1" + integrity sha512-Rod6orUUvFy9SpDM+zTL96AWjAQyEr2611K8jZ1lxSH1lrYiXUy/PjMojIVt1M6hG2URcUcPFScWkB9l4n1Siw== -"@react-native-community/cli@^3.0.0": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-3.0.4.tgz#a9dba1bc77855a6e45fccaabb017360645d936bb" - integrity sha512-kt+ENtC+eRUSfWPbbpx3r7fAQDcFwgM03VW/lBdVAUjkNxffPFT2GGdK23CJSBOXTjRSiGuwhvwH4Z28PdrlRA== +"@react-native-community/cli@^4.2.0": + version "4.3.0" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-4.3.0.tgz#5a44a6dd550c92e2260b96f40b91ef6327adc2d3" + integrity sha512-izQ0BAm/kuPaApcT3BCOEp0t82Q1naKd6GAix67NnsXsJupCbu6kJssKJM1kCjyoZrZGeUv6mjxO2GiR5u+2lA== dependencies: "@hapi/joi" "^15.0.3" - "@react-native-community/cli-debugger-ui" "^3.0.0" - "@react-native-community/cli-tools" "^3.0.0" - "@react-native-community/cli-types" "^3.0.0" - chalk "^2.4.2" + "@react-native-community/cli-debugger-ui" "^4.2.1" + "@react-native-community/cli-tools" "^4.2.2" + "@react-native-community/cli-types" "^4.3.0" + chalk "^3.0.0" command-exists "^1.2.8" commander "^2.19.0" compression "^1.7.1" @@ -2634,22 +2669,21 @@ errorhandler "^1.5.0" execa "^1.0.0" find-up "^4.1.0" - fs-extra "^7.0.1" - glob "^7.1.1" + fs-extra "^8.1.0" + glob "^7.1.3" graceful-fs "^4.1.3" inquirer "^3.0.6" - lodash "^4.17.5" - metro "^0.56.0" - metro-config "^0.56.0" - metro-core "^0.56.0" - metro-react-native-babel-transformer "^0.56.0" + leven "^3.1.0" + lodash "^4.17.15" + metro "^0.58.0" + metro-config "^0.58.0" + metro-core "^0.58.0" + metro-react-native-babel-transformer "^0.58.0" minimist "^1.2.0" mkdirp "^0.5.1" - morgan "^1.9.0" - node-notifier "^5.2.1" open "^6.2.0" ora "^3.4.0" - plist "^3.0.0" + pretty-format "^25.1.0" semver "^6.3.0" serve-static "^1.13.1" shell-quote "1.6.1" @@ -2858,10 +2892,10 @@ resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.5.1.tgz#1ecf52621299e65b855374337fb11fd2d1066fc1" integrity sha1-Hs9SYhKZ5luFU3Qzf7Ef0tEGb8E= -"@types/react-native@~0.61.5": - version "0.61.19" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.61.19.tgz#5cbb692640b3b3dbdd82b37204b059141eda7236" - integrity sha512-A6M+t/8gDFe5rF7DoFDCLEfadturcgV4NCrXc64W/luLxNpR3WGMEKsK1EeR0/OmOfMyS4rQTH5nAhl4iaQ+KA== +"@types/react-native@~0.62.0-0 || ~0.61.5": + version "0.61.21" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.61.21.tgz#7b698d1a1a1b9f108af2573b931f3d57e66e8479" + integrity sha512-wdA3owsYZ0/eSBji12uh4rqRYfRWlQ3PNI1D5+cmpTfr5/+mdH1WXfFAcM+ncD+zUQW6EmyizHmjT+S31EmjNg== dependencies: "@types/react" "*" @@ -2898,7 +2932,7 @@ dependencies: "@types/yargs-parser" "*" -"@types/yargs@^15.0.3": +"@types/yargs@^15.0.0", "@types/yargs@^15.0.3": version "15.0.4" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.4.tgz#7e5d0f8ca25e9d5849f2ea443cf7c402decd8299" integrity sha512-9T1auFmbPZoxHz0enUFlUuKRy3it01R+hlggyVUMtnCTQRunsQYifnSGb8hET4Xo8yiC0o0r1paW3ud5+rbURg== @@ -3195,6 +3229,11 @@ ajv@^6.0.1, ajv@^6.5.0, ajv@^6.5.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +anser@^1.4.9: + version "1.4.9" + resolved "https://registry.yarnpkg.com/anser/-/anser-1.4.9.tgz#1f85423a5dcf8da4631a341665ff675b96845760" + integrity sha512-AI+BjTeGt2+WFk4eWcqbQ7snZpDBt8SaLlj0RT2h5xfdWaiy51OjYvqwMrNzJLGy8iOAL6nKDITWO+rd4MkYEA== + ansi-colors@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" @@ -4287,7 +4326,7 @@ babel-plugin-syntax-trailing-function-commas@^7.0.0-beta.0: resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-7.0.0-beta.0.tgz#aa213c1435e2bffeb6fca842287ef534ad05d5cf" integrity sha512-Xj9XuRuz3nTSbaTXWv3itLOcxyF4oPD8douBBmj7U9BBC6nEBYfyOJYQMf/8PJAFotC62UY5dFfIGEPr7WswzQ== -babel-preset-fbjs@^3.1.2, babel-preset-fbjs@^3.2.0: +babel-preset-fbjs@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-3.2.0.tgz#c0e6347d3e0379ed84b3c2434d3467567aa05297" integrity sha512-5Jo+JeWiVz2wHUUyAlvb/sSYnXNig9r+HqGAOSfh5Fzxp7SnAaR/tEGRJ1ZX7C77kfk82658w6R5Z+uPATTD9g== @@ -4320,6 +4359,39 @@ babel-preset-fbjs@^3.1.2, babel-preset-fbjs@^3.2.0: "@babel/plugin-transform-template-literals" "^7.0.0" babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" +babel-preset-fbjs@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/babel-preset-fbjs/-/babel-preset-fbjs-3.3.0.tgz#a6024764ea86c8e06a22d794ca8b69534d263541" + integrity sha512-7QTLTCd2gwB2qGoi5epSULMHugSVgpcVt5YAeiFO9ABLrutDQzKfGwzxgZHLpugq8qMdg/DhRZDZ5CLKxBkEbw== + dependencies: + "@babel/plugin-proposal-class-properties" "^7.0.0" + "@babel/plugin-proposal-object-rest-spread" "^7.0.0" + "@babel/plugin-syntax-class-properties" "^7.0.0" + "@babel/plugin-syntax-flow" "^7.0.0" + "@babel/plugin-syntax-jsx" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + "@babel/plugin-transform-arrow-functions" "^7.0.0" + "@babel/plugin-transform-block-scoped-functions" "^7.0.0" + "@babel/plugin-transform-block-scoping" "^7.0.0" + "@babel/plugin-transform-classes" "^7.0.0" + "@babel/plugin-transform-computed-properties" "^7.0.0" + "@babel/plugin-transform-destructuring" "^7.0.0" + "@babel/plugin-transform-flow-strip-types" "^7.0.0" + "@babel/plugin-transform-for-of" "^7.0.0" + "@babel/plugin-transform-function-name" "^7.0.0" + "@babel/plugin-transform-literals" "^7.0.0" + "@babel/plugin-transform-member-expression-literals" "^7.0.0" + "@babel/plugin-transform-modules-commonjs" "^7.0.0" + "@babel/plugin-transform-object-super" "^7.0.0" + "@babel/plugin-transform-parameters" "^7.0.0" + "@babel/plugin-transform-property-literals" "^7.0.0" + "@babel/plugin-transform-react-display-name" "^7.0.0" + "@babel/plugin-transform-react-jsx" "^7.0.0" + "@babel/plugin-transform-shorthand-properties" "^7.0.0" + "@babel/plugin-transform-spread" "^7.0.0" + "@babel/plugin-transform-template-literals" "^7.0.0" + babel-plugin-syntax-trailing-function-commas "^7.0.0-beta.0" + babel-preset-jest@^24.9.0: version "24.9.0" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz#192b521e2217fb1d1f67cf73f70c336650ad3cdc" @@ -4935,15 +5007,6 @@ cli-width@^2.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - cliui@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" @@ -5587,7 +5650,7 @@ cyclist@~0.2.2: resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" integrity sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA= -d@1: +d@1, d@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== @@ -5684,7 +5747,7 @@ decamelize-keys@^1.0.0: decamelize "^1.1.0" map-obj "^1.0.0" -decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: +decamelize@^1.1.0, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -6085,6 +6148,14 @@ es6-promisify@^6.0.0: resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-6.0.2.tgz#525c23725b8510f5f1f2feb5a1fbad93a93e29b4" integrity sha512-eO6vFm0JvqGzjWIQA6QVKjxpmELfhWbDUWHm1rPfIbn55mhKPiAa5xpLmQWJrNa629ZIeQ8ZvMAi13kvrjK6Mg== +es6-symbol@^3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + es6-symbol@^3.1.1, es6-symbol@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" @@ -6188,6 +6259,13 @@ eslint-plugin-react@7.12.4, eslint-plugin-react@^7.14.1: string.prototype.matchall "^4.0.2" xregexp "^4.3.0" +eslint-plugin-relay@1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-relay/-/eslint-plugin-relay-1.4.1.tgz#5af2ac13e24bd01ad17b6a4014204918d65021cd" + integrity sha512-yb+p+4AxZTi2gXN7cZRfXMBFlRa5j6TtiVeq3yHXyy+tlgYNpxi/dDrP1+tcUTNP9vdaJovnfGZ5jp6kMiH9eg== + dependencies: + graphql "^14.0.0" + eslint-scope@3.7.1: version "3.7.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" @@ -6324,19 +6402,6 @@ exec-sh@^0.3.2: resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.2.tgz#6738de2eb7c8e671d0366aea0b0db8c6f7d7391b" integrity sha512-9sLAvzhI5nc8TpuQUh4ahMdCrWT00wPWz7j47/emR5+2qEfoZP5zzUXvx+vdx+H6ohhnsYC31iX04QLYJK8zTg== -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - execa@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01" @@ -6434,6 +6499,13 @@ express@^4.16.2: utils-merge "1.0.1" vary "~1.1.2" +ext@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" + integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== + dependencies: + type "^2.0.0" + extend-shallow@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-1.1.4.tgz#19d6bf94dfc09d76ba711f39b872d21ff4dd9071" @@ -7218,6 +7290,13 @@ grapheme-splitter@^1.0.2: resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== +graphql@^14.0.0: + version "14.6.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.6.0.tgz#57822297111e874ea12f5cd4419616930cd83e49" + integrity sha512-VKzfvHEKybTKjQVpTFrA5yUq2S9ihcZvfJAtsDBBCuV6wauPu1xl/f9ehgVf0FcEJJs4vz6ysb/ZMkGigQZseg== + dependencies: + iterall "^1.2.2" + growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -7317,10 +7396,10 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hermes-engine@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/hermes-engine/-/hermes-engine-0.2.1.tgz#25c0f1ff852512a92cb5c5cc47cf967e1e722ea2" - integrity sha512-eNHUQHuadDMJARpaqvlCZoK/Nitpj6oywq3vQ3wCwEsww5morX34mW5PmKWQTO7aU0ck0hgulxR+EVDlXygGxQ== +hermes-engine@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/hermes-engine/-/hermes-engine-0.4.0.tgz#ea3113d472871ca4791f2d75d9f68b25d82ef92c" + integrity sha512-7AO/K64GuVtcpUwUKDxyQXFN45RlqWrMIPMte6AeegMQMBh+MWuMU6ZOw8Jc7FGtsgiRqJRp+UX4+4UrFQXJ/A== hosted-git-info@^2.1.4, hosted-git-info@^2.7.1: version "2.8.4" @@ -7638,11 +7717,6 @@ invariant@^2.2.2, invariant@^2.2.4: dependencies: loose-envify "^1.0.0" -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - invert-kv@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" @@ -8039,6 +8113,11 @@ istanbul-reports@^2.2.6: dependencies: html-escaper "^2.0.0" +iterall@^1.2.2: + version "1.3.0" + resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea" + integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg== + jasmine-core@~3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-3.4.0.tgz#2a74618e966026530c3518f03e9f845d26473ce3" @@ -8793,13 +8872,6 @@ lazystream@^1.0.0: dependencies: readable-stream "^2.0.5" -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - lcid@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" @@ -8904,16 +8976,6 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" -load-json-file@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" - integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - strip-bom "^3.0.0" - load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" @@ -9344,13 +9406,6 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= - dependencies: - mimic-fn "^1.0.0" - mem@^4.0.0, mem@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" @@ -9428,10 +9483,10 @@ methods@~1.1.2: resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= -metro-babel-register@^0.56.0, metro-babel-register@^0.56.4: - version "0.56.4" - resolved "https://registry.yarnpkg.com/metro-babel-register/-/metro-babel-register-0.56.4.tgz#b0c627a1cfdd1bdd768f81af79481754e833a902" - integrity sha512-Phm6hMluOWYqfykftjJ1jsTpWvbgb49AC/1taxEctxUdRCZlFgZwBleJZAhQYxJD5J+ikFkEbHDzePEXb29KVA== +metro-babel-register@0.58.0: + version "0.58.0" + resolved "https://registry.yarnpkg.com/metro-babel-register/-/metro-babel-register-0.58.0.tgz#5c44786d49a044048df56cf476a2263491d4f53a" + integrity sha512-P5+G3ufhSYL6cA3a7xkbSJzzFBvtivj/PhWvGXFXnuFssDlMAX1CTktff+0gpka5Cd6B6QLt0UAMWulUAAE4Eg== dependencies: "@babel/core" "^7.0.0" "@babel/plugin-proposal-class-properties" "^7.0.0" @@ -9446,61 +9501,61 @@ metro-babel-register@^0.56.0, metro-babel-register@^0.56.4: core-js "^2.2.2" escape-string-regexp "^1.0.5" -metro-babel-transformer@^0.56.4: - version "0.56.4" - resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.56.4.tgz#fe1d0dc600fcf90201a5bea4d42caea10b801057" - integrity sha512-IOi4ILgZvaX7GCGHBJp79paNVOq5QxhhbyqAdEJgDP8bHfl/OVHoVKSypfrsMSKSiBrqxhIjyc4XjkXsQtkx5g== +metro-babel-transformer@0.58.0: + version "0.58.0" + resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.58.0.tgz#317c83b863cceb0573943815f1711fbcbe69b106" + integrity sha512-yBX3BkRhw2TCNPhe+pmLSgsAEA3huMvnX08UwjFqSXXI1aiqzRQobn92uKd1U5MM1Vx8EtXVomlJb95ZHNAv6A== dependencies: "@babel/core" "^7.0.0" - metro-source-map "^0.56.4" + metro-source-map "0.58.0" -metro-cache@^0.56.4: - version "0.56.4" - resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.56.4.tgz#542f9f8a35f8fb9d5576f46fd3ab4d4f42851a7e" - integrity sha512-d1hiUSKwtRsuMxUhHVJ3tjK2BbpUlJGvTyMWohK8Wxx+0GbnWRWWFcI4vlCzlZfoK0VtZK2MJEl5t7Du1mIniQ== +metro-cache@0.58.0: + version "0.58.0" + resolved "https://registry.yarnpkg.com/metro-cache/-/metro-cache-0.58.0.tgz#630ea0a4626dfb9591c71fdb85dce14b5e9a04ec" + integrity sha512-jjW9zCTKxhgKcVkyQ6LHyna9Zdf4TK/45vvT1fPyyTk1RY82ZYjU1qs+84ycKEd08Ka4YcK9xcUew9SIDJYI8Q== dependencies: jest-serializer "^24.4.0" - metro-core "^0.56.4" + metro-core "0.58.0" mkdirp "^0.5.1" rimraf "^2.5.4" -metro-config@^0.56.0, metro-config@^0.56.4: - version "0.56.4" - resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.56.4.tgz#338fd8165fba59424cec427c1a881757945e57e9" - integrity sha512-O85QDHwWdMn/8ERe13y4a6vbZL0AHyO8atTvL+9BCulLEO+FQBi1iJjr3+ViLa8cf0m5dRftDsa7P47m5euk4A== +metro-config@0.58.0, metro-config@^0.58.0: + version "0.58.0" + resolved "https://registry.yarnpkg.com/metro-config/-/metro-config-0.58.0.tgz#1e24b43a5a00971d75662b1a0d3c04a13d4a1746" + integrity sha512-4vgBliXwL56vjUlYplvGMVSNrJJpkHuLcD+O20trV3FvPxKg4ZsvuOcNSxqDSMU26FCtIEJ15ojcuCbRL7KY0w== dependencies: cosmiconfig "^5.0.5" jest-validate "^24.7.0" - metro "^0.56.4" - metro-cache "^0.56.4" - metro-core "^0.56.4" + metro "0.58.0" + metro-cache "0.58.0" + metro-core "0.58.0" pretty-format "^24.7.0" -metro-core@^0.56.0, metro-core@^0.56.4: - version "0.56.4" - resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.56.4.tgz#67cc41b3c0bf66e9c2306f50239a1080b1e82312" - integrity sha512-hMzkBdgPt5Zm9nr/1KtIT+A6H7TNiLVCEGG5OiAXj8gTRsA2yy7wAdQpwy0xbE+zi88t/pLOzXpd3ClG/YxyWg== +metro-core@0.58.0, metro-core@^0.58.0: + version "0.58.0" + resolved "https://registry.yarnpkg.com/metro-core/-/metro-core-0.58.0.tgz#ad9f6645a2b439a3fbce7ce4e19b01b00375768a" + integrity sha512-RzXUjGFmCLOyzUqcKDvr91AldGtIOxnzNZrWUIiG8uC3kerVLo0mQp4YH3+XVm6fMNiLMg6iER7HLqD+MbpUjQ== dependencies: jest-haste-map "^24.7.1" lodash.throttle "^4.1.1" - metro-resolver "^0.56.4" + metro-resolver "0.58.0" wordwrap "^1.0.0" -metro-inspector-proxy@^0.56.4: - version "0.56.4" - resolved "https://registry.yarnpkg.com/metro-inspector-proxy/-/metro-inspector-proxy-0.56.4.tgz#7343ff3c5908af4fd99e96b6d646e24e99816be4" - integrity sha512-E1S3MO25mWKmcLn1UQuCDiS0hf9P2Fwq8sEAX5lBLoZbehepNH+4xJ3xXSY51JX4dozBrE8GGoKL4ll3II40LA== +metro-inspector-proxy@0.58.0: + version "0.58.0" + resolved "https://registry.yarnpkg.com/metro-inspector-proxy/-/metro-inspector-proxy-0.58.0.tgz#6fefb0cdf25655919d56c82ebe09cd26eb00e636" + integrity sha512-oFqTyNTJdCdvcw1Ha6SKE7ITbSaoTbO4xpYownIoJR+WZ0ZfxbWpp225JkHuBJm9UcBAnG9c0CME924m3uBbaw== dependencies: connect "^3.6.5" debug "^2.2.0" rxjs "^5.4.3" ws "^1.1.5" - yargs "^9.0.0" + yargs "^14.2.0" -metro-minify-uglify@^0.56.4: - version "0.56.4" - resolved "https://registry.yarnpkg.com/metro-minify-uglify/-/metro-minify-uglify-0.56.4.tgz#13589dfb1d43343608aacb7f78ddfcc052daa63c" - integrity sha512-BHgj7+BKEK2pHvWHUR730bIrsZwl8DPtr49x9L0j2grPZ5/UROWXzEr8VZgIss7fl64t845uu1HXNNyuSj2EhA== +metro-minify-uglify@0.58.0: + version "0.58.0" + resolved "https://registry.yarnpkg.com/metro-minify-uglify/-/metro-minify-uglify-0.58.0.tgz#7e1066954bfd4f767ba6aca7feef676ca44c68b8" + integrity sha512-vRHsA7bCi7eCn3LXLm20EfY2NoWDyYOnmWaq/N8LB0OxL2L5DXRqMYAQK+prWGJ5S1yvVnDuuNVP+peQ9851TA== dependencies: uglify-es "^3.1.9" @@ -9545,10 +9600,10 @@ metro-react-native-babel-preset@0.55.0: "@babel/template" "^7.0.0" react-refresh "^0.2.0" -metro-react-native-babel-preset@^0.56.4: - version "0.56.4" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.56.4.tgz#dcedc64b7ff5c0734839458e70eb0ebef6d063a8" - integrity sha512-CzbBDM9Rh6w8s1fq+ZqihAh7DDqUAcfo9pPww25+N/eJ7UK436Q7JdfxwdIPpBwLFn6o6MyYn+uwL9OEWBJarA== +metro-react-native-babel-preset@0.58.0: + version "0.58.0" + resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.58.0.tgz#18f48d33fe124280ffabc000ab8b42c488d762a2" + integrity sha512-MRriNW+fF6jxABsgPphocUY6mIhmCm8idcrQZ58fT3Iti2vCdtkaK32TyCGUNUptzhUe2/cbE57j4aC+eaodAA== dependencies: "@babel/plugin-proposal-class-properties" "^7.0.0" "@babel/plugin-proposal-export-default-from" "^7.0.0" @@ -9581,60 +9636,61 @@ metro-react-native-babel-preset@^0.56.4: "@babel/plugin-transform-spread" "^7.0.0" "@babel/plugin-transform-sticky-regex" "^7.0.0" "@babel/plugin-transform-template-literals" "^7.0.0" - "@babel/plugin-transform-typescript" "^7.0.0" + "@babel/plugin-transform-typescript" "^7.5.0" "@babel/plugin-transform-unicode-regex" "^7.0.0" "@babel/template" "^7.0.0" react-refresh "^0.4.0" -metro-react-native-babel-transformer@^0.56.0: - version "0.56.4" - resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.56.4.tgz#3c6e48b605c305362ee624e45ff338656e35fc1d" - integrity sha512-ng74eutuy1nyGI9+TDzzVAVfEmNPDlapV4msTQMKPi4EFqo/fBn7Ct33ME9l5E51pQBBnxt/UwcpTvd13b29kQ== +metro-react-native-babel-transformer@0.58.0, metro-react-native-babel-transformer@^0.58.0: + version "0.58.0" + resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.58.0.tgz#5da0e5a1b83c01d11626905fa59f34fda53a21a5" + integrity sha512-3A73+cRq1eUPQ8g+hPNGgMUMCGmtQjwqHfoG1DwinAoJ/kr4WOXWWbGZo0xHJNBe/zdHGl0uHcDCp2knPglTdQ== dependencies: "@babel/core" "^7.0.0" - babel-preset-fbjs "^3.1.2" - metro-babel-transformer "^0.56.4" - metro-react-native-babel-preset "^0.56.4" - metro-source-map "^0.56.4" + babel-preset-fbjs "^3.3.0" + metro-babel-transformer "0.58.0" + metro-react-native-babel-preset "0.58.0" + metro-source-map "0.58.0" -metro-resolver@^0.56.4: - version "0.56.4" - resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.56.4.tgz#9876f57bca37fd1bfcffd733541e2ee4a89fad7f" - integrity sha512-Ug4ulVfpkKZ1Wu7mdYj9XLGuOqZTuWCqEhyx3siKTc/2eBwKZQXmiNo5d/IxWNvmwL/87Abeb724I6CMzMfjiQ== +metro-resolver@0.58.0: + version "0.58.0" + resolved "https://registry.yarnpkg.com/metro-resolver/-/metro-resolver-0.58.0.tgz#4d03edc52e2e25d45f16688adf3b3f268ea60df9" + integrity sha512-XFbAKvCHN2iWqKeiRARzEXn69eTDdJVJC7lu16S4dPQJ+Dy82dZBr5Es12iN+NmbJuFgrAuIHbpWrdnA9tOf6Q== dependencies: absolute-path "^0.0.0" -metro-source-map@^0.56.0, metro-source-map@^0.56.4: - version "0.56.4" - resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.56.4.tgz#868ccac3f3519fe14eca358bc186f63651b2b9bc" - integrity sha512-f1P9/rpFmG3Z0Jatiw2zvLItx1TwR7mXTSDj4qLDCWeVMB3kEXAr3R0ucumTW8c6HfpJljeRBWzYFXF33fd81g== +metro-source-map@0.58.0: + version "0.58.0" + resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.58.0.tgz#e951b99f4c653239ce9323bb08339c6f1978a112" + integrity sha512-yvN1YPmejmgiiS7T1aKBiiUTHPw2Vcm3r2TZ+DY92z/9PR4alysIywrCs/fTHs8rbDcKM5VfPCKGLpkBrbKeOw== dependencies: "@babel/traverse" "^7.0.0" "@babel/types" "^7.0.0" invariant "^2.2.4" - metro-symbolicate "^0.56.4" - ob1 "^0.56.4" + metro-symbolicate "0.58.0" + ob1 "0.58.0" source-map "^0.5.6" vlq "^1.0.0" -metro-symbolicate@^0.56.4: - version "0.56.4" - resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.56.4.tgz#53e9d40beac9049fa75a3e620ddd47d4907ff015" - integrity sha512-8mCNNn6zV5FFKCIcRgI7736Xl+owgvYuy8qanPxZN36f7utiWRYeB+PirEBPcglBk4qQvoy2lT6oPULNXZQbbQ== +metro-symbolicate@0.58.0: + version "0.58.0" + resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.58.0.tgz#ba9fd52549c41fc1b656adaad7c8875726dd5abe" + integrity sha512-uIVxUQC1E26qOMj13dKROhwAa2FmZk5eR0NcBqej/aXmQhpr8LjJg2sondkoLKUp827Tf/Fm9+pS4icb5XiqCw== dependencies: invariant "^2.2.4" - metro-source-map "^0.56.4" + metro-source-map "0.58.0" source-map "^0.5.6" through2 "^2.0.1" vlq "^1.0.0" -metro@^0.56.0, metro@^0.56.4: - version "0.56.4" - resolved "https://registry.yarnpkg.com/metro/-/metro-0.56.4.tgz#be7e1380ee6ac3552c25ead8098eab261029e4d7" - integrity sha512-Kt3OQJQtQdts0JrKnyGdLpKHDjqYBgIfzvYrvfhmFCkKuZ8aqRlVnvpfjQ4/OBm0Fmm9NyyxbNRD9VIbj7WjnA== +metro@0.58.0, metro@^0.58.0: + version "0.58.0" + resolved "https://registry.yarnpkg.com/metro/-/metro-0.58.0.tgz#c037318c112f80dc96199780c8b401ab72cfd142" + integrity sha512-yi/REXX+/s4r7RjzXht+E+qE6nzvFIrEXO5Q61h+70Q7RODMU8EnlpXx04JYk7DevHuMhFaX+NWhCtRINzR4zA== dependencies: + "@babel/code-frame" "^7.0.0" "@babel/core" "^7.0.0" - "@babel/generator" "^7.0.0" + "@babel/generator" "^7.5.0" "@babel/parser" "^7.0.0" "@babel/plugin-external-helpers" "^7.0.0" "@babel/template" "^7.0.0" @@ -9642,9 +9698,10 @@ metro@^0.56.0, metro@^0.56.4: "@babel/types" "^7.0.0" absolute-path "^0.0.0" async "^2.4.0" - babel-preset-fbjs "^3.1.2" + babel-preset-fbjs "^3.3.0" buffer-crc32 "^0.2.13" chalk "^2.4.1" + ci-info "^2.0.0" concat-stream "^1.6.0" connect "^3.6.5" debug "^2.2.0" @@ -9660,32 +9717,33 @@ metro@^0.56.0, metro@^0.56.4: json-stable-stringify "^1.0.1" lodash.throttle "^4.1.1" merge-stream "^1.0.1" - metro-babel-register "^0.56.4" - metro-babel-transformer "^0.56.4" - metro-cache "^0.56.4" - metro-config "^0.56.4" - metro-core "^0.56.4" - metro-inspector-proxy "^0.56.4" - metro-minify-uglify "^0.56.4" - metro-react-native-babel-preset "^0.56.4" - metro-resolver "^0.56.4" - metro-source-map "^0.56.4" - metro-symbolicate "^0.56.4" + metro-babel-register "0.58.0" + metro-babel-transformer "0.58.0" + metro-cache "0.58.0" + metro-config "0.58.0" + metro-core "0.58.0" + metro-inspector-proxy "0.58.0" + metro-minify-uglify "0.58.0" + metro-react-native-babel-preset "0.58.0" + metro-resolver "0.58.0" + metro-source-map "0.58.0" + metro-symbolicate "0.58.0" mime-types "2.1.11" mkdirp "^0.5.1" node-fetch "^2.2.0" - nullthrows "^1.1.0" + nullthrows "^1.1.1" resolve "^1.5.0" rimraf "^2.5.4" serialize-error "^2.1.0" source-map "^0.5.6" + strip-ansi "^4.0.0" temp "0.8.3" throat "^4.1.0" wordwrap "^1.0.0" write-file-atomic "^1.2.0" ws "^1.1.5" xpipe "^1.0.5" - yargs "^9.0.0" + yargs "^14.2.0" micromatch@^3.1.10, micromatch@^3.1.4: version "3.1.10" @@ -10098,7 +10156,7 @@ node-modules-regexp@^1.0.0: resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= -node-notifier@^5.2.1, node-notifier@^5.4.2: +node-notifier@^5.4.2: version "5.4.3" resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.4.3.tgz#cb72daf94c93904098e28b9c590fd866e464bd50" integrity sha512-M4UBGcs4jeOK9CjTsYwkvH6/MzuUmGCyTW+kCY7uO+1ZVr0+FHGdPdIf5CCLqAaxnRrWidyoQlNkMIIVwbKB8Q== @@ -10280,7 +10338,7 @@ npm-run-path@^2.0.0: gauge "~2.7.3" set-blocking "~2.0.0" -nullthrows@^1.1.0: +nullthrows@^1.1.0, nullthrows@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1" integrity sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw== @@ -10300,10 +10358,10 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -ob1@^0.56.4: - version "0.56.4" - resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.56.4.tgz#c4acb3baa42f4993a44b35b2da7c8ef443dcccec" - integrity sha512-URgFof9z2wotiYFsqlydXtQfGV81gvBI2ODy64xfd3vPo+AYom5PVDX4t4zn23t/O+S2IxqApSQM8uJAybmz7w== +ob1@0.58.0: + version "0.58.0" + resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.58.0.tgz#484a1e9a63a8b79d9ea6f3a83b2a42110faac973" + integrity sha512-uZP44cbowAfHafP1k4skpWItk5iHCoRevMfrnUvYCfyNNPPJd3rfDCyj0exklWi2gDXvjlj2ObsfiqP/bs/J7Q== object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" @@ -10530,15 +10588,6 @@ os-homedir@^1.0.0: resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== - dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" - os-locale@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" @@ -10855,13 +10904,6 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" -path-type@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" - integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= - dependencies: - pify "^2.0.0" - path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" @@ -10973,7 +11015,7 @@ please-upgrade-node@^3.2.0: dependencies: semver-compare "^1.0.0" -plist@^3.0.0, plist@^3.0.1: +plist@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.1.tgz#a9b931d17c304e8912ef0ba3bdd6182baf2e1f8c" integrity sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ== @@ -11072,6 +11114,16 @@ pretty-format@^24.7.0, pretty-format@^24.9.0: ansi-styles "^3.2.0" react-is "^16.8.4" +pretty-format@^25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.1.0.tgz#ed869bdaec1356fc5ae45de045e2c8ec7b07b0c8" + integrity sha512-46zLRSGLd02Rp+Lhad9zzuNZ+swunitn8zIpfD2B4OPCRLXbM87RJT2aBLBWYOznNUML/2l/ReMyWNC80PJBUQ== + dependencies: + "@jest/types" "^25.1.0" + ansi-regex "^5.0.0" + ansi-styles "^4.0.0" + react-is "^16.12.0" + private@^0.1.8, private@~0.1.5: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -11279,7 +11331,7 @@ react-clone-referenced-element@^1.0.1: resolved "https://registry.yarnpkg.com/react-clone-referenced-element/-/react-clone-referenced-element-1.1.0.tgz#9cdda7f2aeb54fea791f3ab8c6ab96c7a77d0158" integrity sha512-FKOsfKbBkPxYE8576EM6uAfHC4rnMpLyH6/TJUL4WcHUEB3EUn8AxPjnnV/IiwSSzsClvHYK+sDELKN/EJ0WYg== -react-devtools-core@^3.6.0, react-devtools-core@^3.6.3: +react-devtools-core@^3.6.0: version "3.6.3" resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-3.6.3.tgz#977d95b684c6ad28205f0c62e1e12c5f16675814" integrity sha512-+P+eFy/yo8Z/UH9J0DqHZuUM5+RI2wl249TNvMx3J2jpUomLQa4Zxl56GEotGfw3PIP1eI+hVf1s53FlUONStQ== @@ -11287,44 +11339,60 @@ react-devtools-core@^3.6.0, react-devtools-core@^3.6.3: shell-quote "^1.6.1" ws "^3.3.1" +react-devtools-core@^4.0.6: + version "4.5.0" + resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.5.0.tgz#077a931f84f79a0669517ea9bc36c34ca426c24d" + integrity sha512-nO+lcvGsWiIRKSs0s0uyT19IgJYd27kCB48In/5CiSoLpnWsA3nCv3J8R/J0UDIGt6hliq7R6IHJTQ06/4Fbzg== + dependencies: + es6-symbol "^3" + shell-quote "^1.6.1" + ws "^7" + +react-is@^16.12.0: + version "16.13.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.0.tgz#0f37c3613c34fe6b37cd7f763a0d6293ab15c527" + integrity sha512-GFMtL0vHkiBv9HluwNZTggSn/sCyEt9n02aM0dSAjGGyqyNlAyftYm4phPxdvCigG15JreC5biwxCgTAJZ7yAA== + react-is@^16.8.1, react-is@^16.8.4, react-is@^16.8.6: version "16.9.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.9.0.tgz#21ca9561399aad0ff1a7701c01683e8ca981edcb" integrity sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw== -react-native@0.61.5: - version "0.61.5" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.61.5.tgz#6e21acb56cbd75a3baeb1f70201a66f42600bba8" - integrity sha512-MXqE3NoGO0T3dUKIKkIppijBhRRMpfN6ANbhMXHDuyfA+fSilRWgCwYgR/YNCC7ntECoJYikKaNTUBB0DeQy6Q== +react-native@0.62.0-rc.3: + version "0.62.0-rc.3" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.62.0-rc.3.tgz#b08a4d767ba481f8182e2df16cf914d53a06cb53" + integrity sha512-oWSl0HR9JcxorkT2luZ7tIth6XPe6dSV+Z0QvRAW5c/jK6sdw5w3p6AoKNg+NCDZaUy3TpArssSFzL63iyi7bg== dependencies: "@babel/runtime" "^7.0.0" - "@react-native-community/cli" "^3.0.0" - "@react-native-community/cli-platform-android" "^3.0.0" - "@react-native-community/cli-platform-ios" "^3.0.0" + "@react-native-community/cli" "^4.2.0" + "@react-native-community/cli-platform-android" "^4.2.0" + "@react-native-community/cli-platform-ios" "^4.2.0" abort-controller "^3.0.0" - art "^0.10.0" + anser "^1.4.9" base64-js "^1.1.2" connect "^3.6.5" create-react-class "^15.6.3" escape-string-regexp "^1.0.5" + eslint-plugin-relay "1.4.1" event-target-shim "^5.0.1" fbjs "^1.0.0" fbjs-scripts "^1.1.0" - hermes-engine "^0.2.1" + hermes-engine "~0.4.0" invariant "^2.2.4" jsc-android "^245459.0.0" - metro-babel-register "^0.56.0" - metro-react-native-babel-transformer "^0.56.0" - metro-source-map "^0.56.0" - nullthrows "^1.1.0" + metro-babel-register "0.58.0" + metro-react-native-babel-transformer "0.58.0" + metro-source-map "0.58.0" + nullthrows "^1.1.1" pretty-format "^24.7.0" promise "^7.1.1" prop-types "^15.7.2" - react-devtools-core "^3.6.3" + react-devtools-core "^4.0.6" react-refresh "^0.4.0" regenerator-runtime "^0.13.2" - scheduler "0.15.0" + scheduler "0.17.0" stacktrace-parser "^0.1.3" + use-subscription "^1.0.0" whatwg-fetch "^3.0.0" react-refresh@^0.2.0: @@ -11392,14 +11460,6 @@ read-pkg-up@^1.0.1: find-up "^1.0.0" read-pkg "^1.0.0" -read-pkg-up@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" - integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= - dependencies: - find-up "^2.0.0" - read-pkg "^2.0.0" - read-pkg-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" @@ -11425,15 +11485,6 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -read-pkg@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" - integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= - dependencies: - load-json-file "^2.0.0" - normalize-package-data "^2.3.2" - path-type "^2.0.0" - read-pkg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" @@ -11984,10 +12035,10 @@ scheduler@0.14.0: loose-envify "^1.1.0" object-assign "^4.1.1" -scheduler@0.15.0: - version "0.15.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.15.0.tgz#6bfcf80ff850b280fed4aeecc6513bc0b4f17f8e" - integrity sha512-xAefmSfN6jqAa7Kuq7LIJY0bwAPG3xlCj0HMEBQk1lxYiDKZscY2xJ5U/61ZTrYbmNQbXa+gc7czPkVo11tnCg== +scheduler@0.17.0: + version "0.17.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.17.0.tgz#7c9c673e4ec781fac853927916d1c426b6f3ddfe" + integrity sha512-7rro8Io3tnCPuY4la/NuI5F2yfESpnfZyT6TtkXnSWVkcu0BCDJ+8gk5ozUaFaxpIyNuWAPXrH0yFcSi28fnDA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" @@ -13166,6 +13217,11 @@ type@^1.0.1: resolved "https://registry.yarnpkg.com/type/-/type-1.0.3.tgz#16f5d39f27a2d28d86e48f8981859e9d3296c179" integrity sha512-51IMtNfVcee8+9GJvj0spSuFcZHe9vSib6Xtgsny1Km9ugyz2mbS08I3rsUIRYgJohFRFU1160sgRodYz378Hg== +type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/type/-/type-2.0.0.tgz#5f16ff6ef2eb44f260494dae271033b29c09a9c3" + integrity sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow== + typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" @@ -13351,6 +13407,13 @@ url-template@^2.0.8: resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" integrity sha1-/FZaPMy/93MMd19WQflVV5FDnyE= +use-subscription@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.4.0.tgz#c4e808cfed6fe6e1ac875df1369c63f3ddae9522" + integrity sha512-R7P7JWpeHp+dtEYsgDzIIgOmVqRfJjRjLOO0YIYk6twctUkUYe6Tz0pcabyTDGcMMRt9uMbFMfwBfxKHg9gCSw== + dependencies: + object-assign "^4.1.1" + use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" @@ -13770,6 +13833,11 @@ ws@^5.2.0: dependencies: async-limiter "~1.0.0" +ws@^7: + version "7.2.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.3.tgz#a5411e1fb04d5ed0efee76d26d5c46d830c39b46" + integrity sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ== + ws@^7.0.0: version "7.1.2" resolved "https://registry.yarnpkg.com/ws/-/ws-7.1.2.tgz#c672d1629de8bb27a9699eb599be47aeeedd8f73" @@ -13869,11 +13937,6 @@ xtend@^4.0.0, xtend@~4.0.1: resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= - "y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" @@ -13928,13 +13991,6 @@ yargs-parser@^18.1.0: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" - integrity sha1-jQrELxbqVd69MyyvTEA4s+P139k= - dependencies: - camelcase "^4.1.0" - yargs@^12.0.2, yargs@^12.0.5: version "12.0.5" resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" @@ -13969,7 +14025,7 @@ yargs@^13.1.0, yargs@^13.2.4, yargs@^13.3.0: y18n "^4.0.0" yargs-parser "^13.1.1" -yargs@^14.0.0, yargs@^14.2.2: +yargs@^14.0.0, yargs@^14.2.0, yargs@^14.2.2: version "14.2.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.2.tgz#2769564379009ff8597cdd38fba09da9b493c4b5" integrity sha512-/4ld+4VV5RnrynMhPZJ/ZpOCGSCeghMykZ3BhdFBDa9Wy/RH6uEGNWDJog+aUlq+9OM1CFTgtYRW5Is1Po9NOA== @@ -14003,25 +14059,6 @@ yargs@^15.1.0: y18n "^4.0.0" yargs-parser "^18.1.0" -yargs@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c" - integrity sha1-UqzCP+7Kw0BCB47njAwAf1CF20w= - dependencies: - camelcase "^4.1.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - read-pkg-up "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^7.0.0" - yarn-install@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/yarn-install/-/yarn-install-1.0.0.tgz#57f45050b82efd57182b3973c54aa05cb5d25230" From 9d42a5decc5045fb96f27863dd91febb12dab638 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 12 Mar 2020 04:03:48 -0700 Subject: [PATCH 02/70] Update DeforkingPatches --- vnext/DeforkingPatches/.clang-format | 91 +---- .../ReactCommon/cxxreact/NativeToJsBridge.h | 120 ------ .../samples/SampleTurboCxxModule.cpp | 4 +- .../samples/SampleTurboCxxModule.h | 4 +- .../ReactCommon/yoga/yoga/.clang-format | 4 - .../ReactCommon/yoga/yoga/Yoga.cpp | 369 +++++++++++------- vnext/DeforkingPatches/overrides.json | 20 +- 7 files changed, 240 insertions(+), 372 deletions(-) delete mode 100644 vnext/DeforkingPatches/ReactCommon/cxxreact/NativeToJsBridge.h delete mode 100644 vnext/DeforkingPatches/ReactCommon/yoga/yoga/.clang-format diff --git a/vnext/DeforkingPatches/.clang-format b/vnext/DeforkingPatches/.clang-format index bc20b078f0e..ef2ae21fafa 100644 --- a/vnext/DeforkingPatches/.clang-format +++ b/vnext/DeforkingPatches/.clang-format @@ -1,91 +1,4 @@ --- -AccessModifierOffset: -1 -AlignAfterOpenBracket: AlwaysBreak -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: false -AlignEscapedNewlinesLeft: true -AlignOperands: false -AlignTrailingComments: false -AllowAllParametersOfDeclarationOnNextLine: false -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: Empty -AllowShortIfStatementsOnASingleLine: false -AllowShortLoopsOnASingleLine: false -AlwaysBreakAfterReturnType: None -AlwaysBreakBeforeMultilineStrings: true -AlwaysBreakTemplateDeclarations: true -BinPackArguments: false -BinPackParameters: false -BraceWrapping: - AfterClass: false - AfterControlStatement: false - AfterEnum: false - AfterFunction: false - AfterNamespace: false - AfterObjCDeclaration: false - AfterStruct: false - AfterUnion: false - BeforeCatch: false - BeforeElse: false - IndentBraces: false -BreakBeforeBinaryOperators: None -BreakBeforeBraces: Attach -BreakBeforeTernaryOperators: true -BreakConstructorInitializersBeforeComma: false -BreakAfterJavaFieldAnnotations: false -BreakStringLiterals: false -ColumnLimit: 80 -CommentPragmas: '^ IWYU pragma:' -ConstructorInitializerAllOnOneLineOrOnePerLine: true -ConstructorInitializerIndentWidth: 4 -ContinuationIndentWidth: 4 -Cpp11BracedListStyle: true -DerivePointerAlignment: false -DisableFormat: false -ForEachMacros: [ FOR_EACH_RANGE, FOR_EACH, ] -IncludeCategories: - - Regex: '^<.*\.h(pp)?>' - Priority: 1 - - Regex: '^<.*' - Priority: 2 - - Regex: '.*' - Priority: 3 -IndentCaseLabels: true -IndentWidth: 2 -IndentWrappedFunctionNames: false -KeepEmptyLinesAtTheStartOfBlocks: false -MacroBlockBegin: '' -MacroBlockEnd: '' -MaxEmptyLinesToKeep: 1 -NamespaceIndentation: None -ObjCBlockIndentWidth: 2 -ObjCSpaceAfterProperty: true -ObjCSpaceBeforeProtocolList: true -PenaltyBreakBeforeFirstCallParameter: 1 -PenaltyBreakComment: 300 -PenaltyBreakFirstLessLess: 120 -PenaltyBreakString: 1000 -PenaltyExcessCharacter: 1000000 -PenaltyReturnTypeOnItsOwnLine: 200 -PointerAlignment: Right -ReflowComments: true -SortIncludes: true -SpaceAfterCStyleCast: false -SpaceBeforeAssignmentOperators: true -SpaceBeforeParens: ControlStatements -SpaceInEmptyParentheses: false -SpacesBeforeTrailingComments: 1 -SpacesInAngles: false -SpacesInContainerLiterals: true -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false -SpacesInSquareBrackets: false -Standard: Cpp11 -TabWidth: 8 -UseTab: Never ---- -Language: ObjC -ColumnLimit: 120 -BreakBeforeBraces: WebKit +DisableFormat: true +SortIncludes: false ... diff --git a/vnext/DeforkingPatches/ReactCommon/cxxreact/NativeToJsBridge.h b/vnext/DeforkingPatches/ReactCommon/cxxreact/NativeToJsBridge.h deleted file mode 100644 index 9d9688142f2..00000000000 --- a/vnext/DeforkingPatches/ReactCommon/cxxreact/NativeToJsBridge.h +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Facebook, Inc. and its affiliates. - -// This source code is licensed under the MIT license found in the -// LICENSE file in the root directory of this source tree. - -#pragma once - -#include -#include -#include -#include - -#include - -namespace folly { -struct dynamic; -} - -namespace facebook { -namespace react { - -struct InstanceCallback; -class JsToNativeBridge; -class MessageQueueThread; -class ModuleRegistry; -class RAMBundleRegistry; - -// This class manages calls from native code to JS. It also manages -// executors and their threads. All functions here can be called from -// any thread. -// -// Except for loadApplicationScriptSync(), all void methods will queue -// work to run on the jsQueue passed to the ctor, and return -// immediately. -class NativeToJsBridge { - public: - friend class JsToNativeBridge; - - /** - * This must be called on the main JS thread. - */ - NativeToJsBridge( - JSExecutorFactory *jsExecutorFactory, - std::shared_ptr registry, - std::shared_ptr jsQueue, - std::shared_ptr callback); - virtual ~NativeToJsBridge(); - - /** - * Executes a function with the module ID and method ID and any additional - * arguments in JS. - */ - void callFunction( - std::string &&module, - std::string &&method, - folly::dynamic &&args); - - /** - * Invokes a callback with the cbID, and optional additional arguments in JS. - */ - void invokeCallback(double callbackId, folly::dynamic &&args); - - /** - * Starts the JS application. If bundleRegistry is non-null, then it is - * used to fetch JavaScript modules as individual scripts. - * Otherwise, the script is assumed to include all the modules. - */ - void loadApplication( - std::unique_ptr bundleRegistry, - std::unique_ptr startupCode, - std::string sourceURL); - void loadApplicationSync( - std::unique_ptr bundleRegistry, - std::unique_ptr startupCode, - std::string sourceURL); - - void registerBundle(uint32_t bundleId, const std::string &bundlePath); - void setGlobalVariable( - std::string propName, - std::unique_ptr jsonValue); - void *getJavaScriptContext(); - bool isInspectable(); - bool isBatchActive(); - - void handleMemoryPressure(int pressureLevel); - - /** - * Synchronously tears down the bridge and the main executor. - */ - void destroy(); - - void runOnExecutorQueue(std::function task); - - private: - // This is used to avoid a race condition where a proxyCallback gets queued - // after ~NativeToJsBridge(), on the same thread. In that case, the callback - // will try to run the task on m_callback which will have been destroyed - // within ~NativeToJsBridge(), thus causing a SIGSEGV. - std::shared_ptr m_destroyed; - std::shared_ptr m_delegate; - std::unique_ptr m_executor; - std::shared_ptr m_executorMessageQueueThread; - - // Memoize this on the JS thread, so that it can be inspected from - // any thread later. This assumes inspectability doesn't change for - // a JSExecutor instance, which is true for all existing implementations. - bool m_inspectable; - - // Keep track of whether the JS bundle containing the application logic causes - // exception when evaluated initially. If so, more calls to JS will very - // likely fail as well, so this flag can help prevent them. - bool m_applicationScriptHasFailure = false; - -#ifdef WITH_FBSYSTRACE - std::atomic_uint_least32_t m_systraceCookie = ATOMIC_VAR_INIT(0); -#endif -}; - -} // namespace react -} // namespace facebook diff --git a/vnext/DeforkingPatches/ReactCommon/turbomodule/samples/SampleTurboCxxModule.cpp b/vnext/DeforkingPatches/ReactCommon/turbomodule/samples/SampleTurboCxxModule.cpp index 6715e537c5f..5d56c59d7ec 100644 --- a/vnext/DeforkingPatches/ReactCommon/turbomodule/samples/SampleTurboCxxModule.cpp +++ b/vnext/DeforkingPatches/ReactCommon/turbomodule/samples/SampleTurboCxxModule.cpp @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the @@ -15,7 +15,7 @@ namespace facebook { namespace react { SampleTurboCxxModule::SampleTurboCxxModule( - std::shared_ptr jsInvoker) + std::shared_ptr jsInvoker) : NativeSampleTurboCxxModuleSpecJSI(jsInvoker) {} void SampleTurboCxxModule::voidFunc(jsi::Runtime &rt) { diff --git a/vnext/DeforkingPatches/ReactCommon/turbomodule/samples/SampleTurboCxxModule.h b/vnext/DeforkingPatches/ReactCommon/turbomodule/samples/SampleTurboCxxModule.h index 4b4cdce946e..c1ebb682362 100644 --- a/vnext/DeforkingPatches/ReactCommon/turbomodule/samples/SampleTurboCxxModule.h +++ b/vnext/DeforkingPatches/ReactCommon/turbomodule/samples/SampleTurboCxxModule.h @@ -1,4 +1,4 @@ -/** +/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the @@ -21,7 +21,7 @@ namespace react { */ class SampleTurboCxxModule : public NativeSampleTurboCxxModuleSpecJSI { public: - SampleTurboCxxModule(std::shared_ptr jsInvoker); + SampleTurboCxxModule(std::shared_ptr jsInvoker); void voidFunc(jsi::Runtime &rt) override; bool getBool(jsi::Runtime &rt, bool arg) override; diff --git a/vnext/DeforkingPatches/ReactCommon/yoga/yoga/.clang-format b/vnext/DeforkingPatches/ReactCommon/yoga/yoga/.clang-format deleted file mode 100644 index ef2ae21fafa..00000000000 --- a/vnext/DeforkingPatches/ReactCommon/yoga/yoga/.clang-format +++ /dev/null @@ -1,4 +0,0 @@ ---- -DisableFormat: true -SortIncludes: false -... diff --git a/vnext/DeforkingPatches/ReactCommon/yoga/yoga/Yoga.cpp b/vnext/DeforkingPatches/ReactCommon/yoga/yoga/Yoga.cpp index e352d7d050c..e6a16744f3a 100644 --- a/vnext/DeforkingPatches/ReactCommon/yoga/yoga/Yoga.cpp +++ b/vnext/DeforkingPatches/ReactCommon/yoga/yoga/Yoga.cpp @@ -1,13 +1,15 @@ /* * Copyright (c) Facebook, Inc. and its affiliates. * - * This source code is licensed under the MIT license found in the LICENSE - * file in the root directory of this source tree. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ + #include "Yoga.h" #include #include #include +#include #include #include "Utils.h" #include "YGNode.h" @@ -104,7 +106,7 @@ static int YGDefaultLog( #undef YG_UNUSED #endif -bool YGFloatIsUndefined(const float value) { +YOGA_EXPORT bool YGFloatIsUndefined(const float value) { return facebook::yoga::isUndefined(value); } @@ -138,77 +140,85 @@ detail::CompactValue YGComputedEdgeValue( return defaultValue; } -void *YGNodeGetContext(YGNodeRef node) { +YOGA_EXPORT void* YGNodeGetContext(YGNodeRef node) { return node->getContext(); } -void YGNodeSetContext(YGNodeRef node, void *context) { +YOGA_EXPORT void YGNodeSetContext(YGNodeRef node, void* context) { + return node->setContext(context); } -bool YGNodeHasMeasureFunc(YGNodeRef node) { +YOGA_EXPORT bool YGNodeHasMeasureFunc(YGNodeRef node) { return node->hasMeasureFunc(); } -void YGNodeSetMeasureFunc(YGNodeRef node, YGMeasureFunc measureFunc) { +YOGA_EXPORT void YGNodeSetMeasureFunc( + YGNodeRef node, + YGMeasureFunc measureFunc) { node->setMeasureFunc(measureFunc); } -bool YGNodeHasBaselineFunc(YGNodeRef node) { +YOGA_EXPORT bool YGNodeHasBaselineFunc(YGNodeRef node) { return node->hasBaselineFunc(); } -void YGNodeSetBaselineFunc(YGNodeRef node, YGBaselineFunc baselineFunc) { +YOGA_EXPORT void YGNodeSetBaselineFunc( + YGNodeRef node, + YGBaselineFunc baselineFunc) { node->setBaselineFunc(baselineFunc); } -YGDirtiedFunc YGNodeGetDirtiedFunc(YGNodeRef node) { +YOGA_EXPORT YGDirtiedFunc YGNodeGetDirtiedFunc(YGNodeRef node) { return node->getDirtied(); } -void YGNodeSetDirtiedFunc(YGNodeRef node, YGDirtiedFunc dirtiedFunc) { +YOGA_EXPORT void YGNodeSetDirtiedFunc( + YGNodeRef node, + YGDirtiedFunc dirtiedFunc) { node->setDirtiedFunc(dirtiedFunc); } -void YGNodeSetPrintFunc(YGNodeRef node, YGPrintFunc printFunc) { +YOGA_EXPORT void YGNodeSetPrintFunc(YGNodeRef node, YGPrintFunc printFunc) { node->setPrintFunc(printFunc); } -bool YGNodeGetHasNewLayout(YGNodeRef node) { +YOGA_EXPORT bool YGNodeGetHasNewLayout(YGNodeRef node) { return node->getHasNewLayout(); } -void YGConfigSetPrintTreeFlag(YGConfigRef config, bool enabled) { +YOGA_EXPORT void YGConfigSetPrintTreeFlag(YGConfigRef config, bool enabled) { config->printTree = enabled; } -void YGNodeSetHasNewLayout(YGNodeRef node, bool hasNewLayout) { +YOGA_EXPORT void YGNodeSetHasNewLayout(YGNodeRef node, bool hasNewLayout) { node->setHasNewLayout(hasNewLayout); } -YGNodeType YGNodeGetNodeType(YGNodeRef node) { +YOGA_EXPORT YGNodeType YGNodeGetNodeType(YGNodeRef node) { return node->getNodeType(); } -void YGNodeSetNodeType(YGNodeRef node, YGNodeType nodeType) { +YOGA_EXPORT void YGNodeSetNodeType(YGNodeRef node, YGNodeType nodeType) { return node->setNodeType(nodeType); } -bool YGNodeIsDirty(YGNodeRef node) { +YOGA_EXPORT bool YGNodeIsDirty(YGNodeRef node) { return node->isDirty(); } -bool YGNodeLayoutGetDidUseLegacyFlag(const YGNodeRef node) { +YOGA_EXPORT bool YGNodeLayoutGetDidUseLegacyFlag(const YGNodeRef node) { return node->didUseLegacyFlag(); } -void YGNodeMarkDirtyAndPropogateToDescendants(const YGNodeRef node) { +YOGA_EXPORT void YGNodeMarkDirtyAndPropogateToDescendants( + const YGNodeRef node) { return node->markDirtyAndPropogateDownwards(); } int32_t gConfigInstanceCount = 0; -WIN_EXPORT YGNodeRef YGNodeNewWithConfig(const YGConfigRef config) { +YOGA_EXPORT WIN_EXPORT YGNodeRef YGNodeNewWithConfig(const YGConfigRef config) { const YGNodeRef node = new YGNode{config}; YGAssertWithConfig( config, node != nullptr, "Could not allocate memory for node"); @@ -217,16 +227,16 @@ WIN_EXPORT YGNodeRef YGNodeNewWithConfig(const YGConfigRef config) { return node; } -YGConfigRef YGConfigGetDefault() { +YOGA_EXPORT YGConfigRef YGConfigGetDefault() { static YGConfigRef defaultConfig = YGConfigNew(); return defaultConfig; } -YGNodeRef YGNodeNew(void) { +YOGA_EXPORT YGNodeRef YGNodeNew(void) { return YGNodeNewWithConfig(YGConfigGetDefault()); } -YGNodeRef YGNodeClone(YGNodeRef oldNode) { +YOGA_EXPORT YGNodeRef YGNodeClone(YGNodeRef oldNode) { YGNodeRef node = new YGNode(*oldNode); YGAssertWithConfig( oldNode->getConfig(), @@ -266,7 +276,7 @@ static YGNodeRef YGNodeDeepClone(YGNodeRef oldNode) { return node; } -void YGNodeFree(const YGNodeRef node) { +YOGA_EXPORT void YGNodeFree(const YGNodeRef node) { if (YGNodeRef owner = node->getOwner()) { owner->removeChild(node); node->setOwner(nullptr); @@ -294,7 +304,7 @@ static void YGConfigFreeRecursive(const YGNodeRef root) { } } -void YGNodeFreeRecursiveWithCleanupFunc( +YOGA_EXPORT void YGNodeFreeRecursiveWithCleanupFunc( const YGNodeRef root, YGNodeCleanupFunc cleanup) { uint32_t skipped = 0; @@ -314,11 +324,11 @@ void YGNodeFreeRecursiveWithCleanupFunc( YGNodeFree(root); } -void YGNodeFreeRecursive(const YGNodeRef root) { +YOGA_EXPORT void YGNodeFreeRecursive(const YGNodeRef root) { return YGNodeFreeRecursiveWithCleanupFunc(root, nullptr); } -void YGNodeReset(YGNodeRef node) { +YOGA_EXPORT void YGNodeReset(YGNodeRef node) { node->reset(); } @@ -326,7 +336,7 @@ int32_t YGConfigGetInstanceCount(void) { return gConfigInstanceCount; } -YGConfigRef YGConfigNew(void) { +YOGA_EXPORT YGConfigRef YGConfigNew(void) { #ifdef ANDROID const YGConfigRef config = new YGConfig(YGAndroidLog); #else @@ -336,7 +346,7 @@ YGConfigRef YGConfigNew(void) { return config; } -void YGConfigFree(const YGConfigRef config) { +YOGA_EXPORT void YGConfigFree(const YGConfigRef config) { delete config; gConfigInstanceCount--; } @@ -345,18 +355,20 @@ void YGConfigCopy(const YGConfigRef dest, const YGConfigRef src) { memcpy(dest, src, sizeof(YGConfig)); } -void YGNodeSetIsReferenceBaseline(YGNodeRef node, bool isReferenceBaseline) { +YOGA_EXPORT void YGNodeSetIsReferenceBaseline( + YGNodeRef node, + bool isReferenceBaseline) { if (node->isReferenceBaseline() != isReferenceBaseline) { node->setIsReferenceBaseline(isReferenceBaseline); node->markDirtyAndPropogate(); } } -bool YGNodeIsReferenceBaseline(YGNodeRef node) { +YOGA_EXPORT bool YGNodeIsReferenceBaseline(YGNodeRef node) { return node->isReferenceBaseline(); } -void YGNodeInsertChild( +YOGA_EXPORT void YGNodeInsertChild( const YGNodeRef owner, const YGNodeRef child, const uint32_t index) { @@ -375,7 +387,9 @@ void YGNodeInsertChild( owner->markDirtyAndPropogate(); } -void YGNodeRemoveChild(const YGNodeRef owner, const YGNodeRef excludedChild) { +YOGA_EXPORT void YGNodeRemoveChild( + const YGNodeRef owner, + const YGNodeRef excludedChild) { if (YGNodeGetChildCount(owner) == 0) { // This is an empty set. Nothing to remove. return; @@ -394,7 +408,7 @@ void YGNodeRemoveChild(const YGNodeRef owner, const YGNodeRef excludedChild) { } } -void YGNodeRemoveAllChildren(const YGNodeRef owner) { +YOGA_EXPORT void YGNodeRemoveAllChildren(const YGNodeRef owner) { const uint32_t childCount = YGNodeGetChildCount(owner); if (childCount == 0) { // This is an empty set already. Nothing to do. @@ -454,7 +468,7 @@ static void YGNodeSetChildrenInternal( } } -void YGNodeSetChildren( +YOGA_EXPORT void YGNodeSetChildren( const YGNodeRef owner, const YGNodeRef c[], const uint32_t count) { @@ -462,32 +476,33 @@ void YGNodeSetChildren( YGNodeSetChildrenInternal(owner, children); } -void YGNodeSetChildren( +YOGA_EXPORT void YGNodeSetChildren( YGNodeRef const owner, const std::vector &children) { YGNodeSetChildrenInternal(owner, children); } -YGNodeRef YGNodeGetChild(const YGNodeRef node, const uint32_t index) { +YOGA_EXPORT YGNodeRef +YGNodeGetChild(const YGNodeRef node, const uint32_t index) { if (index < node->getChildren().size()) { return node->getChild(index); } return nullptr; } -uint32_t YGNodeGetChildCount(const YGNodeRef node) { +YOGA_EXPORT uint32_t YGNodeGetChildCount(const YGNodeRef node) { return static_cast(node->getChildren().size()); } -YGNodeRef YGNodeGetOwner(const YGNodeRef node) { +YOGA_EXPORT YGNodeRef YGNodeGetOwner(const YGNodeRef node) { return node->getOwner(); } -YGNodeRef YGNodeGetParent(const YGNodeRef node) { +YOGA_EXPORT YGNodeRef YGNodeGetParent(const YGNodeRef node) { return node->getOwner(); } -void YGNodeMarkDirty(const YGNodeRef node) { +YOGA_EXPORT void YGNodeMarkDirty(const YGNodeRef node) { YGAssertWithNode( node, node->hasMeasureFunc(), @@ -497,20 +512,22 @@ void YGNodeMarkDirty(const YGNodeRef node) { node->markDirtyAndPropogate(); } -void YGNodeCopyStyle(const YGNodeRef dstNode, const YGNodeRef srcNode) { +YOGA_EXPORT void YGNodeCopyStyle( + const YGNodeRef dstNode, + const YGNodeRef srcNode) { if (!(dstNode->getStyle() == srcNode->getStyle())) { dstNode->setStyle(srcNode->getStyle()); dstNode->markDirtyAndPropogate(); } } -float YGNodeStyleGetFlexGrow(const YGNodeConstRef node) { +YOGA_EXPORT float YGNodeStyleGetFlexGrow(const YGNodeConstRef node) { return node->getStyle().flexGrow().isUndefined() ? kDefaultFlexGrow : node->getStyle().flexGrow().unwrap(); } -float YGNodeStyleGetFlexShrink(const YGNodeConstRef node) { +YOGA_EXPORT float YGNodeStyleGetFlexShrink(const YGNodeConstRef node) { return node->getStyle().flexShrink().isUndefined() ? (node->getConfig()->useWebDefaults ? kWebDefaultFlexShrink : kDefaultFlexShrink) @@ -563,113 +580,131 @@ void updateIndexedStyleProp( // decltype, MSVC will prefer the non-const version. #define MSVC_HINT(PROP) decltype(YGStyle{}.PROP()) -void YGNodeStyleSetDirection(const YGNodeRef node, const YGDirection value) { +YOGA_EXPORT void YGNodeStyleSetDirection( + const YGNodeRef node, + const YGDirection value) { updateStyle(node, &YGStyle::direction, value); } -YGDirection YGNodeStyleGetDirection(const YGNodeConstRef node) { +YOGA_EXPORT YGDirection YGNodeStyleGetDirection(const YGNodeConstRef node) { return node->getStyle().direction(); } -void YGNodeStyleSetFlexDirection( +YOGA_EXPORT void YGNodeStyleSetFlexDirection( const YGNodeRef node, const YGFlexDirection flexDirection) { updateStyle( node, &YGStyle::flexDirection, flexDirection); } -YGFlexDirection YGNodeStyleGetFlexDirection(const YGNodeConstRef node) { +YOGA_EXPORT YGFlexDirection +YGNodeStyleGetFlexDirection(const YGNodeConstRef node) { return node->getStyle().flexDirection(); } -void YGNodeStyleSetJustifyContent( +YOGA_EXPORT void YGNodeStyleSetJustifyContent( const YGNodeRef node, const YGJustify justifyContent) { updateStyle( node, &YGStyle::justifyContent, justifyContent); } -YGJustify YGNodeStyleGetJustifyContent(const YGNodeConstRef node) { +YOGA_EXPORT YGJustify YGNodeStyleGetJustifyContent(const YGNodeConstRef node) { return node->getStyle().justifyContent(); } -void YGNodeStyleSetAlignContent( +YOGA_EXPORT void YGNodeStyleSetAlignContent( const YGNodeRef node, const YGAlign alignContent) { updateStyle( node, &YGStyle::alignContent, alignContent); } -YGAlign YGNodeStyleGetAlignContent(const YGNodeConstRef node) { +YOGA_EXPORT YGAlign YGNodeStyleGetAlignContent(const YGNodeConstRef node) { return node->getStyle().alignContent(); } -void YGNodeStyleSetAlignItems(const YGNodeRef node, const YGAlign alignItems) { +YOGA_EXPORT void YGNodeStyleSetAlignItems( + const YGNodeRef node, + const YGAlign alignItems) { updateStyle(node, &YGStyle::alignItems, alignItems); } -YGAlign YGNodeStyleGetAlignItems(const YGNodeConstRef node) { +YOGA_EXPORT YGAlign YGNodeStyleGetAlignItems(const YGNodeConstRef node) { return node->getStyle().alignItems(); } -void YGNodeStyleSetAlignSelf(const YGNodeRef node, const YGAlign alignSelf) { +YOGA_EXPORT void YGNodeStyleSetAlignSelf( + const YGNodeRef node, + const YGAlign alignSelf) { updateStyle(node, &YGStyle::alignSelf, alignSelf); } -YGAlign YGNodeStyleGetAlignSelf(const YGNodeConstRef node) { +YOGA_EXPORT YGAlign YGNodeStyleGetAlignSelf(const YGNodeConstRef node) { return node->getStyle().alignSelf(); } -void YGNodeStyleSetPositionType( +YOGA_EXPORT void YGNodeStyleSetPositionType( const YGNodeRef node, const YGPositionType positionType) { updateStyle( node, &YGStyle::positionType, positionType); } -YGPositionType YGNodeStyleGetPositionType(const YGNodeConstRef node) { +YOGA_EXPORT YGPositionType +YGNodeStyleGetPositionType(const YGNodeConstRef node) { return node->getStyle().positionType(); } -void YGNodeStyleSetFlexWrap(const YGNodeRef node, const YGWrap flexWrap) { +YOGA_EXPORT void YGNodeStyleSetFlexWrap( + const YGNodeRef node, + const YGWrap flexWrap) { updateStyle(node, &YGStyle::flexWrap, flexWrap); } -YGWrap YGNodeStyleGetFlexWrap(const YGNodeConstRef node) { +YOGA_EXPORT YGWrap YGNodeStyleGetFlexWrap(const YGNodeConstRef node) { return node->getStyle().flexWrap(); } -void YGNodeStyleSetOverflow(const YGNodeRef node, const YGOverflow overflow) { +YOGA_EXPORT void YGNodeStyleSetOverflow( + const YGNodeRef node, + const YGOverflow overflow) { updateStyle(node, &YGStyle::overflow, overflow); } -YGOverflow YGNodeStyleGetOverflow(const YGNodeConstRef node) { +YOGA_EXPORT YGOverflow YGNodeStyleGetOverflow(const YGNodeConstRef node) { return node->getStyle().overflow(); } -void YGNodeStyleSetDisplay(const YGNodeRef node, const YGDisplay display) { +YOGA_EXPORT void YGNodeStyleSetDisplay( + const YGNodeRef node, + const YGDisplay display) { updateStyle(node, &YGStyle::display, display); } -YGDisplay YGNodeStyleGetDisplay(const YGNodeConstRef node) { +YOGA_EXPORT YGDisplay YGNodeStyleGetDisplay(const YGNodeConstRef node) { return node->getStyle().display(); } // TODO(T26792433): Change the API to accept YGFloatOptional. -void YGNodeStyleSetFlex(const YGNodeRef node, const float flex) { +YOGA_EXPORT void YGNodeStyleSetFlex(const YGNodeRef node, const float flex) { updateStyle(node, &YGStyle::flex, YGFloatOptional{flex}); } // TODO(T26792433): Change the API to accept YGFloatOptional. -float YGNodeStyleGetFlex(const YGNodeConstRef node) { +YOGA_EXPORT float YGNodeStyleGetFlex(const YGNodeConstRef node) { return node->getStyle().flex().isUndefined() ? YGUndefined : node->getStyle().flex().unwrap(); } // TODO(T26792433): Change the API to accept YGFloatOptional. -void YGNodeStyleSetFlexGrow(const YGNodeRef node, const float flexGrow) { +YOGA_EXPORT void YGNodeStyleSetFlexGrow( + const YGNodeRef node, + const float flexGrow) { updateStyle( node, &YGStyle::flexGrow, YGFloatOptional{flexGrow}); } // TODO(T26792433): Change the API to accept YGFloatOptional. -void YGNodeStyleSetFlexShrink(const YGNodeRef node, const float flexShrink) { +YOGA_EXPORT void YGNodeStyleSetFlexShrink( + const YGNodeRef node, + const float flexShrink) { updateStyle( node, &YGStyle::flexShrink, YGFloatOptional{flexShrink}); } -YGValue YGNodeStyleGetFlexBasis(const YGNodeConstRef node) { +YOGA_EXPORT YGValue YGNodeStyleGetFlexBasis(const YGNodeConstRef node) { YGValue flexBasis = node->getStyle().flexBasis(); if (flexBasis.unit == YGUnitUndefined || flexBasis.unit == YGUnitAuto) { // TODO(T26792433): Get rid off the use of YGUndefined at client side @@ -678,71 +713,91 @@ YGValue YGNodeStyleGetFlexBasis(const YGNodeConstRef node) { return flexBasis; } -void YGNodeStyleSetFlexBasis(const YGNodeRef node, const float flexBasis) { +YOGA_EXPORT void YGNodeStyleSetFlexBasis( + const YGNodeRef node, + const float flexBasis) { auto value = detail::CompactValue::ofMaybe(flexBasis); updateStyle(node, &YGStyle::flexBasis, value); } -void YGNodeStyleSetFlexBasisPercent( +YOGA_EXPORT void YGNodeStyleSetFlexBasisPercent( const YGNodeRef node, const float flexBasisPercent) { auto value = detail::CompactValue::ofMaybe(flexBasisPercent); updateStyle(node, &YGStyle::flexBasis, value); } -void YGNodeStyleSetFlexBasisAuto(const YGNodeRef node) { +YOGA_EXPORT void YGNodeStyleSetFlexBasisAuto(const YGNodeRef node) { updateStyle( node, &YGStyle::flexBasis, detail::CompactValue::ofAuto()); } -void YGNodeStyleSetPosition(YGNodeRef node, YGEdge edge, float points) { +YOGA_EXPORT void YGNodeStyleSetPosition( + YGNodeRef node, + YGEdge edge, + float points) { auto value = detail::CompactValue::ofMaybe(points); updateIndexedStyleProp( node, &YGStyle::position, edge, value); } -void YGNodeStyleSetPositionPercent(YGNodeRef node, YGEdge edge, float percent) { +YOGA_EXPORT void YGNodeStyleSetPositionPercent( + YGNodeRef node, + YGEdge edge, + float percent) { auto value = detail::CompactValue::ofMaybe(percent); updateIndexedStyleProp( node, &YGStyle::position, edge, value); } -YGValue YGNodeStyleGetPosition(YGNodeConstRef node, YGEdge edge) { +YOGA_EXPORT YGValue YGNodeStyleGetPosition(YGNodeConstRef node, YGEdge edge) { return node->getStyle().position()[edge]; } -void YGNodeStyleSetMargin(YGNodeRef node, YGEdge edge, float points) { +YOGA_EXPORT void YGNodeStyleSetMargin( + YGNodeRef node, + YGEdge edge, + float points) { auto value = detail::CompactValue::ofMaybe(points); updateIndexedStyleProp( node, &YGStyle::margin, edge, value); } -void YGNodeStyleSetMarginPercent(YGNodeRef node, YGEdge edge, float percent) { +YOGA_EXPORT void YGNodeStyleSetMarginPercent( + YGNodeRef node, + YGEdge edge, + float percent) { auto value = detail::CompactValue::ofMaybe(percent); updateIndexedStyleProp( node, &YGStyle::margin, edge, value); } -void YGNodeStyleSetMarginAuto(YGNodeRef node, YGEdge edge) { +YOGA_EXPORT void YGNodeStyleSetMarginAuto(YGNodeRef node, YGEdge edge) { updateIndexedStyleProp( node, &YGStyle::margin, edge, detail::CompactValue::ofAuto()); } -YGValue YGNodeStyleGetMargin(YGNodeConstRef node, YGEdge edge) { +YOGA_EXPORT YGValue YGNodeStyleGetMargin(YGNodeConstRef node, YGEdge edge) { return node->getStyle().margin()[edge]; } -void YGNodeStyleSetPadding(YGNodeRef node, YGEdge edge, float points) { +YOGA_EXPORT void YGNodeStyleSetPadding( + YGNodeRef node, + YGEdge edge, + float points) { auto value = detail::CompactValue::ofMaybe(points); updateIndexedStyleProp( node, &YGStyle::padding, edge, value); } -void YGNodeStyleSetPaddingPercent(YGNodeRef node, YGEdge edge, float percent) { +YOGA_EXPORT void YGNodeStyleSetPaddingPercent( + YGNodeRef node, + YGEdge edge, + float percent) { auto value = detail::CompactValue::ofMaybe(percent); updateIndexedStyleProp( node, &YGStyle::padding, edge, value); } -YGValue YGNodeStyleGetPadding(YGNodeConstRef node, YGEdge edge) { +YOGA_EXPORT YGValue YGNodeStyleGetPadding(YGNodeConstRef node, YGEdge edge) { return node->getStyle().padding()[edge]; } // TODO(T26792433): Change the API to accept YGFloatOptional. -void YGNodeStyleSetBorder( +YOGA_EXPORT void YGNodeStyleSetBorder( const YGNodeRef node, const YGEdge edge, const float border) { @@ -751,7 +806,9 @@ void YGNodeStyleSetBorder( node, &YGStyle::border, edge, value); } -float YGNodeStyleGetBorder(const YGNodeConstRef node, const YGEdge edge) { +YOGA_EXPORT float YGNodeStyleGetBorder( + const YGNodeConstRef node, + const YGEdge edge) { auto border = node->getStyle().border()[edge]; if (border.isUndefined() || border.isAuto()) { // TODO(T26792433): Rather than returning YGUndefined, change the api to @@ -765,126 +822,141 @@ float YGNodeStyleGetBorder(const YGNodeConstRef node, const YGEdge edge) { // Yoga specific properties, not compatible with flexbox specification // TODO(T26792433): Change the API to accept YGFloatOptional. -float YGNodeStyleGetAspectRatio(const YGNodeConstRef node) { +YOGA_EXPORT float YGNodeStyleGetAspectRatio(const YGNodeConstRef node) { const YGFloatOptional op = node->getStyle().aspectRatio(); return op.isUndefined() ? YGUndefined : op.unwrap(); } // TODO(T26792433): Change the API to accept YGFloatOptional. -void YGNodeStyleSetAspectRatio(const YGNodeRef node, const float aspectRatio) { +YOGA_EXPORT void YGNodeStyleSetAspectRatio( + const YGNodeRef node, + const float aspectRatio) { updateStyle( node, &YGStyle::aspectRatio, YGFloatOptional{aspectRatio}); } -void YGNodeStyleSetWidth(YGNodeRef node, float points) { +YOGA_EXPORT void YGNodeStyleSetWidth(YGNodeRef node, float points) { auto value = detail::CompactValue::ofMaybe(points); updateIndexedStyleProp( node, &YGStyle::dimensions, YGDimensionWidth, value); } -void YGNodeStyleSetWidthPercent(YGNodeRef node, float percent) { +YOGA_EXPORT void YGNodeStyleSetWidthPercent(YGNodeRef node, float percent) { auto value = detail::CompactValue::ofMaybe(percent); updateIndexedStyleProp( node, &YGStyle::dimensions, YGDimensionWidth, value); } -void YGNodeStyleSetWidthAuto(YGNodeRef node) { +YOGA_EXPORT void YGNodeStyleSetWidthAuto(YGNodeRef node) { updateIndexedStyleProp( node, &YGStyle::dimensions, YGDimensionWidth, detail::CompactValue::ofAuto()); } -YGValue YGNodeStyleGetWidth(YGNodeConstRef node) { +YOGA_EXPORT YGValue YGNodeStyleGetWidth(YGNodeConstRef node) { return node->getStyle().dimensions()[YGDimensionWidth]; } -void YGNodeStyleSetHeight(YGNodeRef node, float points) { +YOGA_EXPORT void YGNodeStyleSetHeight(YGNodeRef node, float points) { auto value = detail::CompactValue::ofMaybe(points); updateIndexedStyleProp( node, &YGStyle::dimensions, YGDimensionHeight, value); } -void YGNodeStyleSetHeightPercent(YGNodeRef node, float percent) { +YOGA_EXPORT void YGNodeStyleSetHeightPercent(YGNodeRef node, float percent) { auto value = detail::CompactValue::ofMaybe(percent); updateIndexedStyleProp( node, &YGStyle::dimensions, YGDimensionHeight, value); } -void YGNodeStyleSetHeightAuto(YGNodeRef node) { +YOGA_EXPORT void YGNodeStyleSetHeightAuto(YGNodeRef node) { updateIndexedStyleProp( node, &YGStyle::dimensions, YGDimensionHeight, detail::CompactValue::ofAuto()); } -YGValue YGNodeStyleGetHeight(YGNodeConstRef node) { +YOGA_EXPORT YGValue YGNodeStyleGetHeight(YGNodeConstRef node) { return node->getStyle().dimensions()[YGDimensionHeight]; } -void YGNodeStyleSetMinWidth(const YGNodeRef node, const float minWidth) { +YOGA_EXPORT void YGNodeStyleSetMinWidth( + const YGNodeRef node, + const float minWidth) { auto value = detail::CompactValue::ofMaybe(minWidth); updateIndexedStyleProp( node, &YGStyle::minDimensions, YGDimensionWidth, value); } -void YGNodeStyleSetMinWidthPercent(const YGNodeRef node, const float minWidth) { +YOGA_EXPORT void YGNodeStyleSetMinWidthPercent( + const YGNodeRef node, + const float minWidth) { auto value = detail::CompactValue::ofMaybe(minWidth); updateIndexedStyleProp( node, &YGStyle::minDimensions, YGDimensionWidth, value); } -YGValue YGNodeStyleGetMinWidth(const YGNodeConstRef node) { +YOGA_EXPORT YGValue YGNodeStyleGetMinWidth(const YGNodeConstRef node) { return node->getStyle().minDimensions()[YGDimensionWidth]; }; -void YGNodeStyleSetMinHeight(const YGNodeRef node, const float minHeight) { +YOGA_EXPORT void YGNodeStyleSetMinHeight( + const YGNodeRef node, + const float minHeight) { auto value = detail::CompactValue::ofMaybe(minHeight); updateIndexedStyleProp( node, &YGStyle::minDimensions, YGDimensionHeight, value); } -void YGNodeStyleSetMinHeightPercent( +YOGA_EXPORT void YGNodeStyleSetMinHeightPercent( const YGNodeRef node, const float minHeight) { auto value = detail::CompactValue::ofMaybe(minHeight); updateIndexedStyleProp( node, &YGStyle::minDimensions, YGDimensionHeight, value); } -YGValue YGNodeStyleGetMinHeight(const YGNodeConstRef node) { +YOGA_EXPORT YGValue YGNodeStyleGetMinHeight(const YGNodeConstRef node) { return node->getStyle().minDimensions()[YGDimensionHeight]; }; -void YGNodeStyleSetMaxWidth(const YGNodeRef node, const float maxWidth) { +YOGA_EXPORT void YGNodeStyleSetMaxWidth( + const YGNodeRef node, + const float maxWidth) { auto value = detail::CompactValue::ofMaybe(maxWidth); updateIndexedStyleProp( node, &YGStyle::maxDimensions, YGDimensionWidth, value); } -void YGNodeStyleSetMaxWidthPercent(const YGNodeRef node, const float maxWidth) { +YOGA_EXPORT void YGNodeStyleSetMaxWidthPercent( + const YGNodeRef node, + const float maxWidth) { auto value = detail::CompactValue::ofMaybe(maxWidth); updateIndexedStyleProp( node, &YGStyle::maxDimensions, YGDimensionWidth, value); } -YGValue YGNodeStyleGetMaxWidth(const YGNodeConstRef node) { +YOGA_EXPORT YGValue YGNodeStyleGetMaxWidth(const YGNodeConstRef node) { return node->getStyle().maxDimensions()[YGDimensionWidth]; }; -void YGNodeStyleSetMaxHeight(const YGNodeRef node, const float maxHeight) { +YOGA_EXPORT void YGNodeStyleSetMaxHeight( + const YGNodeRef node, + const float maxHeight) { auto value = detail::CompactValue::ofMaybe(maxHeight); updateIndexedStyleProp( node, &YGStyle::maxDimensions, YGDimensionHeight, value); } -void YGNodeStyleSetMaxHeightPercent( +YOGA_EXPORT void YGNodeStyleSetMaxHeightPercent( const YGNodeRef node, const float maxHeight) { auto value = detail::CompactValue::ofMaybe(maxHeight); updateIndexedStyleProp( node, &YGStyle::maxDimensions, YGDimensionHeight, value); } -YGValue YGNodeStyleGetMaxHeight(const YGNodeConstRef node) { +YOGA_EXPORT YGValue YGNodeStyleGetMaxHeight(const YGNodeConstRef node) { return node->getStyle().maxDimensions()[YGDimensionHeight]; }; -#define YG_NODE_LAYOUT_PROPERTY_IMPL(type, name, instanceName) \ - type YGNodeLayoutGet##name(const YGNodeRef node) { \ - return node->getLayout().instanceName; \ +#define YG_NODE_LAYOUT_PROPERTY_IMPL(type, name, instanceName) \ + YOGA_EXPORT type YGNodeLayoutGet##name(const YGNodeRef node) { \ + return node->getLayout().instanceName; \ } #define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \ - type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \ + YOGA_EXPORT type YGNodeLayoutGet##name( \ + const YGNodeRef node, const YGEdge edge) { \ YGAssertWithNode( \ node, \ edge <= YGEdgeEnd, \ @@ -922,11 +994,12 @@ YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(float, Margin, margin); YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(float, Border, border); YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(float, Padding, padding); -bool YGNodeLayoutGetDidLegacyStretchFlagAffectLayout(const YGNodeRef node) { +YOGA_EXPORT bool YGNodeLayoutGetDidLegacyStretchFlagAffectLayout( + const YGNodeRef node) { return node->getLayout().doesLegacyStretchFlagAffectsLayout(); } -uint32_t gCurrentGenerationCount = 0; +std::atomic gCurrentGenerationCount(0); bool YGLayoutNodeInternal( const YGNodeRef node, @@ -954,7 +1027,9 @@ static void YGNodePrintInternal( Log::log(node, YGLogLevelDebug, nullptr, str.c_str()); } -void YGNodePrint(const YGNodeRef node, const YGPrintOptions options) { +YOGA_EXPORT void YGNodePrint( + const YGNodeRef node, + const YGPrintOptions options) { YGNodePrintInternal(node, options); } #endif @@ -1595,13 +1670,13 @@ static void YGNodeWithMeasureFuncSetMeasuredDimensions( "Expected node to have custom measure function"); const float paddingAndBorderAxisRow = - YGNodePaddingAndBorderForAxis(node, YGFlexDirectionRow, availableWidth); - const float paddingAndBorderAxisColumn = YGNodePaddingAndBorderForAxis( - node, YGFlexDirectionColumn, availableWidth); + YGNodePaddingAndBorderForAxis(node, YGFlexDirectionRow, ownerWidth); + const float paddingAndBorderAxisColumn = + YGNodePaddingAndBorderForAxis(node, YGFlexDirectionColumn, ownerWidth); const float marginAxisRow = - node->getMarginForAxis(YGFlexDirectionRow, availableWidth).unwrap(); + node->getMarginForAxis(YGFlexDirectionRow, ownerWidth).unwrap(); const float marginAxisColumn = - node->getMarginForAxis(YGFlexDirectionColumn, availableWidth).unwrap(); + node->getMarginForAxis(YGFlexDirectionColumn, ownerWidth).unwrap(); // We want to make sure we don't call measure with negative size const float innerWidth = YGFloatIsUndefined(availableWidth) @@ -1793,15 +1868,17 @@ static float YGNodeCalculateAvailableInnerDim( const YGNodeConstRef node, YGFlexDirection axis, float availableDim, - float ownerDim) { + float ownerDim, + float ownerDimForMarginPadding) { YGFlexDirection direction = YGFlexDirectionIsRow(axis) ? YGFlexDirectionRow : YGFlexDirectionColumn; YGDimension dimension = YGFlexDirectionIsRow(axis) ? YGDimensionWidth : YGDimensionHeight; - const float margin = node->getMarginForAxis(direction, ownerDim).unwrap(); + const float margin = + node->getMarginForAxis(direction, ownerDimForMarginPadding).unwrap(); const float paddingAndBorder = - YGNodePaddingAndBorderForAxis(node, direction, ownerDim); + YGNodePaddingAndBorderForAxis(node, direction, ownerDimForMarginPadding); float availableInnerDim = availableDim - margin - paddingAndBorder; // Max dimension overrides predefined dimension value; Min dimension in turn @@ -1844,7 +1921,7 @@ static float YGNodeComputeFlexBasisForChildren( const uint32_t generationCount) { float totalOuterFlexBasis = 0.0f; YGNodeRef singleFlexChild = nullptr; - const YGVector &children = node->getChildren(); + const YGVector& children = node->getChildren(); YGMeasureMode measureModeMainDim = YGFlexDirectionIsRow(mainAxis) ? widthMeasureMode : heightMeasureMode; // If there is only one child with flexGrow + flexShrink it means we can set @@ -2819,9 +2896,9 @@ static void YGNodelayoutImpl( // STEP 2: DETERMINE AVAILABLE SIZE IN MAIN AND CROSS DIRECTIONS float availableInnerWidth = YGNodeCalculateAvailableInnerDim( - node, YGFlexDirectionRow, availableWidth, ownerWidth); + node, YGFlexDirectionRow, availableWidth, ownerWidth, ownerWidth); float availableInnerHeight = YGNodeCalculateAvailableInnerDim( - node, YGFlexDirectionColumn, availableHeight, ownerHeight); + node, YGFlexDirectionColumn, availableHeight, ownerHeight, ownerWidth); float availableInnerMainDim = isMainAxisRow ? availableInnerWidth : availableInnerHeight; @@ -3570,12 +3647,12 @@ static inline bool YGMeasureModeNewMeasureSizeIsStricterAndStillValid( (lastComputedSize <= size || YGFloatsEqual(size, lastComputedSize)); } -float YGRoundValueToPixelGrid( +YOGA_EXPORT float YGRoundValueToPixelGrid( const float value, const float pointScaleFactor, const bool forceCeil, const bool forceFloor) { - float scaledValue = value * pointScaleFactor; + double scaledValue = ((double) value) * pointScaleFactor; // We want to calculate `fractial` such that `floor(scaledValue) = scaledValue // - fractial`. float fractial = fmodf(scaledValue, 1.0f); @@ -3621,7 +3698,7 @@ float YGRoundValueToPixelGrid( : scaledValue / pointScaleFactor; } -bool YGNodeCanUseCachedMeasurement( +YOGA_EXPORT bool YGNodeCanUseCachedMeasurement( const YGMeasureMode widthMode, const float width, const YGMeasureMode heightMode, @@ -3967,7 +4044,7 @@ bool YGLayoutNodeInternal( return (needToVisitNode || cachedResults == nullptr); } -void YGConfigSetPointScaleFactor( +YOGA_EXPORT void YGConfigSetPointScaleFactor( const YGConfigRef config, const float pixelsInPoint) { YGAssertWithConfig( @@ -4064,7 +4141,7 @@ static void unsetUseLegacyFlagRecursively(YGNodeRef node) { } } -void YGNodeCalculateLayoutWithContext( +YOGA_EXPORT void YGNodeCalculateLayoutWithContext( const YGNodeRef node, const float ownerWidth, const float ownerHeight, @@ -4076,7 +4153,7 @@ void YGNodeCalculateLayoutWithContext( // Increment the generation count. This will force the recursive routine to // visit all dirty nodes at least once. Subsequent visits will be skipped if // the input parameters don't change. - gCurrentGenerationCount++; + gCurrentGenerationCount.fetch_add(1, std::memory_order_relaxed); node->resolveDimension(); float width = YGUndefined; YGMeasureMode widthMeasureMode = YGMeasureModeUndefined; @@ -4133,7 +4210,7 @@ void YGNodeCalculateLayoutWithContext( markerData, layoutContext, 0, // tree root - gCurrentGenerationCount)) { + gCurrentGenerationCount.load(std::memory_order_relaxed))) { node->setPosition( node->getLayout().direction(), ownerWidth, ownerHeight, ownerWidth); YGRoundToPixelGrid(node, node->getConfig()->pointScaleFactor, 0.0f, 0.0f); @@ -4164,7 +4241,7 @@ void YGNodeCalculateLayoutWithContext( nodeWithoutLegacyFlag->resolveDimension(); // Recursively mark nodes as dirty nodeWithoutLegacyFlag->markDirtyAndPropogateDownwards(); - gCurrentGenerationCount++; + gCurrentGenerationCount.fetch_add(1, std::memory_order_relaxed); // Rerun the layout, and calculate the diff unsetUseLegacyFlagRecursively(nodeWithoutLegacyFlag); LayoutData layoutMarkerData = {}; @@ -4183,7 +4260,7 @@ void YGNodeCalculateLayoutWithContext( layoutMarkerData, layoutContext, 0, // tree root - gCurrentGenerationCount)) { + gCurrentGenerationCount.load(std::memory_order_relaxed))) { nodeWithoutLegacyFlag->setPosition( nodeWithoutLegacyFlag->getLayout().direction(), ownerWidth, @@ -4215,7 +4292,7 @@ void YGNodeCalculateLayoutWithContext( } } -void YGNodeCalculateLayout( +YOGA_EXPORT void YGNodeCalculateLayout( const YGNodeRef node, const float ownerWidth, const float ownerHeight, @@ -4224,7 +4301,7 @@ void YGNodeCalculateLayout( node, ownerWidth, ownerHeight, ownerDirection, nullptr); } -void YGConfigSetLogger(const YGConfigRef config, YGLogger logger) { +YOGA_EXPORT void YGConfigSetLogger(const YGConfigRef config, YGLogger logger) { if (logger != nullptr) { config->setLogger(logger); } else { @@ -4236,7 +4313,7 @@ void YGConfigSetLogger(const YGConfigRef config, YGLogger logger) { } } -void YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour( +YOGA_EXPORT void YGConfigSetShouldDiffLayoutWithoutLegacyStretchBehaviour( const YGConfigRef config, const bool shouldDiffLayout) { config->shouldDiffLayoutWithoutLegacyStretchBehaviour = shouldDiffLayout; @@ -4266,7 +4343,7 @@ void YGAssertWithConfig( } } -void YGConfigSetExperimentalFeatureEnabled( +YOGA_EXPORT void YGConfigSetExperimentalFeatureEnabled( const YGConfigRef config, const YGExperimentalFeature feature, const bool enabled) { @@ -4279,11 +4356,13 @@ inline bool YGConfigIsExperimentalFeatureEnabled( return config->experimentalFeatures[feature]; } -void YGConfigSetUseWebDefaults(const YGConfigRef config, const bool enabled) { +YOGA_EXPORT void YGConfigSetUseWebDefaults( + const YGConfigRef config, + const bool enabled) { config->useWebDefaults = enabled; } -void YGConfigSetUseLegacyStretchBehaviour( +YOGA_EXPORT void YGConfigSetUseLegacyStretchBehaviour( const YGConfigRef config, const bool useLegacyStretchBehaviour) { config->useLegacyStretchBehaviour = useLegacyStretchBehaviour; @@ -4293,15 +4372,23 @@ bool YGConfigGetUseWebDefaults(const YGConfigRef config) { return config->useWebDefaults; } +<<<<<<< Upstream +YOGA_EXPORT void YGConfigSetContext(const YGConfigRef config, void* context) { + config->context = context; +} + +YOGA_EXPORT void* YGConfigGetContext(const YGConfigRef config) { +======= void YGConfigSetContext(const YGConfigRef config, void *context) { config->context = context; } void *YGConfigGetContext(const YGConfigRef config) { +>>>>>>> Override return config->context; } -void YGConfigSetCloneNodeFunc( +YOGA_EXPORT void YGConfigSetCloneNodeFunc( const YGConfigRef config, const YGCloneNodeFunc callback) { config->setCloneNodeCallback(callback); diff --git a/vnext/DeforkingPatches/overrides.json b/vnext/DeforkingPatches/overrides.json index 0d3e1231e05..dde93dd7c94 100644 --- a/vnext/DeforkingPatches/overrides.json +++ b/vnext/DeforkingPatches/overrides.json @@ -1,35 +1,27 @@ { "overrides": [ - { - "type": "patch", - "file": "ReactCommon\\cxxreact\\NativeToJsBridge.h", - "baseFile": "ReactCommon\\cxxreact\\NativeToJsBridge.h", - "baseVersion": "0.61.5", - "baseHash": "b499aa46b3ed91570f8cb0de60e3add6c48cdf12", - "issue": "LEGACY_FIXME" - }, { "type": "patch", "file": "ReactCommon\\turbomodule\\samples\\SampleTurboCxxModule.cpp", "baseFile": "ReactCommon\\turbomodule\\samples\\SampleTurboCxxModule.cpp", - "baseVersion": "0.61.5", - "baseHash": "32ede21afc7337f33184e0ce267b6fde32a6dcc1", + "baseVersion": "0.62.0-rc.3", + "baseHash": "b8840ecbf1d0a61d5e13d6f9690722e41cacb7ab", "issue": "LEGACY_FIXME" }, { "type": "patch", "file": "ReactCommon\\turbomodule\\samples\\SampleTurboCxxModule.h", "baseFile": "ReactCommon\\turbomodule\\samples\\SampleTurboCxxModule.h", - "baseVersion": "0.61.5", - "baseHash": "d4b1ccfd00c77d4a9dacf5f1e668119847895895", + "baseVersion": "0.62.0-rc.3", + "baseHash": "2e4e38798e5504d891342e46da17ef3b073123d8", "issue": "LEGACY_FIXME" }, { "type": "patch", "file": "ReactCommon\\yoga\\yoga\\Yoga.cpp", "baseFile": "ReactCommon\\yoga\\yoga\\Yoga.cpp", - "baseVersion": "0.61.5", - "baseHash": "73d61e0276175fd2c9649f4c4b390f6173d365ae", + "baseVersion": "0.62.0-rc.3", + "baseHash": "20b4e90cca3e5e5bfcaa5fda7bb322a7efee1fa9", "issue": 3994 } ] From 2bda9c5981d0cf55869a53f9685711d79e15a139 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Thu, 12 Mar 2020 04:10:12 -0700 Subject: [PATCH 03/70] Update ReactCopies --- .../AccessibilityManagerTest.js | 2 +- .../IntegrationTests/AppEventsTest.js | 9 +- .../IntegrationTests/AsyncStorageTest.js | 4 +- .../GlobalEvalWithSourceUrlTest.js | 2 +- .../IntegrationTests/ImageCachePolicyTest.js | 13 +- .../IntegrationTests/ImageSnapshotTest.js | 2 +- .../IntegrationTests/IntegrationTestsApp.js | 2 +- .../IntegrationTests/LayoutEventsTest.js | 3 +- .../IntegrationTests/PromiseTest.js | 2 +- .../ReactContentSizeUpdateTest.js | 2 +- .../IntegrationTests/SimpleSnapshotTest.js | 4 +- .../SizeFlexibilityUpdateTest.js | 5 +- .../IntegrationTests/SyncMethodTest.js | 2 +- .../IntegrationTests/WebSocketTest.js | 3 +- .../websocket_integration_test_server.js | 2 +- .../RNTester/js/RNTesterApp.android.js | 199 +++++-- .../RNTester/js/RNTesterApp.ios.js | 134 +++-- .../js/components/ListExampleShared.js | 17 +- .../RNTester/js/components/RNTesterBlock.js | 51 +- .../RNTester/js/components/RNTesterButton.js | 2 +- .../js/components/RNTesterExampleFilter.js | 57 +- .../js/components/RNTesterExampleList.js | 147 ++++-- .../RNTester/js/components/RNTesterPage.js | 27 +- .../RNTester/js/components/RNTesterTitle.js | 24 +- .../RNTester/js/components/TextLegend.js | 4 +- .../js/components/createExamplePage.js | 2 +- .../RNTester/js/examples/ART/ARTExample.js | 105 ---- .../AccessibilityAndroidExample.android.js | 4 +- .../Accessibility/AccessibilityExample.js | 248 +++++++-- .../ActivityIndicatorExample.js | 2 +- .../Animated/AnimatedGratuitousApp/AnExApp.js | 23 +- .../AnimatedGratuitousApp/AnExBobble.js | 2 +- .../AnimatedGratuitousApp/AnExChained.js | 1 + .../AnimatedGratuitousApp/AnExScroll.js | 1 + .../Animated/AnimatedGratuitousApp/AnExSet.js | 1 + .../AnimatedGratuitousApp/AnExTilt.js | 1 + .../AsyncStorage/AsyncStorageExample.js | 2 +- .../js/examples/Button/ButtonExample.js | 77 ++- .../examples/Dimensions/DimensionsExample.js | 4 +- .../js/examples/FlatList/FlatListExample.js | 33 +- .../InputAccessoryViewExample.js | 2 +- .../KeyboardAvoidingViewExample.js | 3 +- .../examples/Layout/LayoutAnimationExample.js | 6 +- .../js/examples/Layout/LayoutEventsExample.js | 1 + .../js/examples/Modal/ModalExample.js | 2 +- .../MultiColumn/MultiColumnExample.js | 15 +- .../NativeAnimationsExample.js | 17 +- .../NewAppScreen/NewAppScreenExample.js | 1 + .../OrientationChangeExample.js | 2 +- .../PanResponder/PanResponderExample.js | 101 ++-- .../PermissionsAndroid/PermissionsExample.js | 4 +- .../js/examples/Picker/PickerExample.js | 18 +- .../js/examples/Picker/PickerIOSExample.js | 4 +- .../PointerEvents/PointerEventsExample.js | 4 +- .../ProgressBarAndroidExample.android.js | 22 +- .../ProgressViewIOS/ProgressViewIOSExample.js | 5 +- .../PushNotificationIOSExample.js | 2 +- .../RCTRootView/RCTRootViewIOSExample.js | 4 +- .../RNTester/js/examples/RTL/RTLExample.js | 7 +- .../RootViewSizeFlexibilityExampleApp.js | 4 +- .../SafeAreaView/SafeAreaViewExample.js | 5 +- .../ScrollView/ScrollViewAnimatedExample.js | 4 +- .../examples/ScrollView/ScrollViewExample.js | 27 +- .../ScrollView/ScrollViewSimpleExample.js | 5 +- .../SectionList/SectionListExample.js | 12 +- .../SegmentedControlIOSExample.js | 12 +- .../js/examples/Share/ShareExample.js | 3 - .../js/examples/Slider/SliderExample.js | 73 +-- .../js/examples/Snapshot/SnapshotExample.js | 3 +- .../examples/Snapshot/SnapshotViewIOS.ios.js | 4 +- .../js/examples/StatusBar/StatusBarExample.js | 19 +- .../js/examples/Switch/SwitchExample.js | 4 +- .../js/examples/Text/TextExample.android.js | 165 +++++- .../js/examples/Text/TextExample.ios.js | 10 +- .../TextInput/TextInputExample.android.js | 487 +----------------- .../TextInput/TextInputExample.ios.js | 471 +---------------- .../TimePicker/TimePickerAndroidExample.js | 125 ----- .../ToastAndroidExample.android.js | 10 +- .../js/examples/Touchable/TouchableExample.js | 80 ++- .../js/examples/Transform/TransformExample.js | 124 +++-- .../TransparentHitTestExample.js | 2 +- .../TurboModule/SampleTurboModuleExample.js | 17 +- .../js/examples/WebSocket/WebSocketExample.js | 1 + .../js/examples/WebSocket/http_test_server.js | 1 + .../WebSocket/websocket_test_server.js | 1 + .../examples/XHR/XHRExampleAbortController.js | 5 +- .../js/examples/XHR/XHRExampleBinaryUpload.js | 6 +- .../js/examples/XHR/XHRExampleDownload.js | 2 +- .../RNTester/js/utils/RNTesterActions.js | 13 +- .../RNTester/js/utils/RNTesterList.android.js | 18 +- .../RNTester/js/utils/RNTesterList.ios.js | 16 +- .../js/utils/RNTesterNavigationReducer.js | 4 +- .../js/utils/RNTesterStatePersister.js | 4 +- vnext/ReactCopies/overrides.json | 380 +++++++------- 94 files changed, 1573 insertions(+), 1989 deletions(-) delete mode 100644 vnext/ReactCopies/RNTester/js/examples/ART/ARTExample.js delete mode 100644 vnext/ReactCopies/RNTester/js/examples/TimePicker/TimePickerAndroidExample.js diff --git a/vnext/ReactCopies/IntegrationTests/AccessibilityManagerTest.js b/vnext/ReactCopies/IntegrationTests/AccessibilityManagerTest.js index 313b8990346..dd155cec22c 100644 --- a/vnext/ReactCopies/IntegrationTests/AccessibilityManagerTest.js +++ b/vnext/ReactCopies/IntegrationTests/AccessibilityManagerTest.js @@ -18,7 +18,7 @@ const {TestModule} = ReactNative.NativeModules; import NativeAccessibilityManager from 'react-native/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager'; import invariant from 'invariant'; -class AccessibilityManagerTest extends React.Component<{}> { +class AccessibilityManagerTest extends React.Component<{...}> { componentDidMount() { invariant( NativeAccessibilityManager, diff --git a/vnext/ReactCopies/IntegrationTests/AppEventsTest.js b/vnext/ReactCopies/IntegrationTests/AppEventsTest.js index 4bc0b0649c1..650203ed233 100644 --- a/vnext/ReactCopies/IntegrationTests/AppEventsTest.js +++ b/vnext/ReactCopies/IntegrationTests/AppEventsTest.js @@ -19,14 +19,19 @@ const deepDiffer = require('react-native/Libraries/Utilities/differ/deepDiffer') const TEST_PAYLOAD = {foo: 'bar'}; -type AppEvent = {data: Object, ts: number}; +type AppEvent = { + data: Object, + ts: number, + ... +}; type State = { sent: 'none' | AppEvent, received: 'none' | AppEvent, elapsed?: string, + ... }; -class AppEventsTest extends React.Component<{}, State> { +class AppEventsTest extends React.Component<{...}, State> { state: State = {sent: 'none', received: 'none'}; componentDidMount() { diff --git a/vnext/ReactCopies/IntegrationTests/AsyncStorageTest.js b/vnext/ReactCopies/IntegrationTests/AsyncStorageTest.js index 5df923c7f67..e33cedfdd82 100644 --- a/vnext/ReactCopies/IntegrationTests/AsyncStorageTest.js +++ b/vnext/ReactCopies/IntegrationTests/AsyncStorageTest.js @@ -171,8 +171,8 @@ function testOptimizedMultiGet() { }); } -class AsyncStorageTest extends React.Component<{}, $FlowFixMeState> { - state: any | $TEMPORARY$object<{|done: boolean, messages: string|}> = { +class AsyncStorageTest extends React.Component<{...}, $FlowFixMeState> { + state: any | {|done: boolean, messages: string|} = { messages: 'Initializing...', done: false, }; diff --git a/vnext/ReactCopies/IntegrationTests/GlobalEvalWithSourceUrlTest.js b/vnext/ReactCopies/IntegrationTests/GlobalEvalWithSourceUrlTest.js index 0fd59bc2644..52fbe0e2fa8 100644 --- a/vnext/ReactCopies/IntegrationTests/GlobalEvalWithSourceUrlTest.js +++ b/vnext/ReactCopies/IntegrationTests/GlobalEvalWithSourceUrlTest.js @@ -17,7 +17,7 @@ const {View} = ReactNative; const {TestModule} = ReactNative.NativeModules; -class GlobalEvalWithSourceUrlTest extends React.Component<{}> { +class GlobalEvalWithSourceUrlTest extends React.Component<{...}> { componentDidMount() { if (typeof global.globalEvalWithSourceUrl !== 'function') { throw new Error( diff --git a/vnext/ReactCopies/IntegrationTests/ImageCachePolicyTest.js b/vnext/ReactCopies/IntegrationTests/ImageCachePolicyTest.js index d25e6c2b86e..03857091072 100644 --- a/vnext/ReactCopies/IntegrationTests/ImageCachePolicyTest.js +++ b/vnext/ReactCopies/IntegrationTests/ImageCachePolicyTest.js @@ -27,16 +27,17 @@ const {TestModule} = ReactNative.NativeModules; const TESTS = ['only-if-cached', 'default', 'reload', 'force-cache']; -type Props = {}; +type Props = {...}; type State = { 'only-if-cached'?: boolean, default?: boolean, reload?: boolean, 'force-cache'?: boolean, + ... }; class ImageCachePolicyTest extends React.Component { - state: $FlowFixMe | $TEMPORARY$object<{||}> = {}; + state: $FlowFixMe | {...} = {}; shouldComponentUpdate(nextProps: Props, nextState: State): boolean { const results: Array = TESTS.map(x => nextState[x]); @@ -63,7 +64,7 @@ class ImageCachePolicyTest extends React.Component { { { { { +class ImageSnapshotTest extends React.Component<{...}> { componentDidMount() { if (!TestModule.verifySnapshot) { throw new Error('TestModule.verifySnapshot not defined.'); diff --git a/vnext/ReactCopies/IntegrationTests/IntegrationTestsApp.js b/vnext/ReactCopies/IntegrationTests/IntegrationTestsApp.js index c8af81bf126..c52fe515221 100644 --- a/vnext/ReactCopies/IntegrationTests/IntegrationTestsApp.js +++ b/vnext/ReactCopies/IntegrationTests/IntegrationTestsApp.js @@ -51,7 +51,7 @@ require('./LoggingTestModule'); type Test = any; -class IntegrationTestsApp extends React.Component<{}, $FlowFixMeState> { +class IntegrationTestsApp extends React.Component<{...}, $FlowFixMeState> { state = { test: (null: ?Test), }; diff --git a/vnext/ReactCopies/IntegrationTests/LayoutEventsTest.js b/vnext/ReactCopies/IntegrationTests/LayoutEventsTest.js index 42def2c419b..c86592a600b 100644 --- a/vnext/ReactCopies/IntegrationTests/LayoutEventsTest.js +++ b/vnext/ReactCopies/IntegrationTests/LayoutEventsTest.js @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. * * @format - * @flow + * @flow strict-local */ 'use strict'; @@ -38,6 +38,7 @@ type State = { viewLayout?: Layout, viewStyle?: ViewStyleProp, containerStyle?: ViewStyleProp, + ... }; class LayoutEventsTest extends React.Component { diff --git a/vnext/ReactCopies/IntegrationTests/PromiseTest.js b/vnext/ReactCopies/IntegrationTests/PromiseTest.js index b35c971fc34..809f6eb873d 100644 --- a/vnext/ReactCopies/IntegrationTests/PromiseTest.js +++ b/vnext/ReactCopies/IntegrationTests/PromiseTest.js @@ -15,7 +15,7 @@ const ReactNative = require('react-native'); const {View} = ReactNative; const {TestModule} = ReactNative.NativeModules; -class PromiseTest extends React.Component<{}> { +class PromiseTest extends React.Component<{...}> { shouldResolve: boolean = false; shouldReject: boolean = false; shouldSucceedAsync: boolean = false; diff --git a/vnext/ReactCopies/IntegrationTests/ReactContentSizeUpdateTest.js b/vnext/ReactCopies/IntegrationTests/ReactContentSizeUpdateTest.js index 47373d6f2a8..eefb6681b25 100644 --- a/vnext/ReactCopies/IntegrationTests/ReactContentSizeUpdateTest.js +++ b/vnext/ReactCopies/IntegrationTests/ReactContentSizeUpdateTest.js @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. * * @format - * @flow + * @flow strict-local */ 'use strict'; diff --git a/vnext/ReactCopies/IntegrationTests/SimpleSnapshotTest.js b/vnext/ReactCopies/IntegrationTests/SimpleSnapshotTest.js index 90cb3f1e17c..db50c75e2fa 100644 --- a/vnext/ReactCopies/IntegrationTests/SimpleSnapshotTest.js +++ b/vnext/ReactCopies/IntegrationTests/SimpleSnapshotTest.js @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. * * @format - * @flow + * @flow strict-local */ 'use strict'; @@ -18,7 +18,7 @@ const requestAnimationFrame = require('fbjs/lib/requestAnimationFrame'); const {StyleSheet, View} = ReactNative; const {TestModule} = ReactNative.NativeModules; -class SimpleSnapshotTest extends React.Component<{}> { +class SimpleSnapshotTest extends React.Component<{...}> { componentDidMount() { if (!TestModule.verifySnapshot) { throw new Error('TestModule.verifySnapshot not defined.'); diff --git a/vnext/ReactCopies/IntegrationTests/SizeFlexibilityUpdateTest.js b/vnext/ReactCopies/IntegrationTests/SizeFlexibilityUpdateTest.js index 419083c57a3..fe7a2944853 100644 --- a/vnext/ReactCopies/IntegrationTests/SizeFlexibilityUpdateTest.js +++ b/vnext/ReactCopies/IntegrationTests/SizeFlexibilityUpdateTest.js @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. * * @format - * @flow + * @flow strict-local */ 'use strict'; @@ -54,7 +54,8 @@ class SizeFlexibilityUpdateTest extends React.Component { rootViewDidChangeIntrinsicSize: (intrinsicSize: { height: number, width: number, - }) => void = (intrinsicSize: {width: number, height: number}) => { + ... + }) => void = (intrinsicSize: {width: number, height: number, ...}) => { if (finalState) { // If a test reaches its final state, it is not expected to do anything more TestModule.markTestPassed(false); diff --git a/vnext/ReactCopies/IntegrationTests/SyncMethodTest.js b/vnext/ReactCopies/IntegrationTests/SyncMethodTest.js index 8dbb5b94ad7..077884256d2 100644 --- a/vnext/ReactCopies/IntegrationTests/SyncMethodTest.js +++ b/vnext/ReactCopies/IntegrationTests/SyncMethodTest.js @@ -16,7 +16,7 @@ const {View} = ReactNative; const {TestModule, RNTesterTestModule} = ReactNative.NativeModules; -class SyncMethodTest extends React.Component<{}> { +class SyncMethodTest extends React.Component<{...}> { componentDidMount() { if ( RNTesterTestModule.echoString('test string value') !== 'test string value' diff --git a/vnext/ReactCopies/IntegrationTests/WebSocketTest.js b/vnext/ReactCopies/IntegrationTests/WebSocketTest.js index fcc2d74cb8d..3435feabb11 100644 --- a/vnext/ReactCopies/IntegrationTests/WebSocketTest.js +++ b/vnext/ReactCopies/IntegrationTests/WebSocketTest.js @@ -28,9 +28,10 @@ type State = { lastMessage: ?string | ?ArrayBuffer, testMessage: string, testExpectedResponse: string, + ... }; -class WebSocketTest extends React.Component<{}, State> { +class WebSocketTest extends React.Component<{...}, State> { state: State = { url: DEFAULT_WS_URL, fetchStatus: null, diff --git a/vnext/ReactCopies/IntegrationTests/websocket_integration_test_server.js b/vnext/ReactCopies/IntegrationTests/websocket_integration_test_server.js index 6d4c2d27731..36c73bed65e 100644 --- a/vnext/ReactCopies/IntegrationTests/websocket_integration_test_server.js +++ b/vnext/ReactCopies/IntegrationTests/websocket_integration_test_server.js @@ -1,5 +1,4 @@ #!/usr/bin/env node - /** * Copyright (c) Facebook, Inc. and its affiliates. * @@ -9,6 +8,7 @@ * @flow * @format */ + 'use strict'; /* eslint-env node */ diff --git a/vnext/ReactCopies/RNTester/js/RNTesterApp.android.js b/vnext/ReactCopies/RNTester/js/RNTesterApp.android.js index bd5201d86af..fd3655deec2 100644 --- a/vnext/ReactCopies/RNTester/js/RNTesterApp.android.js +++ b/vnext/ReactCopies/RNTester/js/RNTesterApp.android.js @@ -10,7 +10,16 @@ 'use strict'; +const RNTesterActions = require('./utils/RNTesterActions'); +const RNTesterExampleContainer = require('./components/RNTesterExampleContainer'); +const RNTesterExampleList = require('./components/RNTesterExampleList'); +const RNTesterList = require('./utils/RNTesterList'); +const RNTesterNavigationReducer = require('./utils/RNTesterNavigationReducer'); const React = require('react'); +const URIActionMap = require('./utils/URIActionMap'); + +const nativeImageSource = require('../../Libraries/Image/nativeImageSource'); + const { AppRegistry, AsyncStorage, @@ -24,26 +33,19 @@ const { Text, TouchableWithoutFeedback, UIManager, + useColorScheme, View, } = require('react-native'); -const RNTesterActions = require('./utils/RNTesterActions'); -const RNTesterExampleContainer = require('./components/RNTesterExampleContainer'); -const RNTesterExampleList = require('./components/RNTesterExampleList'); -const RNTesterList = require('./utils/RNTesterList'); -const RNTesterNavigationReducer = require('./utils/RNTesterNavigationReducer'); -const URIActionMap = require('./utils/URIActionMap'); - -const nativeImageSource = require('../../Libraries/Image/nativeImageSource'); +import type {RNTesterExample} from './types/RNTesterTypes'; import type {RNTesterNavigationState} from './utils/RNTesterNavigationReducer'; +import {RNTesterThemeContext, themes} from './components/RNTesterTheme'; UIManager.setLayoutAnimationEnabledExperimental(true); const DRAWER_WIDTH_LEFT = 56; -type Props = { - exampleFromAppetizeParams?: ?string, -}; +type Props = {exampleFromAppetizeParams?: ?string, ...}; const APP_STATE_KEY = 'RNTesterAppState.v2'; @@ -53,18 +55,115 @@ const HEADER_NAV_ICON = nativeImageSource({ height: 48, }); -const Header = ({title, onPressDrawer}) => { +const Header = ({ + onPressDrawer, + title, +}: { + onPressDrawer?: () => mixed, + title: string, + ... +}) => ( + + {theme => { + return ( + + + + {title} + + + + + + + + + ); + }} + +); + +const RNTesterExampleContainerViaHook = ({ + onPressDrawer, + title, + module, + exampleRef, +}: { + onPressDrawer?: () => mixed, + title: string, + module: RNTesterExample, + exampleRef: () => void, + ... +}) => { + const colorScheme = useColorScheme(); + const theme = colorScheme === 'dark' ? themes.dark : themes.light; return ( - - - {title} + + +
+ - - - - + + ); +}; + +const RNTesterDrawerContentViaHook = ({ + onNavigate, + list, +}: { + onNavigate?: () => mixed, + list: { + ComponentExamples: Array, + APIExamples: Array, + ... + }, + ... +}) => { + const colorScheme = useColorScheme(); + const theme = colorScheme === 'dark' ? themes.dark : themes.light; + return ( + + + - + + ); +}; + +const RNTesterExampleListViaHook = ({ + title, + onPressDrawer, + onNavigate, + list, +}: { + title: string, + onPressDrawer?: () => mixed, + onNavigate?: () => mixed, + list: { + ComponentExamples: Array, + APIExamples: Array, + ... + }, + ... +}) => { + const colorScheme = useColorScheme(); + const theme = colorScheme === 'dark' ? themes.dark : themes.light; + return ( + + +
+ + + ); }; @@ -99,7 +198,7 @@ class RNTesterApp extends React.Component { }); } - render() { + render(): React.Node { if (!this.state) { return null; } @@ -132,14 +231,10 @@ class RNTesterApp extends React.Component { _renderDrawerContent = () => { return ( - - - + ); }; @@ -163,39 +258,31 @@ class RNTesterApp extends React.Component { ); } else if (ExampleModule) { return ( - -
=0.78.0 site=react_native_android_fb) This issue was found + * when making Flow check .android.js files. */ + onPressDrawer={() => this.drawer.openDrawer()} + title={ExampleModule.title} + module={ExampleModule} + exampleRef={example => { /* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue * was found when making Flow check .android.js files. */ - onPressDrawer={() => this.drawer.openDrawer()} - /> - { - /* $FlowFixMe(>=0.78.0 site=react_native_android_fb) This issue - * was found when making Flow check .android.js files. */ - this._exampleRef = example; - }} - /> - + this._exampleRef = example; + }} + /> ); } } return ( - -
=0.78.0 site=react_native_android_fb) This issue - * was found when making Flow check .android.js files. */ - onPressDrawer={() => this.drawer.openDrawer()} - /> - - + =0.78.0 site=react_native_android_fb) This issue was found + * when making Flow check .android.js files. */ + onPressDrawer={() => this.drawer.openDrawer()} + onNavigate={this._handleAction} + list={RNTesterList} + /> ); } @@ -245,7 +332,6 @@ const styles = StyleSheet.create({ flex: 1, }, toolbar: { - backgroundColor: '#E9EAED', height: 56, }, toolbarLeft: { @@ -267,7 +353,6 @@ const styles = StyleSheet.create({ drawerContentWrapper: { flex: 1, paddingTop: StatusBar.currentHeight, - backgroundColor: 'white', }, }); diff --git a/vnext/ReactCopies/RNTester/js/RNTesterApp.ios.js b/vnext/ReactCopies/RNTester/js/RNTesterApp.ios.js index 646b33920c9..8245a68d12b 100644 --- a/vnext/ReactCopies/RNTester/js/RNTesterApp.ios.js +++ b/vnext/ReactCopies/RNTester/js/RNTesterApp.ios.js @@ -25,9 +25,11 @@ const { BackHandler, Button, Linking, + Platform, SafeAreaView, StyleSheet, Text, + useColorScheme, View, YellowBox, } = require('react-native'); @@ -35,10 +37,10 @@ const { import type {RNTesterExample} from './types/RNTesterTypes'; import type {RNTesterAction} from './utils/RNTesterActions'; import type {RNTesterNavigationState} from './utils/RNTesterNavigationReducer'; +import {RNTesterThemeContext, themes} from './components/RNTesterTheme'; +import type {ColorSchemeName} from '../../Libraries/Utilities/NativeAppearance'; -type Props = { - exampleFromAppetizeParams?: ?string, -}; +type Props = {exampleFromAppetizeParams?: ?string, ...}; YellowBox.ignoreWarnings([ 'Module RCTImagePickerManager requires main queue setup', @@ -46,21 +48,96 @@ YellowBox.ignoreWarnings([ const APP_STATE_KEY = 'RNTesterAppState.v2'; -const Header = ({onBack, title}: {onBack?: () => mixed, title: string}) => ( - - - - {title} - - {onBack && ( - -