From 8a6f60a2ecd10c7970fc619727a260db306de5a1 Mon Sep 17 00:00:00 2001 From: Jamil Date: Thu, 16 Oct 2025 15:17:52 -0700 Subject: [PATCH] build(deps): bump react from 18 to 19 (#10595) Bumps the react family from 18 to 19 and fixes one type issue. Supersedes #10081 --- website/package.json | 8 +- website/pnpm-lock.yaml | 189 +++++++++---------- website/src/components/Changelog/Entries.tsx | 24 ++- 3 files changed, 108 insertions(+), 113 deletions(-) diff --git a/website/package.json b/website/package.json index 2002b2247..5b4a6e62a 100644 --- a/website/package.json +++ b/website/package.json @@ -19,8 +19,8 @@ "@next/third-parties": "^15.5.3", "@types/mdx": "^2.0.13", "@types/node": "24.3.0", - "@types/react": "18.3.11", - "@types/react-dom": "18.3.1", + "@types/react": "19.2.2", + "@types/react-dom": "19.2.2", "@types/react-syntax-highlighter": "^15.5.13", "@vercel/edge-config": "^1.4.0", "asciinema-player": "^3.9.0", @@ -35,8 +35,8 @@ "next-hubspot": "^2.0.0", "next-sitemap": "^4.2.3", "postcss": "8.5.6", - "react": "18.3.1", - "react-dom": "18.3.1", + "react": "19.2.0", + "react-dom": "19.2.0", "react-fast-marquee": "^1.6.5", "react-icons": "^5.5.0", "react-markdown": "^10.1.0", diff --git a/website/pnpm-lock.yaml b/website/pnpm-lock.yaml index 1083074fa..98ef1adc1 100644 --- a/website/pnpm-lock.yaml +++ b/website/pnpm-lock.yaml @@ -13,19 +13,19 @@ importers: dependencies: '@docsearch/react': specifier: ^3.9.0 - version: 3.9.0(@algolia/client-search@5.23.3)(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.14.0) + version: 3.9.0(@algolia/client-search@5.23.3)(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(search-insights@2.14.0) '@mdx-js/loader': specifier: ^3.1.1 version: 3.1.1(webpack@5.92.0) '@mdx-js/react': specifier: ^3.1.1 - version: 3.1.1(@types/react@18.3.11)(react@18.3.1) + version: 3.1.1(@types/react@19.2.2)(react@19.2.0) '@next/mdx': specifier: ~15.3.2 - version: 15.3.3(@mdx-js/loader@3.1.1(webpack@5.92.0))(@mdx-js/react@3.1.1(@types/react@18.3.11)(react@18.3.1)) + version: 15.3.3(@mdx-js/loader@3.1.1(webpack@5.92.0))(@mdx-js/react@3.1.1(@types/react@19.2.2)(react@19.2.0)) '@next/third-parties': specifier: ^15.5.3 - version: 15.5.3(next@15.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) + version: 15.5.3(next@15.5.3(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(react@19.2.0) '@types/mdx': specifier: ^2.0.13 version: 2.0.13 @@ -33,11 +33,11 @@ importers: specifier: 24.3.0 version: 24.3.0 '@types/react': - specifier: 18.3.11 - version: 18.3.11 + specifier: 19.2.2 + version: 19.2.2 '@types/react-dom': - specifier: 18.3.1 - version: 18.3.1 + specifier: 19.2.2 + version: 19.2.2(@types/react@19.2.2) '@types/react-syntax-highlighter': specifier: ^15.5.13 version: 15.5.13 @@ -55,10 +55,10 @@ importers: version: 5.2.5 flowbite-react: specifier: ^0.12.9 - version: 0.12.9(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(tailwindcss@3.4.18(yaml@2.6.0))(typescript@5.9.2) + version: 0.12.9(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(tailwindcss@3.4.18(yaml@2.6.0))(typescript@5.9.2) framer-motion: specifier: ^12.23.12 - version: 12.23.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 12.23.12(react-dom@19.2.0(react@19.2.0))(react@19.2.0) highlight.js: specifier: ^11.11.1 version: 11.11.1 @@ -70,34 +70,34 @@ importers: version: 2.70.0 next: specifier: ^15.5.3 - version: 15.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 15.5.3(react-dom@19.2.0(react@19.2.0))(react@19.2.0) next-hubspot: specifier: ^2.0.0 - version: 2.0.0(next@15.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1) + version: 2.0.0(next@15.5.3(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(react@19.2.0) next-sitemap: specifier: ^4.2.3 - version: 4.2.3(next@15.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)) + version: 4.2.3(next@15.5.3(react-dom@19.2.0(react@19.2.0))(react@19.2.0)) postcss: specifier: 8.5.6 version: 8.5.6 react: - specifier: 18.3.1 - version: 18.3.1 + specifier: 19.2.0 + version: 19.2.0 react-dom: - specifier: 18.3.1 - version: 18.3.1(react@18.3.1) + specifier: 19.2.0 + version: 19.2.0(react@19.2.0) react-fast-marquee: specifier: ^1.6.5 - version: 1.6.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 1.6.5(react-dom@19.2.0(react@19.2.0))(react@19.2.0) react-icons: specifier: ^5.5.0 - version: 5.5.0(react@18.3.1) + version: 5.5.0(react@19.2.0) react-markdown: specifier: ^10.1.0 - version: 10.1.0(@types/react@18.3.11)(react@18.3.1) + version: 10.1.0(@types/react@19.2.2)(react@19.2.0) react-syntax-highlighter: specifier: ^15.6.6 - version: 15.6.6(react@18.3.1) + version: 15.6.6(react@19.2.0) rehype-autolink-headings: specifier: ^7.1.0 version: 7.1.0 @@ -673,17 +673,16 @@ packages: '@types/node@24.3.0': resolution: {integrity: sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==} - '@types/prop-types@15.7.13': - resolution: {integrity: sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==} - - '@types/react-dom@18.3.1': - resolution: {integrity: sha512-qW1Mfv8taImTthu4KoXgDfLuk4bydU6Q/TkADnDWWHwi4NX4BR+LWfTp2sVmTqRrsHvyDDTelgelxJ+SsejKKQ==} + '@types/react-dom@19.2.2': + resolution: {integrity: sha512-9KQPoO6mZCi7jcIStSnlOWn2nEF3mNmyr3rIAsGnAbQKYbRLyqmeSc39EVgtxXVia+LMT8j3knZLAZAh+xLmrw==} + peerDependencies: + '@types/react': ^19.2.0 '@types/react-syntax-highlighter@15.5.13': resolution: {integrity: sha512-uLGJ87j6Sz8UaBAooU0T6lWJ0dBmjZgN1PZTrj05TNql2/XpC6+4HhMT5syIdFUUt+FASfCeLLv4kBygNU+8qA==} - '@types/react@18.3.11': - resolution: {integrity: sha512-r6QZ069rFTjrEYgFdOck1gK7FLVsgJE7tTz0pQBczlBNUhBNk0MQH4UbnFSwjpQLMkLzgqvBBa+qGpLje16eTQ==} + '@types/react@19.2.2': + resolution: {integrity: sha512-6mDvHUFSjyT2B2yeNx2nUgMxh9LtOWvkhIU3uePn2I2oyNymUAX1NIsdgviM4CH+JSrp2D2hsMvJOkxY+0wNRA==} '@types/unist@2.0.11': resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==} @@ -2561,10 +2560,10 @@ packages: randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - react-dom@18.3.1: - resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} + react-dom@19.2.0: + resolution: {integrity: sha512-UlbRu4cAiGaIewkPyiRGJk0imDN2T3JjieT6spoL2UeSf5od4n5LB/mQ4ejmxhCFT1tYe8IvaFulzynWovsEFQ==} peerDependencies: - react: ^18.3.1 + react: ^19.2.0 react-fast-marquee@1.6.5: resolution: {integrity: sha512-swDnPqrT2XISAih0o74zQVE2wQJFMvkx+9VZXYYNSLb/CUcAzU9pNj637Ar2+hyRw6b4tP6xh4GQZip2ZCpQpg==} @@ -2591,8 +2590,8 @@ packages: peerDependencies: react: '>= 0.14.0' - react@18.3.1: - resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} + react@19.2.0: + resolution: {integrity: sha512-tmbWg6W31tQLeB5cdIBOicJDJRR2KzXsV7uSK9iNfLWQ5bIZfxuPEHp7M8wiHyHnn0DD1i7w3Zmin0FtkrwoCQ==} engines: {node: '>=0.10.0'} read-cache@1.0.0: @@ -2717,8 +2716,8 @@ packages: resolution: {integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==} engines: {node: '>= 0.4'} - scheduler@0.23.2: - resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} + scheduler@0.27.0: + resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==} schema-utils@3.3.0: resolution: {integrity: sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==} @@ -3274,16 +3273,16 @@ snapshots: '@docsearch/css@3.9.0': {} - '@docsearch/react@3.9.0(@algolia/client-search@5.23.3)(@types/react@18.3.11)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(search-insights@2.14.0)': + '@docsearch/react@3.9.0(@algolia/client-search@5.23.3)(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(search-insights@2.14.0)': dependencies: '@algolia/autocomplete-core': 1.17.9(@algolia/client-search@5.23.3)(algoliasearch@5.23.3)(search-insights@2.14.0) '@algolia/autocomplete-preset-algolia': 1.17.9(@algolia/client-search@5.23.3)(algoliasearch@5.23.3) '@docsearch/css': 3.9.0 algoliasearch: 5.23.3 optionalDependencies: - '@types/react': 18.3.11 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + '@types/react': 19.2.2 + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) search-insights: 2.14.0 transitivePeerDependencies: - '@algolia/client-search' @@ -3359,18 +3358,18 @@ snapshots: '@floating-ui/core': 1.6.9 '@floating-ui/utils': 0.2.10 - '@floating-ui/react-dom@2.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@floating-ui/react-dom@2.1.2(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@floating-ui/dom': 1.6.12 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) - '@floating-ui/react@0.27.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@floating-ui/react@0.27.3(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: - '@floating-ui/react-dom': 2.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@floating-ui/react-dom': 2.1.2(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@floating-ui/utils': 0.2.10 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) tabbable: 6.2.0 '@floating-ui/utils@0.2.10': {} @@ -3545,11 +3544,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@mdx-js/react@3.1.1(@types/react@18.3.11)(react@18.3.1)': + '@mdx-js/react@3.1.1(@types/react@19.2.2)(react@19.2.0)': dependencies: '@types/mdx': 2.0.13 - '@types/react': 18.3.11 - react: 18.3.1 + '@types/react': 19.2.2 + react: 19.2.0 '@mixpanel/rrdom@2.0.0-alpha.18.2': dependencies: @@ -3589,12 +3588,12 @@ snapshots: dependencies: fast-glob: 3.3.1 - '@next/mdx@15.3.3(@mdx-js/loader@3.1.1(webpack@5.92.0))(@mdx-js/react@3.1.1(@types/react@18.3.11)(react@18.3.1))': + '@next/mdx@15.3.3(@mdx-js/loader@3.1.1(webpack@5.92.0))(@mdx-js/react@3.1.1(@types/react@19.2.2)(react@19.2.0))': dependencies: source-map: 0.7.4 optionalDependencies: '@mdx-js/loader': 3.1.1(webpack@5.92.0) - '@mdx-js/react': 3.1.1(@types/react@18.3.11)(react@18.3.1) + '@mdx-js/react': 3.1.1(@types/react@19.2.2)(react@19.2.0) '@next/swc-darwin-arm64@15.5.3': optional: true @@ -3620,10 +3619,10 @@ snapshots: '@next/swc-win32-x64-msvc@15.5.3': optional: true - '@next/third-parties@15.5.3(next@15.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)': + '@next/third-parties@15.5.3(next@15.5.3(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(react@19.2.0)': dependencies: - next: 15.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react: 18.3.1 + next: 15.5.3(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + react: 19.2.0 third-party-capital: 1.0.20 '@nodelib/fs.scandir@2.1.5': @@ -3708,19 +3707,16 @@ snapshots: dependencies: undici-types: 7.10.0 - '@types/prop-types@15.7.13': {} - - '@types/react-dom@18.3.1': + '@types/react-dom@19.2.2(@types/react@19.2.2)': dependencies: - '@types/react': 18.3.11 + '@types/react': 19.2.2 '@types/react-syntax-highlighter@15.5.13': dependencies: - '@types/react': 18.3.11 + '@types/react': 19.2.2 - '@types/react@18.3.11': + '@types/react@19.2.2': dependencies: - '@types/prop-types': 15.7.13 csstype: 3.1.3 '@types/unist@2.0.11': {} @@ -4861,10 +4857,10 @@ snapshots: flatted@3.3.3: {} - flowbite-react@0.12.9(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(tailwindcss@3.4.18(yaml@2.6.0))(typescript@5.9.2): + flowbite-react@0.12.9(react-dom@19.2.0(react@19.2.0))(react@19.2.0)(tailwindcss@3.4.18(yaml@2.6.0))(typescript@5.9.2): dependencies: '@floating-ui/core': 1.6.9 - '@floating-ui/react': 0.27.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@floating-ui/react': 0.27.3(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@iarna/toml': 2.2.5 '@typescript-eslint/typescript-estree': 8.46.1(typescript@5.9.2) chokidar: 4.0.3 @@ -4874,8 +4870,8 @@ snapshots: deepmerge-ts: 7.1.4 klona: 2.0.6 package-manager-detector: 0.2.9 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) recast: 0.23.11 tailwind-merge-v2: tailwind-merge@2.6.0 tailwind-merge-v3: tailwind-merge@3.0.1 @@ -4903,14 +4899,14 @@ snapshots: fraction.js@4.3.7: {} - framer-motion@12.23.12(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + framer-motion@12.23.12(react-dom@19.2.0(react@19.2.0))(react@19.2.0): dependencies: motion-dom: 12.23.12 motion-utils: 12.23.6 tslib: 2.8.1 optionalDependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) fsevents@2.3.3: optional: true @@ -5927,28 +5923,28 @@ snapshots: neo-async@2.6.2: optional: true - next-hubspot@2.0.0(next@15.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1): + next-hubspot@2.0.0(next@15.5.3(react-dom@19.2.0(react@19.2.0))(react@19.2.0))(react@19.2.0): dependencies: - next: 15.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react: 18.3.1 + next: 15.5.3(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + react: 19.2.0 - next-sitemap@4.2.3(next@15.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1)): + next-sitemap@4.2.3(next@15.5.3(react-dom@19.2.0(react@19.2.0))(react@19.2.0)): dependencies: '@corex/deepmerge': 4.0.43 '@next/env': 13.5.7 fast-glob: 3.3.2 minimist: 1.2.8 - next: 15.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 15.5.3(react-dom@19.2.0(react@19.2.0))(react@19.2.0) - next@15.5.3(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next@15.5.3(react-dom@19.2.0(react@19.2.0))(react@19.2.0): dependencies: '@next/env': 15.5.3 '@swc/helpers': 0.5.15 caniuse-lite: 1.0.30001751 postcss: 8.4.31 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - styled-jsx: 5.1.6(react@18.3.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) + styled-jsx: 5.1.6(react@19.2.0) optionalDependencies: '@next/swc-darwin-arm64': 15.5.3 '@next/swc-darwin-x64': 15.5.3 @@ -6164,33 +6160,32 @@ snapshots: safe-buffer: 5.2.1 optional: true - react-dom@18.3.1(react@18.3.1): + react-dom@19.2.0(react@19.2.0): dependencies: - loose-envify: 1.4.0 - react: 18.3.1 - scheduler: 0.23.2 + react: 19.2.0 + scheduler: 0.27.0 - react-fast-marquee@1.6.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + react-fast-marquee@1.6.5(react-dom@19.2.0(react@19.2.0))(react@19.2.0): dependencies: - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) - react-icons@5.5.0(react@18.3.1): + react-icons@5.5.0(react@19.2.0): dependencies: - react: 18.3.1 + react: 19.2.0 react-is@16.13.1: {} - react-markdown@10.1.0(@types/react@18.3.11)(react@18.3.1): + react-markdown@10.1.0(@types/react@19.2.2)(react@19.2.0): dependencies: '@types/hast': 3.0.4 '@types/mdast': 4.0.4 - '@types/react': 18.3.11 + '@types/react': 19.2.2 devlop: 1.1.0 hast-util-to-jsx-runtime: 2.3.6 html-url-attributes: 3.0.1 mdast-util-to-hast: 13.2.0 - react: 18.3.1 + react: 19.2.0 remark-parse: 11.0.0 remark-rehype: 11.1.1 unified: 11.0.5 @@ -6199,19 +6194,17 @@ snapshots: transitivePeerDependencies: - supports-color - react-syntax-highlighter@15.6.6(react@18.3.1): + react-syntax-highlighter@15.6.6(react@19.2.0): dependencies: '@babel/runtime': 7.28.4 highlight.js: 10.7.3 highlightjs-vue: 1.0.0 lowlight: 1.20.0 prismjs: 1.30.0 - react: 18.3.1 + react: 19.2.0 refractor: 3.6.0 - react@18.3.1: - dependencies: - loose-envify: 1.4.0 + react@19.2.0: {} read-cache@1.0.0: dependencies: @@ -6425,9 +6418,7 @@ snapshots: es-errors: 1.3.0 is-regex: 1.2.1 - scheduler@0.23.2: - dependencies: - loose-envify: 1.4.0 + scheduler@0.27.0: {} schema-utils@3.3.0: dependencies: @@ -6677,10 +6668,10 @@ snapshots: dependencies: inline-style-parser: 0.2.4 - styled-jsx@5.1.6(react@18.3.1): + styled-jsx@5.1.6(react@19.2.0): dependencies: client-only: 0.0.1 - react: 18.3.1 + react: 19.2.0 sucrase@3.35.0: dependencies: diff --git a/website/src/components/Changelog/Entries.tsx b/website/src/components/Changelog/Entries.tsx index 0f67ea2fd..51c053cfa 100644 --- a/website/src/components/Changelog/Entries.tsx +++ b/website/src/components/Changelog/Entries.tsx @@ -13,13 +13,12 @@ function Latest({ version, date, children, -}: { +}: React.PropsWithChildren<{ downloadLinks: DownloadLink[]; title: string; version: string; date: Date; - children: React.ReactNode; -}) { +}>) { const options: Intl.DateTimeFormatOptions = { timeZone: "UTC", year: "numeric", @@ -64,10 +63,9 @@ function Latest({ function Previous({ title, children, -}: { +}: React.PropsWithChildren<{ title: string; - children: React.ReactNode; -}) { +}>) { return ( <>

@@ -102,17 +100,23 @@ function Previous({ ); } +type EntryProps = React.PropsWithChildren<{ + version: string; + date: Date; +}>; + export default function Entries({ downloadLinks, title, children, -}: { +}: React.PropsWithChildren<{ downloadLinks: DownloadLink[]; title: string; - children: React.ReactNode; -}) { +}>) { const childrenArray = React.Children.toArray(children) - .filter((child) => React.isValidElement(child)) + .filter((child): child is React.ReactElement => + React.isValidElement(child) + ) .filter((child) => child.type != Unreleased); const firstEntry = childrenArray[0];