Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: next-intl@3.22 #1391

Merged
merged 42 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
ba6b1ad
feat: Support `./i18n/request.ts` in addition to `i18n.ts` (#1303)
amannn Aug 30, 2024
fa3c401
Merge branch 'main' into canary
amannn Aug 30, 2024
141ee8a
Merge remote-tracking branch 'origin/main' into canary
amannn Sep 5, 2024
4af2265
Merge remote-tracking branch 'origin/main' into canary
amannn Sep 25, 2024
5243d97
Merge remote-tracking branch 'origin/main' into canary
amannn Sep 26, 2024
2fb56b1
fix: When using `domains` in routing config, handle unknown domains l…
amannn Oct 1, 2024
126013b
feat: `createNavigation` (#1316)
amannn Oct 1, 2024
1087ba8
fix: Switch `prepare` to `postinstall`
amannn Oct 1, 2024
e49c6ea
docs: Improve code samples
amannn Oct 1, 2024
1a59754
docs: Update sitemap docs
amannn Oct 2, 2024
352ddc7
feat: Add async `requestLocale` param to `getRequestConfig` for Next.…
amannn Oct 2, 2024
35d4a84
Merge remote-tracking branch 'origin/main' into canary
amannn Oct 2, 2024
c5f7d7b
fix: Deprecate `createSharedPathnamesNavigation` and `createLocalized…
amannn Oct 2, 2024
66d1f74
Merge remote-tracking branch 'origin/main' into canary
amannn Oct 10, 2024
a95bd86
bump sizes
amannn Oct 10, 2024
0e984bd
feat: Add `localeCookie` option for middleware (#1414)
amannn Oct 10, 2024
5502984
update more docs regarding `getRequestConfig`
amannn Oct 10, 2024
9a7b17e
feat: Deprecate `defaultTranslationValues` (#1411)
amannn Oct 11, 2024
13ee366
fix: Handle `localeCookie` setting correctly on client side (#1417)
amannn Oct 15, 2024
d4a0103
feat: Prod release
amannn Oct 15, 2024
82d6745
feat: Prod release
amannn Oct 15, 2024
08f635d
fix: Attempt to fix canary publishing
amannn Oct 15, 2024
ec2d907
fix: Bump lerna deps
amannn Oct 15, 2024
94edb75
Revert "fix: Bump lerna deps"
amannn Oct 15, 2024
c9750ff
fix: Only update lerna deps
amannn Oct 15, 2024
0ea6000
fix: Repair canary releases (#1423)
amannn Oct 16, 2024
cf8f95a
docs: Use `defineRouting` in routing docs consistently
amannn Oct 16, 2024
a3f0b1b
Merge remote-tracking branch 'origin/main' into canary
amannn Oct 16, 2024
a9a7391
Merge remote-tracking branch 'origin/main' into canary
amannn Oct 16, 2024
126a420
Merge branch 'main' into canary
amannn Oct 17, 2024
791187c
Merge remote-tracking branch 'origin/main' into canary
amannn Oct 17, 2024
05174fc
linting
amannn Oct 18, 2024
5a26cd6
docs: Add info about narrowing of redirect
amannn Oct 18, 2024
e798a5c
update playwright
amannn Oct 18, 2024
96387da
Merge remote-tracking branch 'origin/main' into canary
amannn Oct 18, 2024
28e0389
bump size
amannn Oct 18, 2024
c533ea3
docs: Add blog post
amannn Oct 18, 2024
0b8e3a5
fix: Deprecate `./i18n.ts` in favor of `./i18n/request.ts`
amannn Oct 18, 2024
75a1d1b
docs: Improve OG image, blog post wording
amannn Oct 21, 2024
94f58ae
docs: Another improvement for blog post
amannn Oct 21, 2024
e6d9d60
docs: wording
amannn Oct 21, 2024
7b3a9a3
feat: Mark `setRequestLocale` as stable (#1437)
amannn Oct 21, 2024
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: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: main

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
name: Build, lint, and test
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
- run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- run: pnpm run publish --conventional-prerelease --preid canary --dist-tag canary --no-push
- run: |
sed -i 's/"use-intl": "workspace:\^"/"use-intl": "workspace:"/' ./packages/next-intl/package.json && git commit -am "use fixed version"
- run: pnpm lerna publish 0.0.0-canary-${GITHUB_SHA::7} --no-git-reset --dist-tag canary --no-push --yes
if: "${{startsWith(github.event.head_commit.message, 'fix: ') || startsWith(github.event.head_commit.message, 'feat: ')}}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type Props = Omit<ComponentProps<typeof Link>, 'children'> & {
type?: 'article' | 'video';
};

export default function CommunityLink({
export default function BlogPostLink({
author,
date,
title,
Expand Down
36 changes: 26 additions & 10 deletions docs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,30 @@ import minLight from 'shiki/themes/min-light.mjs';

const lightTheme = {
...minLight,
tokenColors: minLight.tokenColors.map((color) => {
// Increase the contrast of comments
if (color.scope?.includes('comment')) {
return {...color, settings: {foreground: '#808ea3'}};
} else {
return color;
}
})
tokenColors: minLight.tokenColors
.map((color) => {
// Increase the contrast of comments
if (color.scope?.includes('comment')) {
return {...color, settings: {foreground: '#808ea3'}};
} else {
return color;
}
})
// Add colors for diffs
.concat([
{
scope: 'markup.deleted.diff',
settings: {
foreground: '#D32F2F'
}
},
{
scope: 'markup.inserted.diff',
settings: {
foreground: '#22863A'
}
}
])
};

const withNextra = nextra({
Expand Down Expand Up @@ -150,12 +166,12 @@ export default withNextra({
permanent: true
},
{
source: '/examples/minimal',
source: '/examples/advanced',
destination: '/examples',
permanent: true
},
{
source: '/examples/advanced',
source: '/examples/minimal',
destination: '/examples',
permanent: true
}
Expand Down
Binary file added docs/pages/api/Inter-Regular.otf
Binary file not shown.
54 changes: 43 additions & 11 deletions docs/pages/api/og.tsx → docs/pages/api/og-image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,27 @@ export const config = {
};

export default async function OG(req: Request) {
const inter = await fetch(
const interSemiBold = await fetch(
new URL('./Inter-SemiBold.otf', import.meta.url)
).then((res) => res.arrayBuffer());
const interRegular = await fetch(
new URL('./Inter-Regular.otf', import.meta.url)
).then((res) => res.arrayBuffer());

const {searchParams} = new URL(req.url);

const hasTitle = searchParams.has('title');
let title = hasTitle ? searchParams.get('title')! : siteConfig.title;
const maxLength = 80;
if (title.length > maxLength) {
title = title.slice(0, maxLength) + '...';
let title = siteConfig.title,
subtitle;
if (searchParams.has('params')) {
let params;
try {
params = JSON.parse(searchParams.get('params')!);
} catch {
// Ignore
}
if (params) {
title = params.title || title;
subtitle = params.subtitle;
}
}

return new ImageResponse(
Expand All @@ -28,7 +38,6 @@ export default async function OG(req: Request) {
display: 'flex',
flexDirection: 'column',
alignItems: 'flex-start',
justifyContent: 'space-between',
padding: 80,
backgroundColor: 'white',
fontWeight: 600,
Expand Down Expand Up @@ -118,11 +127,27 @@ export default async function OG(req: Request) {
fontSize: 82,
lineHeight: 1.1,
letterSpacing: -4,
marginRight: 12
marginRight: 12,
marginTop: 'auto',
marginBottom: 0,
fontWeight: 600
}}
>
{title}
</h1>
{subtitle && (
<p
style={{
fontSize: 54,
lineHeight: 1.1,
letterSpacing: -4,
marginRight: 12,
fontWeight: 500
}}
>
{subtitle}
</p>
)}
</div>
),
{
Expand All @@ -131,8 +156,15 @@ export default async function OG(req: Request) {
fonts: [
{
name: 'inter',
data: inter,
style: 'normal'
data: interSemiBold,
style: 'normal',
weight: 600
},
{
name: 'inter',
data: interRegular,
style: 'normal',
weight: 500
}
]
}
Expand Down
14 changes: 10 additions & 4 deletions docs/pages/blog/index.mdx
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
import CommunityLink from 'components/CommunityLink';
import BlogPostLink from 'components/BlogPostLink';

# next-intl blog

<div className="flex flex-col gap-4 py-8">
<CommunityLink
<BlogPostLink
href="/blog/next-intl-3-22"
title="next-intl 3.22: Incrementally moving forward"
date="Oct 21, 2024"
author="By Jan Amann"
/>
<BlogPostLink
href="/blog/date-formatting-nextjs"
title="Reliable date formatting in Next.js"
date="Sep 25, 2024"
author="By Jan Amann"
/>
<CommunityLink
<BlogPostLink
href="/blog/next-intl-3-0"
title="next-intl 3.0"
date="Nov 14, 2023"
author="By Jan Amann"
/>
<CommunityLink
<BlogPostLink
href="/blog/translations-outside-of-react-components"
title="How (not) to use translations outside of React components"
date="Apr 21, 2023"
Expand Down
Loading
Loading