build(deps): update latest

This commit is contained in:
2026-08-25 14:18:21 +08:00
parent 02296281f3
commit 3f0323366d
34 changed files with 2927 additions and 2909 deletions
+1
View File
@@ -6,6 +6,7 @@
"exports": {
"./translations/*.json": "./src/translations/*.json",
"./messages.d.ts": "./src/messages.d.ts",
"./navigation": "./src/navigation.ts",
"./request": "./src/request.ts",
"./routing": "./src/routing.ts"
},
+6
View File
@@ -0,0 +1,6 @@
import { createNavigation } from "next-intl/navigation"
import { routing } from "./routing.ts"
export const { Link, redirect, usePathname, useRouter, getPathname, permanentRedirect } =
createNavigation(routing)
+3 -2
View File
@@ -1,12 +1,13 @@
import { hasLocale } from "next-intl"
import { getRequestConfig } from "next-intl/server"
import * as rootParams from "next/root-params"
import { routing } from "./routing.ts"
import { LOCALE_DEFAULT } from "@repo/utils/constants"
import { deepMerge } from "@repo/utils/objects"
export default getRequestConfig(async ({ requestLocale }) => {
const requested = await requestLocale
export default getRequestConfig(async ({ locale: localeOverride }) => {
const requested = localeOverride ?? (await rootParams.locale())
const locale = hasLocale(routing.locales, requested) ? requested : routing.defaultLocale
const userMessages = (await import(`./translations/${locale}.json`)).default
+1
View File
@@ -0,0 +1 @@
export function locale(): Promise<string | undefined>
-12
View File
@@ -1,8 +1,5 @@
import { createNavigation } from "next-intl/navigation"
import { LOCALES, LOCALE_DEFAULT, LOCALE_PREFIX } from "@repo/utils/constants"
import { defineRouting } from "next-intl/routing"
import type { Locale } from "@repo/utils/constants"
// Countries: https://github.com/umpirsky/country-list/blob/master/data/en/country.json
// Country flag picture: https://purecatamphetamine.github.io/country-flag-icons/3x2/US.svg
@@ -11,17 +8,8 @@ import type { Locale } from "@repo/utils/constants"
// Locale code is a combination of ISO 639-1 language code and ISO 3166-1 country code.
// For example, `fr-FR` is a locale code for French language in France.
export interface LocaleProps {
params: Promise<{
locale: Locale
}>
}
export const routing = defineRouting({
locales: LOCALES,
defaultLocale: LOCALE_DEFAULT,
localePrefix: LOCALE_PREFIX,
})
export const { Link, redirect, usePathname, useRouter, getPathname, permanentRedirect } =
createNavigation(routing)
+4 -1
View File
@@ -2,6 +2,9 @@
"extends": "@repo/config-typescript/tsconfig.json",
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"types": ["@total-typescript/ts-reset"]
"types": ["@total-typescript/ts-reset"],
"paths": {
"next/root-params": ["./src/root-params.d.ts"]
}
}
}