Skip to content

Commit eade8d9

Browse files
committed
Merge remote-tracking branch 'origin/main' into canary
# Conflicts: # packages/next-intl/.size-limit.ts # packages/next-intl/__mocks__/react.tsx # packages/next-intl/src/navigation/shared/createSharedNavigationFns.tsx # packages/next-intl/src/react-server/index.test.tsx # packages/next-intl/src/server/react-server/RequestLocale.tsx # packages/next-intl/src/server/react-server/getConfig.tsx
2 parents 84fe6d0 + cd5775c commit eade8d9

File tree

411 files changed

+11657
-12063
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

411 files changed

+11657
-12063
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
build:
99
name: Build, lint, and test
10-
runs-on: ubuntu-latest
10+
runs-on: macos-15
1111
env:
1212
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
1313
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

.github/workflows/prerelease.yml .github/workflows/prerelease-canary.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: prerelease
1+
name: prerelease (canary)
22

33
on:
44
push:
@@ -26,7 +26,7 @@ jobs:
2626
- run: |
2727
sed -i 's/"use-intl": "workspace:\^"/"use-intl": "workspace:"/' ./packages/next-intl/package.json && git commit -am "use fixed version"
2828
- run: pnpm lerna publish 0.0.0-canary-${GITHUB_SHA::7} --no-git-reset --dist-tag canary --no-push --yes
29-
if: "${{startsWith(github.event.head_commit.message, 'fix: ') || startsWith(github.event.head_commit.message, 'feat: ')}}"
29+
if: "${{startsWith(github.event.head_commit.message, 'fix: ') || startsWith(github.event.head_commit.message, 'feat: ') || startsWith(github.event.head_commit.message, 'feat!: ')}}"
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3232
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
git config --global user.name "${{ github.actor }}"
2525
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
2626
- run: pnpm run publish
27-
if: "${{startsWith(github.event.head_commit.message, 'fix: ') || startsWith(github.event.head_commit.message, 'feat: ')}}"
27+
if: "${{startsWith(github.event.head_commit.message, 'fix: ') || startsWith(github.event.head_commit.message, 'feat: ') || startsWith(github.event.head_commit.message, 'feat!: ')}}"
2828
env:
2929
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3030
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## 4.0.0 (2025-03-12)
7+
8+
See [the announcement](https://next-intl.dev/blog/next-intl-4-0).
9+
10+
([#1412](https://github.com/amannn/next-intl/issues/1412)) ([172656f](https://github.com/amannn/next-intl/commit/172656fc6a25c6deb2ce6d152eede201262c13bf)) – by @amannn
11+
12+
## 3.26.5 (2025-02-21)
13+
14+
### Bug Fixes
15+
16+
* Handle `query` in `<Link />` correctly when using `localePrefix: 'as-needed'` with `domains` ([#1732](https://github.com/amannn/next-intl/issues/1732)) ([ec8776e](https://github.com/amannn/next-intl/commit/ec8776e8f0344f78fea4f71284c48312484a7059)), closes [#1731](https://github.com/amannn/next-intl/issues/1731) – by @amannn
17+
18+
## 3.26.4 (2025-02-18)
19+
20+
### Bug Fixes
21+
22+
* Add workaround for OpenTelemetry/Zone.js ([#1719](https://github.com/amannn/next-intl/issues/1719)) ([1cac9a6](https://github.com/amannn/next-intl/commit/1cac9a65d2aefe20ff7fcf734e70f1fe85cac19d)), closes [#1711](https://github.com/amannn/next-intl/issues/1711) – by @amannn
23+
624
## 3.26.3 (2024-12-20)
725

826
### Bug Fixes

CONTRIBUTORS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Note that the exclamation mark syntax (`!`) for indicating breaking changes is c
8686

8787
Other prefixes that are allowed and will _not_ create a release are the following:
8888

89-
1. `docs`: Documentation-only changes
89+
1. `docs`: Documentation-only changes and updated examples
9090
2. `test`: Missing tests were added or existing ones corrected
9191
3. `ci`: Changes to CI configuration files and scripts
9292
4. `build`: Changes that affect the build system or external dependencies

docs/package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,31 @@
1111
"dependencies": {
1212
"@docsearch/css": "^3.6.0",
1313
"@docsearch/react": "^3.6.0",
14-
"@headlessui/react": "^2.0.0",
15-
"@heroicons/react": "^2.1.4",
16-
"@vercel/analytics": "1.3.1",
17-
"@vercel/speed-insights": "^1.0.12",
14+
"@headlessui/react": "^2.2.0",
15+
"@heroicons/react": "^2.2.0",
16+
"@vercel/analytics": "1.5.0",
17+
"@vercel/speed-insights": "^1.2.0",
1818
"clsx": "^2.1.1",
1919
"http-status-codes": "^2.3.0",
2020
"next": "^14.2.4",
2121
"nextra": "^3.1.0",
2222
"nextra-theme-docs": "^3.1.0",
2323
"react": "^18.3.1",
2424
"react-dom": "^18.3.1",
25-
"react-tweet": "^3.2.1",
25+
"react-tweet": "^3.2.2",
2626
"shiki": "^1.22.0",
2727
"tailwindcss": "^3.4.4"
2828
},
2929
"devDependencies": {
3030
"@types/node": "^20.14.5",
31-
"@types/react": "^18.3.3",
31+
"@types/react": "^19.0.0",
3232
"autoprefixer": "^10.4.19",
3333
"eslint": "^9.11.1",
3434
"eslint-config-molindo": "^8.0.0",
35-
"fast-glob": "^3.3.2",
36-
"globals": "^15.11.0",
35+
"fast-glob": "^3.3.3",
36+
"globals": "^16.0.0",
3737
"next-sitemap": "^4.2.3",
38-
"next-validate-link": "^1.3.0",
38+
"next-validate-link": "^1.5.1",
3939
"prettier": "^3.3.3",
4040
"typescript": "^5.5.3"
4141
},

docs/src/components/CodeSnippets.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -293,23 +293,23 @@ function buildOutput() {
293293
<span className="line">
294294
<span data-token="text">┌ ● /</span>
295295
<span data-token="text"> </span>
296-
<span data-token="text">{' '}2.1 kB</span>
296+
<span data-token="text">{' '}1.5 kB</span>
297297
<span data-token="text">{' '}</span>
298-
<span data-token="string">97.1 kB</span>
298+
<span data-token="string">102 kB</span>
299299
</span>
300300
<span className="line">
301301
<span data-token="text">├ ● /about</span>
302302
<span data-token="text">{' '}</span>
303-
<span data-token="text">2.5 kB</span>
303+
<span data-token="text">2.2 kB</span>
304304
<span data-token="text">{' '}</span>
305-
<span data-token="string">97.6 kB</span>
305+
<span data-token="string">102 kB</span>
306306
</span>
307307
<span className="line">
308308
<span data-token="text">└ λ /[username]</span>
309309
<span data-token="text">{' '}</span>
310-
<span data-token="text">3.2 kB</span>
310+
<span data-token="text">3.6 kB</span>
311311
<span data-token="text">{' '}</span>
312-
<span data-token="string">98.3 kB</span>
312+
<span data-token="string">104 kB</span>
313313
</span>
314314
<span className="line"> </span>
315315
<span className="line">

docs/src/components/Details.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import {useMDXComponents} from 'nextra/mdx';
2-
import {ComponentProps, useEffect, useReducer} from 'react';
2+
import {ComponentProps, ReactNode, useEffect, useReducer} from 'react';
33
import useLocationHash from '@/hooks/useLocationHash';
44

55
type Props = ComponentProps<'details'>;
@@ -12,7 +12,7 @@ export default function Details({children, id, ...rest}: Props) {
1212

1313
const OriginalDetails = useMDXComponents().details as (
1414
props: Props
15-
) => JSX.Element;
15+
) => ReactNode;
1616

1717
useEffect(() => {
1818
// Use cases:

docs/src/components/Footer.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {useRouter} from 'next/router';
22
import config from '@/config';
33
import FooterLink from './FooterLink';
44
import FooterSeparator from './FooterSeparator';
5+
import FooterVersionSelector from './FooterVersionSelector';
56

67
export default function Footer() {
78
const router = useRouter();
@@ -19,6 +20,8 @@ export default function Footer() {
1920
<FooterLink href="/examples">Examples</FooterLink>
2021
<FooterSeparator />
2122
<FooterLink href="/blog">Blog</FooterLink>
23+
<FooterSeparator />
24+
<FooterVersionSelector />
2225
</div>
2326
<div>
2427
<FooterLink href={config.blueskyUrl} target="_blank">
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import {ChangeEvent} from 'react';
2+
3+
export default function FooterVersionSelector() {
4+
function onChange(event: ChangeEvent<HTMLSelectElement>) {
5+
const version = event.target.value;
6+
window.location.href = `https://${version}.next-intl.dev`;
7+
}
8+
9+
return (
10+
<select
11+
className="inline-flex appearance-none items-center bg-transparent py-3 text-xs text-slate-500 transition-colors hover:text-slate-900 dark:text-slate-400 dark:hover:text-white"
12+
defaultValue="v4"
13+
onChange={onChange}
14+
>
15+
<option value="v3">v3</option>
16+
<option value="v4">v4</option>
17+
</select>
18+
);
19+
}

docs/src/components/HeroCode.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const files = [
164164
<span data-token="text">:</span>
165165
<span data-token="text"> </span>
166166
<span data-token="string">
167-
"{'{'}firstname{'}'}'s profile"
167+
"{'{'}firstName{'}'}'s profile"
168168
</span>
169169
<span data-token="text">,</span>
170170
</span>
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import {useMDXComponents} from 'nextra/mdx';
2-
import {ComponentProps} from 'react';
2+
import {ComponentProps, ElementType} from 'react';
33
import PartnerLink from './PartnerLink';
44

55
type Props = Omit<ComponentProps<typeof PartnerLink>, 'as'>;
66

77
export default function PartnerContentLink(props: Props) {
88
const components = useMDXComponents();
9-
return <PartnerLink as={components.a} {...props} />;
9+
return <PartnerLink as={components.a as ElementType} {...props} />;
1010
}

docs/src/pages/blog/_meta.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export default {
33
title: 'Overview'
44
},
55
'next-intl-4-0': {
6-
title: 'next-intl 4.0 beta',
6+
title: 'next-intl 4.0',
77
display: 'hidden'
88
},
99
'next-intl-3-22': {

docs/src/pages/blog/index.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import StayUpdated from '@/components/StayUpdated.mdx';
66
<div className="flex flex-col gap-4 py-8">
77
<BlogPostLink
88
href="/blog/next-intl-4-0"
9-
title="next-intl 4.0 beta"
10-
date="Dec 23, 2024"
9+
title="next-intl 4.0"
10+
date="Mar 12, 2025"
1111
author="By Jan Amann"
1212
/>
1313
<BlogPostLink

0 commit comments

Comments
 (0)