Skip to content

Commit

Permalink
chore: update deps and next version
Browse files Browse the repository at this point in the history
  • Loading branch information
CaliCastle committed Mar 12, 2024
1 parent f04b57e commit 06b227f
Show file tree
Hide file tree
Showing 11 changed files with 4,105 additions and 2,403 deletions.
3 changes: 0 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@ NEXT_PUBLIC_SITE_URL="https://example.com"
# Upstash Redis 必需
UPSTASH_REDIS_REST_TOKEN=""
UPSTASH_REDIS_REST_URL="https://example.upstash.io"

# Vercel 必需
VERCEL_ENV="development"
3 changes: 2 additions & 1 deletion app/api/favicon/route.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as cheerio from 'cheerio'
import { ImageResponse, type NextRequest, NextResponse } from 'next/server'
import { ImageResponse } from 'next/og'
import { type NextRequest, NextResponse } from 'next/server'

import { ratelimit, redis } from '~/lib/redis'

Expand Down
3 changes: 2 additions & 1 deletion app/api/link-preview/route.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ImageResponse, type NextRequest, NextResponse } from 'next/server'
import { ImageResponse } from 'next/og'
import { type NextRequest, NextResponse } from 'next/server'

import { env } from '~/env.mjs'
import { ratelimit } from '~/lib/redis'
Expand Down
13 changes: 8 additions & 5 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import './clerk.css'
import './prism.css'

import { ClerkProvider } from '@clerk/nextjs'
import { type Metadata } from 'next'
import type { Metadata, Viewport } from 'next'

import { ThemeProvider } from '~/app/(main)/ThemeProvider'
import { url } from '~/lib'
Expand All @@ -19,10 +19,6 @@ export const metadata: Metadata = {
},
description: seo.description,
keywords: 'Cali,Cali Castle,郭晓楠,佐玩,创始人,CEO,开发者,设计师,细节控,创新',
themeColor: [
{ media: '(prefers-color-scheme: dark)', color: '#000212' },
{ media: '(prefers-color-scheme: light)', color: '#fafafa' },
],
manifest: '/site.webmanifest',
robots: {
index: true,
Expand Down Expand Up @@ -61,6 +57,13 @@ export const metadata: Metadata = {
},
}

export const viewport: Viewport = {
themeColor: [
{ media: '(prefers-color-scheme: dark)', color: '#000212' },
{ media: '(prefers-color-scheme: light)', color: '#fafafa' },
],
}

