Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions docs/guides/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Open a Terminal in your project's folder and run:

<PackageManagerTabs
command={{
npm: 'npm install -D @testing-library/react-native@next',
yarn: 'yarn add -D @testing-library/react-native@next',
pnpm: 'pnpm add -D @testing-library/react-native@next',
bun: 'bun add -D @testing-library/react-native@next',
npm: 'npm install -D @testing-library/react-native',
yarn: 'yarn add -D @testing-library/react-native',
pnpm: 'pnpm add -D @testing-library/react-native',
bun: 'bun add -D @testing-library/react-native',
}}
/>

Expand Down
8 changes: 4 additions & 4 deletions website/docs/14.x/docs/start/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Open a Terminal in your project's folder and run:

<PackageManagerTabs
command={{
npm: 'npm install -D @testing-library/react-native@next',
yarn: 'yarn add -D @testing-library/react-native@next',
pnpm: 'pnpm add -D @testing-library/react-native@next',
bun: 'bun add -D @testing-library/react-native@next',
npm: 'npm install -D @testing-library/react-native',
yarn: 'yarn add -D @testing-library/react-native',
pnpm: 'pnpm add -D @testing-library/react-native',
bun: 'bun add -D @testing-library/react-native',
}}
/>

Expand Down
27 changes: 4 additions & 23 deletions website/rspress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,15 @@ const sidebar14x = {
],
};

// Default version (13.x) sidebar without version prefix
// Default version (14.x) sidebar without version prefix
const sidebarDefault = {
'/docs/': [
{
text: 'Getting started',
items: [
{ text: 'Introduction', link: '/docs/start/intro' },
{ text: 'Quick Start', link: '/docs/start/quick-start' },
{ text: 'v14 Migration', link: '/docs/start/migration-v14' },
],
},
{
Expand Down Expand Up @@ -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' },
{
Expand All @@ -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' },
],
},
Expand Down Expand Up @@ -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: {
Expand Down
19 changes: 4 additions & 15 deletions website/theme/index.tsx
Original file line number Diff line number Diff line change
@@ -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 = () => (
<div className="pre-release-banner">
<span>
You are viewing documentation for <strong>v14 RC</strong>.
</span>
</div>
);
const LATEST_VERSION = '14.x';

const OldVersionBanner = ({ version }: { version: string }) => (
<div className="old-version-banner">
Expand All @@ -26,12 +18,9 @@ const OldVersionBanner = ({ version }: { version: string }) => (
const AnnouncementBanner = () => {
const { pathname } = useLocation();

if (pathname.includes('/14.x/')) {
return <PreReleaseBanner />;
}

if (pathname.includes('/12.x/')) {
return <OldVersionBanner version="12.x" />;
if (pathname.includes('/12.x/') || pathname.includes('/13.x/')) {
const version = pathname.includes('/12.x/') ? '12.x' : '13.x';
return <OldVersionBanner version={version} />;
}

return null;
Expand Down
Loading