Skip to content

Commit aa5a068

Browse files
authored
Merge pull request #87 from aicodingstack/develop
chore: upgrade next from 15.5.9 to 16.1.2
2 parents 89494d8 + a0c4291 commit aa5a068

File tree

7 files changed

+1014
-1054
lines changed

7 files changed

+1014
-1054
lines changed

next.config.ts

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ import bundleAnalyzer from '@next/bundle-analyzer'
22
import createMDX from '@next/mdx'
33
import type { NextConfig } from 'next'
44
import createNextIntlPlugin from 'next-intl/plugin'
5-
import rehypeHighlight from 'rehype-highlight'
6-
import remarkFrontmatter from 'remark-frontmatter'
7-
import remarkGfm from 'remark-gfm'
8-
import remarkMdxFrontmatter from 'remark-mdx-frontmatter'
95

106
const withNextIntl = createNextIntlPlugin('./src/i18n/request.ts')
117

@@ -91,10 +87,17 @@ const nextConfig: NextConfig = {
9187
ignoreBuildErrors: false,
9288
},
9389

94-
// ESLint configuration
95-
eslint: {
96-
// Set to true only if you want to skip linting during build
97-
ignoreDuringBuilds: false,
90+
// Rewrites to fix locale-prefixed static assets in dev mode
91+
async rewrites() {
92+
return {
93+
beforeFiles: [
94+
// Rewrite locale-prefixed _next paths to correct paths
95+
{
96+
source: '/:locale/_next/:path*',
97+
destination: '/_next/:path*',
98+
},
99+
],
100+
}
98101
},
99102

100103
// Redirects configuration
@@ -164,8 +167,14 @@ const nextConfig: NextConfig = {
164167
const withMDX = createMDX({
165168
extension: /\.mdx?$/,
166169
options: {
167-
remarkPlugins: [remarkFrontmatter, remarkMdxFrontmatter, remarkGfm],
168-
rehypePlugins: [rehypeHighlight],
170+
// String-based config for Turbopack compatibility (Next.js 16+)
171+
remarkPlugins: [
172+
'remark-frontmatter', // Parse and hide YAML frontmatter
173+
'remark-gfm', // GitHub Flavored Markdown (tables, task lists, etc.)
174+
],
175+
rehypePlugins: [
176+
'rehype-highlight', // Code syntax highlighting
177+
],
169178
},
170179
})
171180

package-lock.json

Lines changed: 986 additions & 1034 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@opennextjs/cloudflare": "^1.15.1",
4949
"cmdk": "^1.1.1",
5050
"lucide-react": "^0.563.0",
51-
"next": "^15.5.9",
51+
"next": "^16.1.4",
5252
"next-intl": "^4.7.0",
5353
"react": "^19.2.1",
5454
"react-dom": "^19.2.1",
@@ -72,7 +72,7 @@
7272
"@types/react-dom": "^19.2.3",
7373
"@typescript-eslint/parser": "^8.53.0",
7474
"@typescript-eslint/types": "^8.53.0",
75-
"agent-browser": "^0.5.0",
75+
"agent-browser": "^0.8.4",
7676
"ajv": "^8.17.1",
7777
"ajv-formats": "^3.0.1",
7878
"cspell": "^9.6.1",
@@ -82,7 +82,6 @@
8282
"rehype-highlight": "^7.0.2",
8383
"remark-frontmatter": "^5.0.0",
8484
"remark-gfm": "^4.0.1",
85-
"remark-mdx-frontmatter": "^5.2.0",
8685
"tailwindcss": "^4.1.17",
8786
"tsx": "^4.21.0",
8887
"typescript": "^5.9.3",

src/app/[locale]/open-source-rank/page.client.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ function getLicenseDisplayName(license: string): string {
3131
function getProductTypeName(type: ProductType, t: (key: string) => string): string {
3232
switch (type) {
3333
case 'ide':
34-
return t('productType.ide')
34+
return t('categories.singular.ide')
3535
case 'cli':
36-
return t('productType.cli')
36+
return t('categories.singular.cli')
3737
case 'extension':
38-
return t('productType.extension')
38+
return t('categories.singular.extension')
3939
default:
4040
return type
4141
}
@@ -326,7 +326,7 @@ export function OpenSourceRankPage() {
326326
</td>
327327
<td className="px-[var(--spacing-sm)] py-[var(--spacing-sm)] text-sm">
328328
<span className="inline-block px-2 py-0.5 text-xs border border-[var(--color-border)]">
329-
{getProductTypeName(project.type, tPage)}
329+
{getProductTypeName(project.type, tShared)}
330330
</span>
331331
</td>
332332
<td className="px-[var(--spacing-sm)] py-[var(--spacing-sm)] text-sm text-[var(--color-text-secondary)]">

src/app/api/revalidate/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export async function POST(request: NextRequest) {
131131
})
132132
} else if (tag) {
133133
// Revalidate by tag
134-
revalidateTag(tag)
134+
revalidateTag(tag, 'layout')
135135
return NextResponse.json({
136136
revalidated: true,
137137
type: 'tag',

src/components/product/VendorMatrix.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function getCategoryLabel(
4242
* Gets the localized vendor type label. Falls back to the raw type when missing.
4343
*/
4444
function getVendorTypeLabel(t: ReturnType<typeof useTranslations>, type: string): string {
45-
const key = `vendorTypes.types.${type}.label`
45+
const key = `vendorMatrix.vendorTypes.types.${type}.label`
4646
try {
4747
return t(key)
4848
} catch {

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"moduleResolution": "bundler",
1212
"resolveJsonModule": true,
1313
"isolatedModules": true,
14-
"jsx": "preserve",
14+
"jsx": "react-jsx",
1515
"incremental": true,
1616
"plugins": [
1717
{

0 commit comments

Comments
 (0)