diff --git a/README.md b/README.md index 4a165e97a..1d94992ea 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ React Native Testing Library consists of following APIs: ## Migration Guides -- **[Migration to 14.0](https://oss.callstack.com/react-native-testing-library/docs/migration/v14)** - Drops React 18, async APIs by default +- **[Migration to 14.0](https://oss.callstack.com/react-native-testing-library/docs/start/migration-v14)** - Drops React 18, async APIs by default ## Troubleshooting diff --git a/docs/guides/quick-start.md b/docs/guides/quick-start.md index 42874c863..5342c07eb 100644 --- a/docs/guides/quick-start.md +++ b/docs/guides/quick-start.md @@ -8,10 +8,10 @@ Open a Terminal in your project's folder and run: diff --git a/website/docs/14.x/docs/start/quick-start.mdx b/website/docs/14.x/docs/start/quick-start.mdx index dafcebb96..506a5a1c9 100644 --- a/website/docs/14.x/docs/start/quick-start.mdx +++ b/website/docs/14.x/docs/start/quick-start.mdx @@ -8,10 +8,10 @@ Open a Terminal in your project's folder and run: diff --git a/website/rspress.config.ts b/website/rspress.config.ts index 278823fea..f4bc0faac 100644 --- a/website/rspress.config.ts +++ b/website/rspress.config.ts @@ -208,7 +208,7 @@ const sidebar14x = { ], }; -// Default version (13.x) sidebar without version prefix +// Default version (14.x) sidebar without version prefix const sidebarDefault = { '/docs/': [ { @@ -216,6 +216,7 @@ const sidebarDefault = { items: [ { text: 'Introduction', link: '/docs/start/intro' }, { text: 'Quick Start', link: '/docs/start/quick-start' }, + { text: 'v14 Migration', link: '/docs/start/migration-v14' }, ], }, { @@ -250,7 +251,6 @@ const sidebarDefault = { { text: 'How to Query', link: '/docs/guides/how-to-query' }, { text: 'Common Mistakes', link: '/docs/guides/common-mistakes' }, { text: 'LLM Guidelines', link: '/docs/guides/llm-guidelines' }, - { text: 'React 19', link: '/docs/guides/react-19' }, { text: 'Troubleshooting', link: '/docs/guides/troubleshooting' }, { text: 'FAQ', link: '/docs/guides/faq' }, { @@ -270,32 +270,13 @@ const sidebarDefault = { { text: 'Understanding Act', link: '/docs/advanced/understanding-act' }, ], }, - { - text: 'Migration Guides', - collapsed: true, - items: [ - { text: 'v13 Migration', link: '/docs/migration/v13' }, - { text: 'Jest Matchers', link: '/docs/migration/jest-matchers' }, - { - text: 'Previous versions', - collapsed: true, - items: [ - { text: 'v12', link: '/docs/migration/previous/v12' }, - { text: 'v11', link: '/docs/migration/previous/v11' }, - { text: 'v9', link: '/docs/migration/previous/v9' }, - { text: 'v7', link: '/docs/migration/previous/v7' }, - { text: 'v2', link: '/docs/migration/previous/v2' }, - ], - }, - ], - }, ], '/cookbook/': [ { text: 'Cookbook', link: '/cookbook/' }, { text: 'Basic Recipes', items: [ - { text: 'Async Tests', link: '/cookbook/basics/async-tests' }, + { text: 'Async Events', link: '/cookbook/basics/async-events' }, { text: 'Custom Render', link: '/cookbook/basics/custom-render' }, ], }, @@ -332,7 +313,7 @@ export default defineConfig({ // Shiki is now the default code highlighter }, multiVersion: { - default: '13.x', + default: '14.x', versions: ['12.x', '13.x', '14.x'], }, route: { diff --git a/website/theme/index.tsx b/website/theme/index.tsx index 93498917c..822b7573d 100644 --- a/website/theme/index.tsx +++ b/website/theme/index.tsx @@ -1,15 +1,7 @@ import { useLocation } from '@rspress/core/runtime'; import { Link, Layout as RspressLayout } from '@rspress/core/theme-original'; -const LATEST_VERSION = '13.x'; - -const PreReleaseBanner = () => ( -
- - You are viewing documentation for v14 RC. - -
-); +const LATEST_VERSION = '14.x'; const OldVersionBanner = ({ version }: { version: string }) => (
@@ -26,12 +18,9 @@ const OldVersionBanner = ({ version }: { version: string }) => ( const AnnouncementBanner = () => { const { pathname } = useLocation(); - if (pathname.includes('/14.x/')) { - return ; - } - - if (pathname.includes('/12.x/')) { - return ; + if (pathname.includes('/12.x/') || pathname.includes('/13.x/')) { + const version = pathname.includes('/12.x/') ? '12.x' : '13.x'; + return ; } return null;