export default function RootLayout({
children,
}: {
Expand Down
1 change: 1 addition & 0 deletions components/portable-text/PortableTextImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export function PortableTextImage({
)}
alt={value.alt || ''}
fetchPriority="high"
unoptimized
/>
</Dialog.Trigger>
</motion.div>
Expand Down
2 changes: 1 addition & 1 deletion env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const server = z.object({
NODE_ENV: z.enum(['development', 'test', 'production']),
DATABASE_URL: z.string().min(1),
RESEND_API_KEY: z.string().min(1),
VERCEL_ENV: z.enum(['development', 'preview', 'production']),
VERCEL_ENV: z.enum(['development', 'preview', 'production']).default('development'),
UPSTASH_REDIS_REST_URL: z.string().min(1),
UPSTASH_REDIS_REST_TOKEN: z.string().min(1),
LINK_PREVIEW_API_BASE_URL: z.string().optional(),
Expand Down
89 changes: 47 additions & 42 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,56 @@

/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
serverActions: true,
},

images: {
domains: ['cdn.sanity.io'],
remotePatterns: [
{
protocol: 'https',
hostname: 'cdn.sanity.io',
port: '',
pathname: `/images/${process.env.NEXT_PUBLIC_SANITY_PROJECT_ID}/**`,
}
],
},

redirects: [
{
"source": "/twitter",
"destination": "https://x.com/thecalicastle",
"permanent": true
},
{
"source": "/x",
"destination": "https://x.com/thecalicastle",
"permanent": true
},
{
"source": "/youtube",
"destination": "https://youtube.com/@calicastle",
"permanent": true
},
{
"source": "/tg",
"destination": "https://t.me/cali_so",
"permanent": true
},
{
"source": "/linkedin",
"destination": "https://www.linkedin.com/in/calicastle/",
"permanent": true
},
{
"source": "/github",
"destination": "https://github.com/CaliCastle",
"permanent": true
},
{
"source": "/bilibili",
"destination": "https://space.bilibili.com/8350251",
"permanent": true
}
],
redirects() {
return [
{
"source": "/twitter",
"destination": "https://x.com/thecalicastle",
"permanent": true
},
{
"source": "/x",
"destination": "https://x.com/thecalicastle",
"permanent": true
},
{
"source": "/youtube",
"destination": "https://youtube.com/@calicastle",
"permanent": true
},
{
"source": "/tg",
"destination": "https://t.me/cali_so",
"permanent": true
},
{
"source": "/linkedin",
"destination": "https://www.linkedin.com/in/calicastle/",
"permanent": true
},
{
"source": "/github",
"destination": "https://github.com/CaliCastle",
"permanent": true
},
{
"source": "/bilibili",
"destination": "https://space.bilibili.com/8350251",
"permanent": true
}
]
},

rewrites() {
return [
Expand Down
99 changes: 49 additions & 50 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
"start": "next start"
},
"dependencies": {
"@clerk/nextjs": "^4.21.10",
"@headlessui/react": "^1.7.15",
"@hookform/resolvers": "^3.1.1",
"@clerk/nextjs": "^4.29.9",
"@headlessui/react": "^1.7.18",
"@hookform/resolvers": "^3.3.4",
"@mdx-js/loader": "^2.3.0",
"@neondatabase/serverless": "^0.9.0",
"@portabletext/react": "^3.0.3",
"@radix-ui/react-dialog": "^1.0.4",
"@radix-ui/react-hover-card": "^1.0.6",
"@portabletext/react": "^3.0.11",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-hover-card": "^1.0.7",
"@radix-ui/react-select": "^1.2.2",
"@radix-ui/react-tooltip": "^1.0.6",
"@radix-ui/react-tooltip": "^1.0.7",
"@react-email/body": "^0.0.2",
"@react-email/button": "^0.0.9",
"@react-email/column": "^0.0.7",
Expand All @@ -38,74 +38,73 @@
"@react-email/section": "^0.0.9",
"@react-email/tailwind": "^0.0.8",
"@react-email/text": "^0.0.5",
"@sanity/code-input": "^4.1.1",
"@sanity/code-input": "^4.1.3",
"@sanity/image-url": "^1.0.2",
"@sanity/ui": "^1.6.0",
"@sanity/vision": "^3.12.2",
"@sanity/ui": "^2.0.10",
"@sanity/vision": "^3.32.0",
"@splinetool/react-spline": "^2.2.6",
"@tremor/react": "^3.2.3",
"@upstash/ratelimit": "^0.4.3",
"@upstash/redis": "^1.21.0",
"@vercel/analytics": "^1.0.1",
"@vercel/edge-config": "^0.2.1",
"@upstash/ratelimit": "^1.0.1",
"@upstash/redis": "^1.28.4",
"@vercel/analytics": "^1.2.2",
"@vercel/edge-config": "^1.1.0",
"@zolplay/react": "^0.5.1",
"@zolplay/utils": "^1.3.4",
"cheerio": "1.0.0-rc.12",
"dayjs": "^1.11.8",
"dotenv": "^16.3.1",
"dayjs": "^1.11.10",
"dotenv": "^16.4.5",
"drizzle-orm": "^0.30.1",
"edge-cors": "^0.2.1",
"framer-motion": "^10.12.17",
"hashids": "^2.3.0",
"next": "^13.4.7",
"next-sanity": "^5.0.2",
"next": "^14.1.3",
"next-sanity": "^8.3.2",
"next-themes": "^0.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-email": "^1.9.4",
"react-hook-form": "^7.45.0",
"react-hook-form": "^7.51.0",
"react-markdown": "^8.0.7",
"react-query": "^3.39.3",
"react-rewards": "^2.0.4",
"react-syntax-highlighter": "^15.5.0",
"react-textarea-autosize": "^8.5.0",
"react-tweet": "^2.0.2",
"react-wrap-balancer": "^1.0.0",
"react-textarea-autosize": "^8.5.3",
"react-tweet": "^3.2.0",
"react-wrap-balancer": "^1.1.0",
"reading-time": "^1.5.0",
"remark-gfm": "^3.0.1",
"resend": "^0.15.3",
"resend": "^3.2.0",
"rss": "^1.2.2",
"sanity": "^3.12.2",
"sanity-plugin-media": "^2.0.5",
"valtio": "^1.10.6",
"zod": "^3.21.4"
"sanity": "^3.32.0",
"sanity-plugin-media": "^2.2.5",
"valtio": "^1.13.2",
"zod": "^3.22.4"
},
"devDependencies": {
"@headlessui/tailwindcss": "^0.1.3",
"@tailwindcss/typography": "^0.5.9",
"@types/eslint": "^8.40.2",
"@types/node": "^18.16.15",
"@types/prettier": "^2.7.3",
"@types/react": "18.2.14",
"@types/react-dom": "^18.2.6",
"@types/react-syntax-highlighter": "^15.5.7",
"@types/rss": "^0.0.30",
"@typescript-eslint/eslint-plugin": "^5.60.0",
"@typescript-eslint/parser": "^5.60.0",
"autoprefixer": "^10.4.14",
"@headlessui/tailwindcss": "^0.2.0",
"@tailwindcss/typography": "^0.5.10",
"@types/eslint": "^8.56.5",
"@types/node": "^20.11.26",
"@types/react": "18.2.65",
"@types/react-dom": "^18.2.21",
"@types/react-syntax-highlighter": "^15.5.11",
"@types/rss": "^0.0.32",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"autoprefixer": "^10.4.18",
"drizzle-kit": "^0.20.14",
"eslint": "^8.43.0",
"eslint-config-next": "^13.4.7",
"eslint-config-turbo": "^1.10.6",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-unused-imports": "^2.0.0",
"postcss": "^8.4.24",
"prettier": "^2.8.8",
"prettier-plugin-packagejson": "^2.4.3",
"prettier-plugin-tailwindcss": "^0.3.0",
"eslint": "^8.57.0",
"eslint-config-next": "^14.1.3",
"eslint-config-turbo": "^1.12.5",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-unused-imports": "^3.1.0",
"postcss": "^8.4.35",
"prettier": "^3.2.5",
"prettier-plugin-packagejson": "^2.4.12",
"prettier-plugin-tailwindcss": "^0.5.12",
"tailwindcss": "^3.4.1",
"turbo": "^1.10.6",
"turbo": "^1.12.5",
"typescript": "^5.4.2"
}
}
Loading

0 comments on commit 06b227f

Please sign in to comment.