From d2aea7b194e592063b602f7afa9a770946707c03 Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Thu, 18 Nov 2021 20:50:25 +0200 Subject: [PATCH 1/4] package.json: add patch-package as dev dependency --- package-lock.json | 205 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 206 insertions(+) diff --git a/package-lock.json b/package-lock.json index 6d7c78c7f137..3023b8545ac3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15399,6 +15399,12 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", "dev": true }, + "@yarnpkg/lockfile": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz", + "integrity": "sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ==", + "dev": true + }, "abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -24183,6 +24189,66 @@ "path-exists": "^4.0.0" } }, + "find-yarn-workspace-root": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz", + "integrity": "sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ==", + "dev": true, + "requires": { + "micromatch": "^4.0.2" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + } + }, + "picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, "findup-sync": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", @@ -30398,6 +30464,15 @@ "graceful-fs": "^4.1.9" } }, + "klaw-sync": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz", + "integrity": "sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11" + } + }, "kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -34210,6 +34285,136 @@ "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" }, + "patch-package": { + "version": "6.4.7", + "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.4.7.tgz", + "integrity": "sha512-S0vh/ZEafZ17hbhgqdnpunKDfzHQibQizx9g8yEf5dcVk3KOflOfdufRXQX8CSEkyOQwuM/bNz1GwKvFj54kaQ==", + "dev": true, + "requires": { + "@yarnpkg/lockfile": "^1.1.0", + "chalk": "^2.4.2", + "cross-spawn": "^6.0.5", + "find-yarn-workspace-root": "^2.0.0", + "fs-extra": "^7.0.1", + "is-ci": "^2.0.0", + "klaw-sync": "^6.0.0", + "minimist": "^1.2.0", + "open": "^7.4.2", + "rimraf": "^2.6.3", + "semver": "^5.6.0", + "slash": "^2.0.0", + "tmp": "^0.0.33" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "open": { + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", + "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "dev": true, + "requires": { + "is-docker": "^2.0.0", + "is-wsl": "^2.1.1" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + } + } + }, "path-browserify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", diff --git a/package.json b/package.json index 7f6991b983d2..bf16f0c5ebe9 100644 --- a/package.json +++ b/package.json @@ -159,6 +159,7 @@ "jest-cli": "^26.5.2", "metro-react-native-babel-preset": "^0.61.0", "mock-fs": "^4.13.0", + "patch-package": "^6.4.7", "portfinder": "^1.0.28", "pusher-js-mock": "^0.3.3", "react-hot-loader": "^4.12.21", From 9d5c27edec280c6b716627b2fadad983676ef7e4 Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Thu, 18 Nov 2021 20:57:20 +0200 Subject: [PATCH 2/4] package.json: use react-native-web v0.17.5 --- package-lock.json | 84 +++++++++++++++++++++++++++++++++++++++++++++-- package.json | 2 +- 2 files changed, 83 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3023b8545ac3..f1a9ce1b64e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16000,6 +16000,11 @@ "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz", "integrity": "sha1-fajPLiZijtcygDWB/SH2fKzS7uw=" }, + "array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" + }, "array-flat-polyfill": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-flat-polyfill/-/array-flat-polyfill-1.0.1.tgz", @@ -19551,6 +19556,15 @@ "sha.js": "^2.4.8" } }, + "create-react-class": { + "version": "15.7.0", + "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.7.0.tgz", + "integrity": "sha512-QZv4sFWG9S5RUvkTYWbflxeZX+JG7Cz0Tn33rQBJ+WFQTqTfUTjMjiv9tnfXazjsO5r0KhPs+AqCjyrQX6h2ng==", + "requires": { + "loose-envify": "^1.3.1", + "object-assign": "^4.1.1" + } + }, "create-react-context": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/create-react-context/-/create-react-context-0.3.0.tgz", @@ -19622,6 +19636,15 @@ "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", "integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU=" }, + "css-in-js-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/css-in-js-utils/-/css-in-js-utils-2.0.1.tgz", + "integrity": "sha512-PJF0SpJT+WdbVVt0AOYp9C8GnuruRlL/UFW7932nLWmFLQTaWEzTBQEx7/hn4BuV+WON75iAViSUJLiU3PKbpA==", + "requires": { + "hyphenate-style-name": "^1.0.2", + "isobject": "^3.0.1" + } + }, "css-loader": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-5.2.4.tgz", @@ -25740,6 +25763,11 @@ "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", "dev": true }, + "hyphenate-style-name": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", + "integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==" + }, "iconv-corefoundation": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/iconv-corefoundation/-/iconv-corefoundation-1.1.6.tgz", @@ -25927,6 +25955,14 @@ "integrity": "sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==", "dev": true }, + "inline-style-prefixer": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/inline-style-prefixer/-/inline-style-prefixer-6.0.1.tgz", + "integrity": "sha512-AsqazZ8KcRzJ9YPN1wMH2aNM7lkWQ8tSPrW5uDk1ziYwiAPWSZnUsC7lfZq+BDqLqz0B4Pho5wscWcJzVvRzDQ==", + "requires": { + "css-in-js-utils": "^2.0.0" + } + }, "inquirer": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", @@ -33460,6 +33496,11 @@ "integrity": "sha512-ma6oU4Sk0qOoKEAymVoTvk8EdXEobdS7m/mAGhDJ8Rouugho48crHBORAmy5BoOcv8wraPM6xumapQp5hl4iIQ==", "dev": true }, + "normalize-css-color": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/normalize-css-color/-/normalize-css-color-1.0.2.tgz", + "integrity": "sha1-Apkel8zOxmI/5XOvu/Deah8+n40=" + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -37281,8 +37322,47 @@ } }, "react-native-web": { - "version": "git+https://github.com/Expensify/react-native-web.git#bfe201af25f9bd465af203b02fc978515b96e956", - "from": "git+https://github.com/Expensify/react-native-web.git#bfe201af25f9bd465af203b02fc978515b96e956" + "version": "0.17.5", + "resolved": "https://registry.npmjs.org/react-native-web/-/react-native-web-0.17.5.tgz", + "integrity": "sha512-pdieIZi2/YeVTaOuIaeaLC6FMkk8h3pvPNruedH+6cWiE15Oz6BGjJ+5IafdXEyiipb1Y0+QuecW81fa3DVM4g==", + "requires": { + "array-find-index": "^1.0.2", + "create-react-class": "^15.7.0", + "fbjs": "^3.0.0", + "hyphenate-style-name": "^1.0.4", + "inline-style-prefixer": "^6.0.0", + "normalize-css-color": "^1.0.2", + "prop-types": "^15.6.0" + }, + "dependencies": { + "fbjs": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-3.0.1.tgz", + "integrity": "sha512-8+vkGyT4lNDRKHQNPp0yh/6E7FfkLg89XqQbOYnvntRh+8RiSD43yrh9E5ejp1muCizTL4nDVG+y8W4e+LROHg==", + "requires": { + "cross-fetch": "^3.0.4", + "fbjs-css-vars": "^1.0.0", + "loose-envify": "^1.0.0", + "object-assign": "^4.1.0", + "promise": "^7.1.1", + "setimmediate": "^1.0.5", + "ua-parser-js": "^0.7.30" + } + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "requires": { + "asap": "~2.0.3" + } + }, + "ua-parser-js": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.31.tgz", + "integrity": "sha512-qLK/Xe9E2uzmYI3qLeOmI0tEOt+TBBQyUIAh4aAgU05FVYzeZrKUdkAZfBNVGRaHVgV0TDkdEngJSw/SyQchkQ==" + } + } }, "react-pdf": { "version": "5.2.0", diff --git a/package.json b/package.json index bf16f0c5ebe9..f0094604174f 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "react-native-safe-area-context": "^3.1.4", "react-native-screens": "^3.0.0", "react-native-svg": "^12.1.0", - "react-native-web": "git+https://github.com/Expensify/react-native-web.git#bfe201af25f9bd465af203b02fc978515b96e956", + "react-native-web": "0.17.5", "react-pdf": "^5.2.0", "react-plaid-link": "^3.2.0", "react-web-config": "^1.0.0", From f0cd8108b4e04e082edf403fad01c73a05b1f7aa Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Thu, 18 Nov 2021 20:57:59 +0200 Subject: [PATCH 3/4] Remove build/react-native-web.sh --- build/react-native-web.sh | 10 ---------- package.json | 1 - 2 files changed, 11 deletions(-) delete mode 100755 build/react-native-web.sh diff --git a/build/react-native-web.sh b/build/react-native-web.sh deleted file mode 100755 index 7de9a0725ea3..000000000000 --- a/build/react-native-web.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -cd ./node_modules/react-native-web && -npm install && -npm run compile && -rm -rf ./node_modules && -cd ./packages/react-native-web && -npm install --only=prod && -rm -rf ./node_modules/react ./node_modules/react-dom && -cd ../../ && -cp -R ./packages/react-native-web/* ./ diff --git a/package.json b/package.json index f0094604174f..3a67929045e7 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,6 @@ "license": "MIT", "private": true, "scripts": { - "postinstall": "./build/react-native-web.sh", "android": "npm run check-metro-bundler-port && react-native run-android", "ios": "npm run check-metro-bundler-port && react-native run-ios", "ipad": "npm run check-metro-bundler-port && react-native run-ios --simulator=\"iPad Pro (12.9-inch) (4th generation)\"", From 6520178ce7b420bdf2e0e9c720cefa48cbae8300 Mon Sep 17 00:00:00 2001 From: Peter Velkov Date: Thu, 18 Nov 2021 21:05:07 +0200 Subject: [PATCH 4/4] Create a patch for the VirtualizedList changes --- package.json | 1 + patches/react-native-web+0.17.5.patch | 338 ++++++++++++++++++++++++++ 2 files changed, 339 insertions(+) create mode 100644 patches/react-native-web+0.17.5.patch diff --git a/package.json b/package.json index 3a67929045e7..cd4090671ea8 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "license": "MIT", "private": true, "scripts": { + "postinstall": "patch-package", "android": "npm run check-metro-bundler-port && react-native run-android", "ios": "npm run check-metro-bundler-port && react-native run-ios", "ipad": "npm run check-metro-bundler-port && react-native run-ios --simulator=\"iPad Pro (12.9-inch) (4th generation)\"", diff --git a/patches/react-native-web+0.17.5.patch b/patches/react-native-web+0.17.5.patch new file mode 100644 index 000000000000..c4d9400fee14 --- /dev/null +++ b/patches/react-native-web+0.17.5.patch @@ -0,0 +1,338 @@ +diff --git a/node_modules/react-native-web/dist/cjs/vendor/react-native/VirtualizedList/index.js b/node_modules/react-native-web/dist/cjs/vendor/react-native/VirtualizedList/index.js +index f7f19fb..1dc1734 100644 +--- a/node_modules/react-native-web/dist/cjs/vendor/react-native/VirtualizedList/index.js ++++ b/node_modules/react-native-web/dist/cjs/vendor/react-native/VirtualizedList/index.js +@@ -101,7 +101,15 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + + var _proto = VirtualizedList.prototype; + +- // scrollToEnd may be janky without getItemLayout prop ++ _proto.pushOrUnshift = function pushOrUnshift(input, item) { ++ if (this.props.inverted) { ++ input.unshift(item); ++ } else { ++ input.push(item); ++ } ++ } // scrollToEnd may be janky without getItemLayout prop ++ ; ++ + _proto.scrollToEnd = function scrollToEnd(params) { + var animated = params ? params.animated : true; + var veryLast = this.props.getItemCount(this.props.data) - 1; +@@ -511,6 +519,11 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + }; + + _this._onScroll = function (e) { ++ var contentOffset = _this.props.inverted ? { ++ x: -e.nativeEvent.contentOffset.x, ++ y: -e.nativeEvent.contentOffset.y ++ } : e.nativeEvent.contentOffset; ++ + _this._nestedChildLists.forEach(function (childList) { + childList.ref && childList.ref._onScroll(e); + }); +@@ -525,7 +538,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + + var contentLength = _this._selectLength(e.nativeEvent.contentSize); + +- var offset = _this._selectOffset(e.nativeEvent.contentOffset); ++ var offset = _this._selectOffset(contentOffset); + + var dOffset = offset - _this._scrollMetrics.offset; + +@@ -798,7 +811,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + } else if (_this.props.onViewableItemsChanged) { + var onViewableItemsChanged = _this.props.onViewableItemsChanged; + +- _this._viewabilityTuples.push({ ++ _this.pushOrUnshift(_this._viewabilityTuples, { + viewabilityHelper: new _ViewabilityHelper.default(_this.props.viewabilityConfig), + onViewableItemsChanged: onViewableItemsChanged + }); +@@ -898,10 +911,10 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + _this2._indicesToKeys.set(ii, key); + + if (stickyIndicesFromProps.has(ii + stickyOffset)) { +- stickyHeaderIndices.push(cells.length); ++ _this2.pushOrUnshift(stickyHeaderIndices, cells.length); + } + +- cells.push( /*#__PURE__*/React.createElement(CellRenderer, { ++ _this2.pushOrUnshift(cells, /*#__PURE__*/React.createElement(CellRenderer, { + CellRendererComponent: CellRendererComponent, + ItemSeparatorComponent: ii < end ? ItemSeparatorComponent : undefined, + cellKey: key, +@@ -922,6 +935,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + _this2._cellRefs[key] = _ref; + } + })); ++ + prevCellKey = key; + }; + +@@ -967,14 +981,14 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + + if (ListHeaderComponent) { + if (stickyIndicesFromProps.has(0)) { +- stickyHeaderIndices.push(0); ++ this.pushOrUnshift(stickyHeaderIndices, 0); + } + + var element = /*#__PURE__*/React.isValidElement(ListHeaderComponent) ? ListHeaderComponent : + /*#__PURE__*/ + // $FlowFixMe + React.createElement(ListHeaderComponent, null); +- cells.push( /*#__PURE__*/React.createElement(_VirtualizedListContext.VirtualizedListCellContextProvider, { ++ this.pushOrUnshift(cells, /*#__PURE__*/React.createElement(_VirtualizedListContext.VirtualizedListCellContextProvider, { + cellKey: this._getCellKey() + '-header', + key: "$header" + }, /*#__PURE__*/React.createElement(_View.default, { +@@ -1014,7 +1028,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + var stickyBlock = this._getFrameMetricsApprox(ii); + + var leadSpace = stickyBlock.offset - initBlock.offset - (this.props.initialScrollIndex ? 0 : initBlock.length); +- cells.push( ++ this.pushOrUnshift(cells, + /*#__PURE__*/ + + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment +@@ -1028,7 +1042,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + this._pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, ii, ii, inversionStyle); + + var trailSpace = this._getFrameMetricsApprox(first).offset - (stickyBlock.offset + stickyBlock.length); +- cells.push( ++ this.pushOrUnshift(cells, + /*#__PURE__*/ + + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment +@@ -1051,7 +1065,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + + var firstSpace = this._getFrameMetricsApprox(first).offset - (_initBlock.offset + _initBlock.length); + +- cells.push( ++ this.pushOrUnshift(cells, + /*#__PURE__*/ + + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment +@@ -1084,7 +1098,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + var endFrame = this._getFrameMetricsApprox(end); + + var tailSpacerLength = endFrame.offset + endFrame.length - (lastFrame.offset + lastFrame.length); +- cells.push( ++ this.pushOrUnshift(cells, + /*#__PURE__*/ + + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses +@@ -1101,7 +1115,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + // $FlowFixMe + React.createElement(ListEmptyComponent, null); + +- cells.push( /*#__PURE__*/React.cloneElement(_element, { ++ this.pushOrUnshift(cells, /*#__PURE__*/React.cloneElement(_element, { + key: '$empty', + onLayout: function onLayout(event) { + _this3._onLayoutEmpty(event); +@@ -1120,7 +1134,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + // $FlowFixMe + React.createElement(ListFooterComponent, null); + +- cells.push( /*#__PURE__*/React.createElement(_VirtualizedListContext.VirtualizedListCellContextProvider, { ++ this.pushOrUnshift(cells, /*#__PURE__*/React.createElement(_VirtualizedListContext.VirtualizedListCellContextProvider, { + cellKey: this._getFooterCellKey(), + key: "$footer" + }, /*#__PURE__*/React.createElement(_View.default, { +@@ -1298,7 +1312,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + + + if (frame.inLayout) { +- framesInLayout.push(frame); ++ this.pushOrUnshift(framesInLayout, frame); + } + } + +@@ -1621,14 +1635,10 @@ function describeNestedLists(childList) { + + var styles = _StyleSheet.default.create({ + verticallyInverted: { +- transform: [{ +- scaleY: -1 +- }] ++ flexDirection: 'column-reverse' + }, + horizontallyInverted: { +- transform: [{ +- scaleX: -1 +- }] ++ flexDirection: 'row-reverse' + }, + row: { + flexDirection: 'row' +diff --git a/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js b/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js +index 05a53ed..cefc623 100644 +--- a/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js ++++ b/node_modules/react-native-web/dist/vendor/react-native/VirtualizedList/index.js +@@ -83,7 +83,15 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + + var _proto = VirtualizedList.prototype; + +- // scrollToEnd may be janky without getItemLayout prop ++ _proto.pushOrUnshift = function pushOrUnshift(input, item) { ++ if (this.props.inverted) { ++ input.unshift(item); ++ } else { ++ input.push(item); ++ } ++ } // scrollToEnd may be janky without getItemLayout prop ++ ; ++ + _proto.scrollToEnd = function scrollToEnd(params) { + var animated = params ? params.animated : true; + var veryLast = this.props.getItemCount(this.props.data) - 1; +@@ -493,6 +501,11 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + }; + + _this._onScroll = function (e) { ++ var contentOffset = _this.props.inverted ? { ++ x: -e.nativeEvent.contentOffset.x, ++ y: -e.nativeEvent.contentOffset.y ++ } : e.nativeEvent.contentOffset; ++ + _this._nestedChildLists.forEach(function (childList) { + childList.ref && childList.ref._onScroll(e); + }); +@@ -507,7 +520,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + + var contentLength = _this._selectLength(e.nativeEvent.contentSize); + +- var offset = _this._selectOffset(e.nativeEvent.contentOffset); ++ var offset = _this._selectOffset(contentOffset); + + var dOffset = offset - _this._scrollMetrics.offset; + +@@ -780,7 +793,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + } else if (_this.props.onViewableItemsChanged) { + var onViewableItemsChanged = _this.props.onViewableItemsChanged; + +- _this._viewabilityTuples.push({ ++ _this.pushOrUnshift(_this._viewabilityTuples, { + viewabilityHelper: new ViewabilityHelper(_this.props.viewabilityConfig), + onViewableItemsChanged: onViewableItemsChanged + }); +@@ -880,10 +893,10 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + _this2._indicesToKeys.set(ii, key); + + if (stickyIndicesFromProps.has(ii + stickyOffset)) { +- stickyHeaderIndices.push(cells.length); ++ _this2.pushOrUnshift(stickyHeaderIndices, cells.length); + } + +- cells.push( /*#__PURE__*/React.createElement(CellRenderer, { ++ _this2.pushOrUnshift(cells, /*#__PURE__*/React.createElement(CellRenderer, { + CellRendererComponent: CellRendererComponent, + ItemSeparatorComponent: ii < end ? ItemSeparatorComponent : undefined, + cellKey: key, +@@ -904,6 +917,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + _this2._cellRefs[key] = _ref; + } + })); ++ + prevCellKey = key; + }; + +@@ -949,14 +963,14 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + + if (ListHeaderComponent) { + if (stickyIndicesFromProps.has(0)) { +- stickyHeaderIndices.push(0); ++ this.pushOrUnshift(stickyHeaderIndices, 0); + } + + var element = /*#__PURE__*/React.isValidElement(ListHeaderComponent) ? ListHeaderComponent : + /*#__PURE__*/ + // $FlowFixMe + React.createElement(ListHeaderComponent, null); +- cells.push( /*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, { ++ this.pushOrUnshift(cells, /*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, { + cellKey: this._getCellKey() + '-header', + key: "$header" + }, /*#__PURE__*/React.createElement(View, { +@@ -996,7 +1010,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + var stickyBlock = this._getFrameMetricsApprox(ii); + + var leadSpace = stickyBlock.offset - initBlock.offset - (this.props.initialScrollIndex ? 0 : initBlock.length); +- cells.push( ++ this.pushOrUnshift(cells, + /*#__PURE__*/ + + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment +@@ -1010,7 +1024,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + this._pushCells(cells, stickyHeaderIndices, stickyIndicesFromProps, ii, ii, inversionStyle); + + var trailSpace = this._getFrameMetricsApprox(first).offset - (stickyBlock.offset + stickyBlock.length); +- cells.push( ++ this.pushOrUnshift(cells, + /*#__PURE__*/ + + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment +@@ -1033,7 +1047,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + + var firstSpace = this._getFrameMetricsApprox(first).offset - (_initBlock.offset + _initBlock.length); + +- cells.push( ++ this.pushOrUnshift(cells, + /*#__PURE__*/ + + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment +@@ -1066,7 +1080,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + var endFrame = this._getFrameMetricsApprox(end); + + var tailSpacerLength = endFrame.offset + endFrame.length - (lastFrame.offset + lastFrame.length); +- cells.push( ++ this.pushOrUnshift(cells, + /*#__PURE__*/ + + /* $FlowFixMe(>=0.111.0 site=react_native_fb) This comment suppresses +@@ -1083,7 +1097,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + // $FlowFixMe + React.createElement(ListEmptyComponent, null); + +- cells.push( /*#__PURE__*/React.cloneElement(_element, { ++ this.pushOrUnshift(cells, /*#__PURE__*/React.cloneElement(_element, { + key: '$empty', + onLayout: function onLayout(event) { + _this3._onLayoutEmpty(event); +@@ -1102,7 +1116,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + // $FlowFixMe + React.createElement(ListFooterComponent, null); + +- cells.push( /*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, { ++ this.pushOrUnshift(cells, /*#__PURE__*/React.createElement(VirtualizedListCellContextProvider, { + cellKey: this._getFooterCellKey(), + key: "$footer" + }, /*#__PURE__*/React.createElement(View, { +@@ -1280,7 +1294,7 @@ var VirtualizedList = /*#__PURE__*/function (_React$PureComponent) { + + + if (frame.inLayout) { +- framesInLayout.push(frame); ++ this.pushOrUnshift(framesInLayout, frame); + } + } + +@@ -1603,14 +1617,10 @@ function describeNestedLists(childList) { + + var styles = StyleSheet.create({ + verticallyInverted: { +- transform: [{ +- scaleY: -1 +- }] ++ flexDirection: 'column-reverse' + }, + horizontallyInverted: { +- transform: [{ +- scaleX: -1 +- }] ++ flexDirection: 'row-reverse' + }, + row: { + flexDirection: 'row'