Skip to content

Commit

Permalink
feat!: next-intl@3.0 (#149)
Browse files Browse the repository at this point in the history
→ Please refer to [the
announcement](https://next-intl-docs.vercel.app/blog/next-intl-3-0)


Fixes #488
Fixes #402
Fixes #578

---------

Co-authored-by: 汪心禾 <wangxinhe06@gmail.com>
Co-authored-by: Tobias <tobi.l@posteo.at>
Co-authored-by: Andres <CptCompiler@users.noreply.github.com>
Co-authored-by: Andres <andres@21st.digital>
Co-authored-by: narakhan <narakhan@users.noreply.github.com>
Co-authored-by: Nicholas Mobbs <nick.mobbs@apporetum.dev>
Co-authored-by: James Berry <69924001+jlalmes@users.noreply.github.com>
Co-authored-by: Brendon Sled <brendon@tinyroar.com>
  • Loading branch information
9 people authored Nov 14, 2023
1 parent d6b1e8b commit 50cf6bb
Show file tree
Hide file tree
Showing 278 changed files with 11,760 additions and 4,545 deletions.
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ body:
label: Mandatory reproduction URL (CodeSandbox or GitHub repository)
description: |
**Templates:**
- [CodeSandbox (`app` directory)](https://codesandbox.io/p/sandbox/next-intl-bug-template-forked-yow8ep)
- [CodeSandbox (`app` directory, RSC RC)](https://codesandbox.io/p/sandbox/next-intl-bug-template-app-forked-zcymvq)
- [CodeSandbox (`pages` directory)](https://codesandbox.io/p/sandbox/next-intl-bug-template-pages-krm37f)
- [CodeSandbox (App Router)](https://codesandbox.io/p/sandbox/next-intl-bug-template-app-forked-zcymvq)
- [CodeSandbox (Pages Router)](https://codesandbox.io/p/sandbox/next-intl-bug-template-pages-krm37f)
validations:
required: true
- type: textarea
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/issue-commenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ jobs:
Unfortunately, the reproduction is missing or incomplete, and as such we cannot investigate this issue. Please add a reproduction to the issue, otherwise it will be closed automatically.
**Templates:**
- [CodeSandbox (`app` directory)](https://codesandbox.io/p/sandbox/next-intl-bug-template-forked-yow8ep)
- [CodeSandbox (`app` directory, RSC RC)](https://codesandbox.io/p/sandbox/next-intl-bug-template-app-forked-zcymvq)
- [CodeSandbox (`pages` directory)](https://codesandbox.io/p/sandbox/next-intl-bug-template-pages-krm37f)
- [CodeSandbox (App Router)](https://codesandbox.io/p/sandbox/next-intl-bug-template-app-forked-zcymvq)
- [CodeSandbox (Pages Router)](https://codesandbox.io/p/sandbox/next-intl-bug-template-pages-krm37f)
**Creating a good bug report takes time.**
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:
cache: 'pnpm'
- run: pnpm install

# Next.js caching
- uses: actions/cache@v3
with:
path: ${{ github.workspace }}/examples/*/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }}

# Playwright
- run: |
PLAYWRIGHT_VERSION=$(cat pnpm-lock.yaml | grep /@playwright/test@ | sed 's/.*@\([^:]*\):.*/\1/')
Expand All @@ -32,7 +38,7 @@ jobs:
key: playwright-browsers-${{ env.PLAYWRIGHT_VERSION }}
- if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
# Setting up playwright in one example is sufficient
run: pnpm --filter example-next-13 exec playwright install --with-deps
run: pnpm --filter example-next-13-advanced exec playwright install --with-deps

- run: pnpm run build
- run: pnpm run lint
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default function UserProfile({user}) {
}
```

```json
```js
// en.json
{
"UserProfile": {
Expand Down
2 changes: 1 addition & 1 deletion docs/components/CodeSnippets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function icu() {
<span style={{color: 'var(--shiki-token-punctuation)'}}>:</span>
<span style={{color: 'var(--shiki-color-text)'}}> </span>
<span style={{color: 'var(--shiki-token-string-expression)'}}>
"{'{'}username{'}'}'s profile"
"{'{'}firstName{'}'}'s profile"
</span>
<span style={{color: 'var(--shiki-token-punctuation)'}}>,</span>
</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/components/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function Hero({
</div>
<Link
className="mt-10 inline-flex border border-green-300/50 px-4 py-2 font-semibold text-green-300 transition-colors hover:border-white/50 hover:text-white lg:mt-20"
href="/docs"
href="/docs/getting-started/app-router"
>
<span className="mr-3 inline-block">📣</span>{' '}
<span>{rscAnnouncement}</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/components/HeroCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const files = [
<span style={{color: 'var(--shiki-token-punctuation)'}}>:</span>
<span style={{color: 'var(--shiki-color-text)'}}> </span>
<span style={{color: 'var(--shiki-token-string-expression)'}}>
"{'{'}username{'}'}'s profile"
"{'{'}firstname{'}'}'s profile"
</span>
<span style={{color: 'var(--shiki-token-punctuation)'}}>,</span>
</span>
Expand Down
31 changes: 0 additions & 31 deletions docs/components/VersionTabs.tsx

This file was deleted.

39 changes: 27 additions & 12 deletions docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,24 @@ module.exports = withNextra({
destination: '/docs/getting-started',
permanent: true
},
{
source: '/docs/configuration',
destination: '/docs/usage/configuration',
permanent: true
},
{
source: '/docs/getting-started/production-checklist',
destination: '/docs/production-checklist',
destination: '/docs/environments/runtime-requirements',
permanent: true
},
{
source: '/docs/usage/production-checklist',
destination: '/docs/production-checklist',
destination: '/docs/environments/runtime-requirements',
permanent: true
},
{
source: '/docs/production-checklist',
destination: '/docs/environments/runtime-requirements',
permanent: true
},
{
Expand All @@ -45,12 +55,22 @@ module.exports = withNextra({
},
{
source: '/docs/next-13/client-components',
destination: '/docs/getting-started/app-router-client-components',
destination: '/docs/getting-started/app-router',
permanent: true
},
{
source: '/docs/next-13/server-components',
destination: '/docs/getting-started/app-router-server-components',
destination: '/docs/getting-started/app-router',
permanent: true
},
{
source: '/docs/getting-started/app-router-server-components',
destination: '/docs/getting-started/app-router',
permanent: true
},
{
source: '/docs/getting-started/app-router-client-components',
destination: '/docs/getting-started/app-router',
permanent: true
},
{
Expand All @@ -75,22 +95,17 @@ module.exports = withNextra({
},
{
source: '/docs/usage/production-checklist',
destination: '/docs/production-checklist',
destination: '/docs/environments/runtime-requirements',
permanent: true
},
{
source: '/docs/usage/runtime-requirements-polyfills',
destination: '/docs/production-checklist#runtime-requirements',
permanent: true
},
{
source: '/docs/usage/configuration',
destination: '/docs/configuration',
destination: '/docs/environments/runtime-requirements',
permanent: true
},
{
source: '/docs/usage/error-handling',
destination: '/docs/configuration#error-handling',
destination: '/docs/usage/configuration#error-handling',
permanent: true
},
{
Expand Down
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
"tailwindcss": "^3.3.2"
},
"devDependencies": {
"@types/node": "20.1.2",
"@types/react": "^18.2.5",
"@types/node": "^20.1.2",
"@types/react": "^18.2.29",
"autoprefixer": "^10.4.0",
"eslint": "^8.46.0",
"eslint-config-molindo": "^7.0.0",
"eslint-config-next": "^13.4.0",
"next-sitemap": "^4.0.7",
"typescript": "^5.0.0"
"typescript": "^5.2.2"
},
"funding": "https://github.com/amannn/next-intl?sponsor=1"
}
Loading

2 comments on commit 50cf6bb

@vercel
Copy link

@vercel vercel bot commented on 50cf6bb Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

next-intl-example-next-13 – ./examples/example-next-13

next-intl-example-next-13-git-main-next-intl.vercel.app
next-intl-example-next-13.vercel.app
next-intl-example-next-13-next-intl.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 50cf6bb Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

next-intl-docs – ./docs

next-intl-docs-next-intl.vercel.app
next-intl-docs-git-main-next-intl.vercel.app
next-intl-docs.vercel.app

Please sign in to comment.