From 9d051dbccd7dc42ee2815f6427888faa1f270177 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 May 2022 02:08:38 +0000 Subject: [PATCH 1/2] Bump react, react-dom and @types/react Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react), [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) and [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react). These dependencies needed to be updated together. Updates `react` from 17.0.2 to 18.1.0 - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v18.1.0/packages/react) Updates `react-dom` from 17.0.2 to 18.1.0 - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v18.1.0/packages/react-dom) Updates `@types/react` from 17.0.37 to 18.0.9 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: react dependency-type: direct:production update-type: version-update:semver-major - dependency-name: react-dom dependency-type: direct:production update-type: version-update:semver-major - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 6 +++--- yarn.lock | 37 +++++++++++++++++-------------------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 495632550a..c4c6fed499 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "@types/jest": "^27.5.1", "@types/mime": "^2.0.3", "@types/node": "^17.0.35", - "@types/react": "17.0.37", + "@types/react": "18.0.9", "@types/react-dom": "^17.0.11", "@types/uuid": "^8.3.4", "@typescript-eslint/eslint-plugin": "^5.26.0", @@ -68,8 +68,8 @@ "@bazel/labs": "^4.6.1", "eslint-plugin-react": "^7.30.0", "immutable": "^4.1.0", - "react": "17.0.2", - "react-dom": "^17.0.2", + "react": "18.1.0", + "react-dom": "^18.1.0", "typescript": "^4.6.4" } } diff --git a/yarn.lock b/yarn.lock index 06ad2c1def..5758557a1d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1443,10 +1443,10 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@17.0.37": - version "17.0.37" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.37.tgz#6884d0aa402605935c397ae689deed115caad959" - integrity sha512-2FS1oTqBGcH/s0E+CjrCCR9+JMpsu9b69RTFO+40ua43ZqP5MmQ4iUde/dMjWR909KxZwmOQIFq6AV6NjEG5xg== +"@types/react@*", "@types/react@18.0.9": + version "18.0.9" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.9.tgz#d6712a38bd6cd83469603e7359511126f122e878" + integrity sha512-9bjbg1hJHUm4De19L1cHiW0Jvx3geel6Qczhjd0qY5VKVE2X5+x77YxAepuCwVh4vrgZJdgEJw48zrhRIeF4Nw== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -5038,14 +5038,13 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -react-dom@^17.0.2: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" - integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== +react-dom@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.1.0.tgz#7f6dd84b706408adde05e1df575b3a024d7e8a2f" + integrity sha512-fU1Txz7Budmvamp7bshe4Zi32d0ll7ect+ccxNu9FlObT605GOEB8BfO4tmRJ39R5Zj831VCpvQ05QPBW5yb+w== dependencies: loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler "^0.20.2" + scheduler "^0.22.0" react-is@^16.13.1: version "16.13.1" @@ -5084,13 +5083,12 @@ react-spring@^9.4.5: "@react-spring/web" "~9.4.5" "@react-spring/zdog" "~9.4.5" -react@17.0.2: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" - integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== +react@18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/react/-/react-18.1.0.tgz#6f8620382decb17fdc5cc223a115e2adbf104890" + integrity sha512-4oL8ivCz5ZEPyclFQXaNksK3adutVS8l2xzZU0cqEFrE9Sb7fC0EFK5uEk74wIreL1DERyjvsU915j1pcT2uEQ== dependencies: loose-envify "^1.1.0" - object-assign "^4.1.1" read-package-json@^2.0.0: version "2.1.2" @@ -5274,13 +5272,12 @@ saxes@^5.0.1: dependencies: xmlchars "^2.2.0" -scheduler@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" - integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== +scheduler@^0.22.0: + version "0.22.0" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.22.0.tgz#83a5d63594edf074add9a7198b1bae76c3db01b8" + integrity sha512-6QAm1BgQI88NPYymgGQLCZgvep4FyePDWFpXVK+zNSUgHwlqpJy8VEh8Et0KxTACS4VWwMousBElAZOH9nkkoQ== dependencies: loose-envify "^1.1.0" - object-assign "^4.1.1" secure-compare@3.0.1: version "3.0.1" From 46b93e71b0fb3a9c8ff8dd078e081dd3f0890938 Mon Sep 17 00:00:00 2001 From: zemnmez Date: Tue, 24 May 2022 16:13:17 -0700 Subject: [PATCH 2/2] amendments to files for react upgrade --- ts/react/article/index.tsx | 4 +++- ts/react/lang/index.tsx | 4 +++- ts/url/BUILD | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ts/react/article/index.tsx b/ts/react/article/index.tsx index f0b013ca83..054f8d271b 100644 --- a/ts/react/article/index.tsx +++ b/ts/react/article/index.tsx @@ -27,7 +27,9 @@ export const Article: React.FC<{ ); }; -export const Title: React.FC = ({ children }) => <>{children}; +export const Title: React.FC<{ + children?: React.ReactNode; +}> = ({ children }) => <>{children}; /** * When Article is rendered in 'short' mode, it is rendered diff --git a/ts/react/lang/index.tsx b/ts/react/lang/index.tsx index b8b0ae864e..d2235b8822 100644 --- a/ts/react/lang/index.tsx +++ b/ts/react/lang/index.tsx @@ -53,7 +53,9 @@ const getLangs = () => { return []; }; -export const LocaleProvider: React.FC = ({ children }) => { +export const LocaleProvider: React.FC<{ + children?: React.ReactNode; +}> = ({ children }) => { const [languages, setLanguages] = React.useState([ 'en-GB', ]); diff --git a/ts/url/BUILD b/ts/url/BUILD index 00d47c36b4..ba9215a826 100644 --- a/ts/url/BUILD +++ b/ts/url/BUILD @@ -15,8 +15,8 @@ ts_project( tsconfig = "//:tsconfig_jsx", deps = [ "@npm//@types/jest", - "@npm//@types/react", "@npm//@types/node", + "@npm//@types/react", "@npm//react", ], )