chore : bump all packages versions

This commit is contained in:
GuillaumeSD
2024-12-29 00:01:08 +01:00
parent 2db361e2f6
commit 0b8d0ad780
10 changed files with 2112 additions and 1149 deletions

2
next-env.d.ts vendored
View File

@@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.

View File

@@ -1,70 +0,0 @@
const { PHASE_PRODUCTION_BUILD } = require("next/constants");
const nextConfig = (phase) =>
/** @type {import('next').NextConfig} */ ({
output: phase === PHASE_PRODUCTION_BUILD ? "export" : undefined,
trailingSlash: false,
reactStrictMode: true,
images: {
unoptimized: true,
},
headers:
phase === PHASE_PRODUCTION_BUILD
? undefined
: () => [
{
source: "/",
headers: [
{
key: "Cross-Origin-Embedder-Policy",
value: "require-corp",
},
{
key: "Cross-Origin-Opener-Policy",
value: "same-origin",
},
],
},
{
source: "/engines/:blob*",
headers: [
{
key: "Cross-Origin-Embedder-Policy",
value: "require-corp",
},
{
key: "Cross-Origin-Opener-Policy",
value: "same-origin",
},
],
},
{
source: "/play",
headers: [
{
key: "Cross-Origin-Embedder-Policy",
value: "require-corp",
},
{
key: "Cross-Origin-Opener-Policy",
value: "same-origin",
},
],
},
{
source: "/database",
headers: [
{
key: "Cross-Origin-Embedder-Policy",
value: "require-corp",
},
{
key: "Cross-Origin-Opener-Policy",
value: "same-origin",
},
],
},
],
});
module.exports = nextConfig;

70
next.config.ts Normal file
View File

@@ -0,0 +1,70 @@
import { NextConfig } from "next";
import { PHASE_PRODUCTION_BUILD } from "next/constants";
const nextConfig = (phase: string): NextConfig => ({
output: phase === PHASE_PRODUCTION_BUILD ? "export" : undefined,
trailingSlash: false,
reactStrictMode: true,
images: {
unoptimized: true,
},
headers:
phase === PHASE_PRODUCTION_BUILD
? undefined
: async () => [
{
source: "/",
headers: [
{
key: "Cross-Origin-Embedder-Policy",
value: "require-corp",
},
{
key: "Cross-Origin-Opener-Policy",
value: "same-origin",
},
],
},
{
source: "/engines/:blob*",
headers: [
{
key: "Cross-Origin-Embedder-Policy",
value: "require-corp",
},
{
key: "Cross-Origin-Opener-Policy",
value: "same-origin",
},
],
},
{
source: "/play",
headers: [
{
key: "Cross-Origin-Embedder-Policy",
value: "require-corp",
},
{
key: "Cross-Origin-Opener-Policy",
value: "same-origin",
},
],
},
{
source: "/database",
headers: [
{
key: "Cross-Origin-Embedder-Policy",
value: "require-corp",
},
{
key: "Cross-Origin-Opener-Policy",
value: "same-origin",
},
],
},
],
});
export default nextConfig;

3048
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -4,41 +4,41 @@
"private": true,
"license": "GPL-3.0-only",
"scripts": {
"dev": "next dev",
"dev": "next dev --turbo",
"build": "next build",
"start": "next start",
"lint": "next lint && tsc --noEmit",
"deploy": "firebase deploy --project=freechessproject --only hosting"
},
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@fontsource/roboto": "^5.0.3",
"@iconify/react": "^4.1.0",
"@mui/lab": "^5.0.0-alpha.165",
"@mui/material": "^5.13.4",
"@mui/x-data-grid": "^6.19.4",
"chess.js": "^1.0.0-beta.7",
"firebase": "^10.6.0",
"idb": "^8.0.0",
"jotai": "^2.6.4",
"next": "14.2.5",
"react": "18.2.0",
"react-chessboard": "^4.6.0",
"react-dom": "18.2.0",
"recharts": "^2.12.7"
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@fontsource/roboto": "^5.1.0",
"@iconify/react": "^5.1.0",
"@mui/lab": "^6.0.0-beta.21",
"@mui/material": "^6.3.0",
"@mui/x-data-grid": "^7.23.5",
"chess.js": "^1.0.0-beta.8",
"firebase": "^11.1.0",
"idb": "^8.0.1",
"jotai": "^2.11.0",
"next": "15.1.3",
"react": "18.3.1",
"react-chessboard": "^4.7.2",
"react-dom": "18.3.1",
"recharts": "^2.15.0"
},
"devDependencies": {
"@types/node": "20.3.0",
"@types/node": "^22.10.2",
"@types/react": "18.2.11",
"@types/react-dom": "18.2.4",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"@typescript-eslint/parser": "^5.59.11",
"eslint": "8.42.0",
"eslint-config-next": "13.4.5",
"@types/react-dom": "^18.3.5",
"@typescript-eslint/eslint-plugin": "^8.18.2",
"@typescript-eslint/parser": "^8.18.2",
"eslint": "^8.57.1",
"eslint-config-next": "^13.4.5",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^5.0.0",
"typescript": "5.1.3"
"typescript": "^5.7.2"
}
}

View File

@@ -3,7 +3,7 @@ import { useEffect, useState } from "react";
export const useScreenSize = () => {
const [screenSize, setScreenSize] = useState({
width: document?.querySelector(".MuiGrid-root")?.clientWidth ?? 500,
height: window?.innerHeight - 120 ?? 500,
height: window ? window.innerHeight - 120 : 500,
});
useEffect(() => {

View File

@@ -118,7 +118,7 @@ export const moveLineUciToSan = (
try {
const move = game.move(uciMoveParams(moveUci));
return move.san;
} catch (e) {
} catch {
return moveUci;
}
};

View File

@@ -65,10 +65,8 @@ export default function GameDatabase() {
width: 200,
headerAlign: "center",
align: "center",
valueGetter: (params) =>
`${params.row.white.name ?? "Unknown"} (${
params.row.white.rating ?? "?"
})`,
valueGetter: (_, row) =>
`${row.white.name ?? "Unknown"} (${row.white.rating ?? "?"})`,
},
{
field: "result",
@@ -83,10 +81,8 @@ export default function GameDatabase() {
width: 200,
headerAlign: "center",
align: "center",
valueGetter: (params) =>
`${params.row.black.name ?? "Unknown"} (${
params.row.black.rating ?? "?"
})`,
valueGetter: (_, row) =>
`${row.black.name ?? "Unknown"} (${row.black.rating ?? "?"})`,
},
{
field: "eval",
@@ -95,7 +91,7 @@ export default function GameDatabase() {
headerAlign: "center",
align: "center",
width: 100,
valueGetter: (params) => !!params.row.eval,
valueGetter: (_, row) => !!row.eval,
},
{
field: "openEvaluation",
@@ -169,7 +165,6 @@ export default function GameDatabase() {
columns={columns}
disableColumnMenu
hideFooter={true}
autoHeight={true}
localeText={gridLocaleText}
initialState={{
sorting: {

View File

@@ -24,7 +24,7 @@ export default function GameRecap() {
if (game.isInsufficientMaterial()) return "Draw by insufficient material";
if (game.isStalemate()) return "Draw by stalemate";
if (game.isThreefoldRepetition()) return "Draw by threefold repetition";
if (game.isDraw()) "Draw by fifty-move rule";
if (game.isDraw()) return "Draw by fifty-move rule";
return "You resigned";
};

View File

@@ -27,6 +27,6 @@
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "next.config.js"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "next.config.ts"],
"exclude": ["node_modules"]
}