Skip to content

Commit 18c94d6

Browse files
authored
feat: Add support for using next-intl in the app folder with Next.js 13 (see https://next-intl-docs.vercel.app/docs/next-13, #144)
1 parent 81e5050 commit 18c94d6

Some content is hidden

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

57 files changed

+3344
-248
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@ jobs:
1010
- uses: actions/checkout@v2
1111
- uses: actions/setup-node@v1
1212
with:
13-
node-version: 14.x
13+
node-version: 16.x
1414
# The Remix example unfortunately doesn't seem to support yarn workspaces
1515
- uses: bahmutov/npm-install@v1
16+
- run: yarn playwright install --with-deps
17+
18+
# The order matters here
1619
- run: yarn workspace use-intl run build
1720
- run: yarn workspace next-intl run build
18-
- run: yarn workspaces run lint
19-
- run: yarn workspaces run test --ci --maxWorkers=2
2021
- run: yarn workspace example run build
2122
- run: yarn workspace example-advanced run build
23+
- run: yarn workspace example-next-13 run build
24+
25+
- run: yarn workspaces run lint
26+
- run: yarn workspaces run test

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v2
1313
- uses: actions/setup-node@v2
1414
with:
15-
node-version: 14.x
15+
node-version: 16.x
1616
registry-url: 'https://registry.npmjs.org'
1717
- uses: bahmutov/npm-install@v1
1818
# Seems like after squash & merge the author is unknown to lerna

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.DS_Store
33
node_modules
44
dist
5+
.vscode

lerna.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"packages/next-intl",
66
"packages/example",
77
"packages/example-advanced",
8+
"packages/example-next-13",
89
"packages/website"
910
],
1011
"useWorkspaces": true,

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"packages/use-intl",
1010
"packages/next-intl",
1111
"packages/example",
12+
"packages/example-next-13",
1213
"packages/example-advanced",
1314
"packages/website"
1415
],

packages/example-advanced/.eslintrc.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ module.exports = {
1010
node: true
1111
},
1212
rules: {
13-
'react/react-in-jsx-scope': 'off',
14-
'jsx-a11y/anchor-is-valid': 'off',
15-
'react/display-name': 'off'
13+
'react/react-in-jsx-scope': 'off'
1614
}
1715
};

packages/example-next-13/.eslintrc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
require('eslint-config-molindo/setupPlugins');
2+
3+
module.exports = {
4+
extends: [
5+
'molindo/typescript',
6+
'molindo/react',
7+
'plugin:@next/next/recommended'
8+
],
9+
rules: {
10+
'react/react-in-jsx-scope': 'off'
11+
}
12+
};

packages/example-next-13/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/node_modules
2+
/.next/
3+
.DS_Store
4+
tsconfig.tsbuildinfo
5+
/test-results/
6+
/playwright-report/
7+
/playwright/.cache/
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"typescript.tsdk": "../../node_modules/typescript/lib",
3+
"typescript.enablePromptUseWorkspaceTsdk": true
4+
}

packages/example-next-13/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# example-next-13
2+
3+
An example that showcases usage of `next-intl` in the `app` folder of Next.js 13.

0 commit comments

Comments
 (0)