Skip to content

Commit

Permalink
update to latest pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
AlemTuzlak committed Nov 20, 2024
1 parent 5132885 commit 7c9c7c3
Show file tree
Hide file tree
Showing 15 changed files with 450 additions and 175 deletions.
2 changes: 1 addition & 1 deletion app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default async function handleRequest(
},
onError(error: unknown) {
didError = true

// biome-ignore lint/suspicious/noConsole: We console log the error
console.error(error)
},
}
Expand Down
2 changes: 2 additions & 0 deletions app/env.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const initEnv = () => {
const envData = envSchema.safeParse(process.env)

if (!envData.success) {
// biome-ignore lint/suspicious/noConsole: We want this to be logged
console.error("❌ Invalid environment variables:", envData.error.flatten().fieldErrors)
throw new Error("Invalid environment variables")
}
Expand All @@ -24,6 +25,7 @@ export const initEnv = () => {

// Do not log the message when running tests
if (env.NODE_ENV !== "test") {
// biome-ignore lint/suspicious/noConsole: We want this to be logged
console.log("✅ Environment variables loaded successfully")
}
return envData.data
Expand Down
6 changes: 4 additions & 2 deletions app/library/icon/icons/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// This file is generated by icon spritesheet generator

export const iconNames = ["ShoppingCart"] as const
export const iconNames = [
"ShoppingCart",
] as const

export type IconName = (typeof iconNames)[number]
export type IconName = typeof iconNames[number]
2 changes: 1 addition & 1 deletion app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useTranslation } from "react-i18next"
import { Links, Meta, Outlet, Scripts, ScrollRestoration } from "react-router"
import type { LinksFunction } from "react-router"
import { useChangeLanguage } from "remix-i18next/react"
import type * as Route from "./+types.root"
import type { Route } from "./+types/root"
import { LanguageSwitcher } from "./library/language-switcher"
import tailwindcss from "./tailwind.css?url"

Expand Down
2 changes: 1 addition & 1 deletion app/routes.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { flatRoutes } from "@react-router/fs-routes"

export const routes = flatRoutes()
export default flatRoutes()
2 changes: 1 addition & 1 deletion app/routes/resource.locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { cacheHeader } from "pretty-cache-header"
import { data } from "react-router"
import { z } from "zod"
import { resources } from "~/localization/resource"
import type * as Route from "./+types.resource.locales"
import type { Route } from "./+types/resource.locales"

export async function loader({ request }: Route.LoaderArgs) {
const url = new URL(request.url)
Expand Down
2 changes: 1 addition & 1 deletion app/routes/robots[.]txt.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { generateRobotsTxt } from "@forge42/seo-tools/robots"

import { createDomain } from "~/utils/http"
import type * as Route from "./+types.robots[.]txt"
import type { Route } from "./+types/robots[.]txt"

export async function loader({ request }: Route.LoaderArgs) {
const isProductionDeployment = process.env.DEPLOYMENT_ENV === "production"
Expand Down
3 changes: 1 addition & 2 deletions app/routes/sitemap-index[.]xml.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { generateSitemapIndex } from "@forge42/seo-tools/sitemap"

import { createDomain } from "~/utils/http"
import type * as Route from "./+types.sitemap-index[.]xml"
import type { Route } from "./+types/sitemap-index[.]xml"

export const loader = async ({ request }: Route.LoaderArgs) => {
const domain = createDomain(request)
Expand Down
1 change: 0 additions & 1 deletion app/routes/sitemap.$lang[.]xml.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { generateRemixSitemap } from "@forge42/seo-tools/remix/sitemap"
import type { LoaderFunctionArgs } from "react-router"
import { createDomain } from "~/utils/http"
import type * as Route from "./+types.sitemap.$lang[.]xml"

export const loader = async ({ request, params }: LoaderFunctionArgs) => {
const domain = createDomain(request)
Expand Down
9 changes: 7 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"rules": {
"recommended": true,
"suspicious": {
"recommended": true
"recommended": true,
"noConsole": "error"
},
"style": {
"recommended": true
Expand All @@ -36,7 +37,11 @@
"recommended": true
},
"correctness": {
"recommended": true
"recommended": true,
"noUnusedImports": "error",
"noUnusedVariables": "error",
"noUnusedLabels": "error",
"noUnusedFunctionParameters": "error"
},
"a11y": {
"recommended": true
Expand Down
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lint": "biome check .",
"lint:ci": "biome ci .",
"lint:fix": "biome check --write .",
"start": "react-router-serve ./build/server/index.js",
"start": "node ./build/server/index.js",
"test": "vitest run",
"test:ui": "vitest --ui --api 9527",
"test:cov": "vitest run --coverage",
Expand All @@ -24,13 +24,12 @@
"check:fix": "biome check --fix .",
"check:unused": "knip --max-issues 1",
"check:unused:fix": "knip --fix",
"typegen": "react-router typegen && tsc",
"postinstall": "react-router typegen"
"typegen": "react-router typegen",
"postinstall": "npm run typegen"
},
"dependencies": {
"@forge42/seo-tools": "^1.3.0",
"@react-router/node": "7.0.0-pre.0",
"@react-router/serve": "7.0.0-pre.0",
"@react-router/node": "7.0.0-pre.6",
"clsx": "^2.1.1",
"hono": "^4.6.3",
"i18next": "^23.15.2",
Expand All @@ -41,7 +40,7 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-i18next": "^15.0.2",
"react-router": "7.0.0-pre.0",
"react-router": "7.0.0-pre.6",
"react-router-hono-server": "https://pkg.pr.new/rphlmr/[email protected]",
"remix-hono": "^0.0.16",
"remix-i18next": "^6.4.1",
Expand All @@ -51,8 +50,8 @@
"devDependencies": {
"@biomejs/biome": "^1.9.3",
"@dotenvx/dotenvx": "^1.16.0",
"@react-router/dev": "7.0.0-pre.0",
"@react-router/fs-routes": "7.0.0-pre.0",
"@react-router/dev": "7.0.0-pre.6",
"@react-router/fs-routes": "7.0.0-pre.6",
"@types/node": "^22.7.5",
"@types/prompt": "^1.1.9",
"@types/react": "^18.3.11",
Expand All @@ -66,7 +65,7 @@
"lefthook": "^1.7.18",
"postcss": "^8.4.47",
"prompt": "^1.3.0",
"remix-development-tools": "https://pkg.pr.new/forge42dev/Remix-Dev-Tools/remix-development-tools@151.tgz",
"react-router-devtools": "https://pkg.pr.new/forge42dev/Remix-Dev-Tools/react-router-devtools@151.tgz",
"tailwindcss": "^3.4.13",
"tsx": "^4.19.1",
"typescript": "^5.6.2",
Expand All @@ -83,4 +82,4 @@
"node": ">=20.15.1",
"pnpm": ">=9.8.0"
}
}
}
Loading

0 comments on commit 7c9c7c3

Please sign in to comment.