Skip to content

Commit

Permalink
[www] Fix issues with nextjs 14
Browse files Browse the repository at this point in the history
  • Loading branch information
SamChou19815 committed Oct 28, 2023
1 parent 3c6e657 commit abb1e5f
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 110 deletions.
4 changes: 2 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.0.0/schema.json",
"$schema": "https://biomejs.dev/schemas/1.3.1/schema.json",
"vcs": {
"clientKind": "git",
"enabled": true,
Expand All @@ -8,7 +8,7 @@
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentSize": 2,
"indentWidth": 2,
"lineWidth": 100,
"ignore": ["**/.vercel/*", "**/build/*", "**/dist/*", "**/out/*"]
},
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
"build": "turbo run build",
"format": "biome format --write .",
"lint": "biome check .",
"fix": "biome lint . --apply-unsafe",
"fix": "biome lint . --apply",
"bump": "pnpm up -r --latest @types/node @types/react @types/react-dom typescript turbo"
},
"workspaces": ["packages/*"],
"devDependencies": {
"@biomejs/biome": "^1.2.2",
"@types/node": "^20.8.6",
"@types/react": "^18.2.28",
"@types/react-dom": "^18.2.13",
"@biomejs/biome": "^1.3.1",
"@types/node": "^20.8.7",
"@types/react": "^18.2.31",
"@types/react-dom": "^18.2.14",
"autoprefixer": "^10.4.16",
"postcss": "^8.4.29",
"tailwindcss": "^3.3.3",
"turbo": "^1.10.15",
"turbo": "^1.10.16",
"typescript": "^5.2.2"
}
}
2 changes: 1 addition & 1 deletion packages/private-tools/lib/arg-parse.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import parseArguments from "./arg-parse";
import { expect, it } from "bun:test";
import parseArguments from "./arg-parse";

it("Invalid flag test", () => {
expect(() => parseArguments({}, ["--foo"])).toThrow();
Expand Down
2 changes: 1 addition & 1 deletion packages/private-tools/lib/schema.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineSchema, objectSchema, validateAccordingToSchema } from "./schema";
import { expect, it } from "bun:test";
import { defineSchema, objectSchema, validateAccordingToSchema } from "./schema";

it("Integration test happy path", () => {
const schema = defineSchema({
Expand Down
8 changes: 5 additions & 3 deletions packages/private-tools/lib/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,20 @@ function validateAccordingToSchemaUntyped<const Spec extends FieldSpec>(
throw `Expected "${spec.exact}", but got ${unvalidated}`;
case "array":
if (Array.isArray(unvalidated)) {
unvalidated.forEach((it) => validateAccordingToSchemaUntyped(spec.nested, it));
for (const nestedUnvalidated of unvalidated) {
validateAccordingToSchemaUntyped(spec.nested, nestedUnvalidated);
}
return;
}
throw `Expected array, but got ${unvalidated}`;
case "object":
if (unvalidated != null && typeof unvalidated === "object") {
Object.entries(unvalidated).forEach(([key, value]) => {
for (const [key, value] of Object.entries(unvalidated)) {
const nestedSpec = spec.nested[key];
if (nestedSpec != null) {
validateAccordingToSchemaUntyped(nestedSpec, value);
}
});
}
return;
}
throw `Expected array, but got ${unvalidated}`;
Expand Down
2 changes: 1 addition & 1 deletion packages/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@types/mdx": "^2.0.8",
"autoprefixer": "^10.4.16",
"dev-sam-theme": "^0.0.1",
"next": "13.5.6",
"next": "14.0.0",
"postcss": "^8.4.31",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
1 change: 0 additions & 1 deletion packages/www/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ gtag('config', '${GA_ID}');`;

export const metadata: Metadata = {
icons: ["/logo.png", { rel: "shortcut icon", url: "/favicon.ico" }],
themeColor: "#F7F7F7",
authors: { name: "Developer Sam" },
keywords: [
"Sam",
Expand Down
Loading

0 comments on commit abb1e5f

Please sign in to comment.