From fe720d5a626b7d586e4102b76c9d2c0c0e4c50b8 Mon Sep 17 00:00:00 2001 From: Heinrich-XIAO <74563446+Heinrich-XIAO@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:37:06 -0400 Subject: [PATCH 01/15] fix indentation in package json --- package.json | 94 ++++++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index 8b50bd9c0..2a0aae1da 100644 --- a/package.json +++ b/package.json @@ -1,49 +1,49 @@ { - "name": "infinite-chess-server", - "version": "1.4.3", - "description": "infinitechess.org server", - "author": "Naviary", - "license": "AGPL", - "main": "src/server/server.js", - "type": "module", - "dependencies": { - "@swc/core": "^1.7.0", - "bcrypt": "^5.1.1", - "browserslist": "^4.23.2", - "cookie-parser": "^1.4.6", - "cors": "^2.8.5", - "date-fns": "^2.23.0", - "dotenv": "^16.0.3", - "ejs": "^3.1.10", - "esbuild": "^0.23.1", - "express": "^4.18.2", - "glob": "^11.0.0", - "i18next": "^23.12.1", - "i18next-http-middleware": "^3.6.0", - "jsonwebtoken": "^9.0.2", - "lightningcss": "^1.25.1", - "node-forge": "^1.3.1", - "nodemailer": "^6.8.0", - "nodemon": "^3.1.4", - "proper-lockfile": "^4.1.2", - "sharp": "^0.33.4", - "smol-toml": "^1.2.2", - "uuid": "^8.3.2", - "ws": "^8.16.0", - "xss": "^1.0.15" - }, - "devDependencies": { - "@eslint/js": "^9.9.0", - "@types/node": "^20.14.10", - "eslint": "^9.9.0", - "globals": "^15.9.0", - "madge": "^8.0.0" - }, - "scripts": { - "build": "node build.js", - "watch": "nodemon", - "start": "node .", - "build-images": "node src/server/utility/generateImages.js", - "generate-dependancy-graph": "node src/server/utility/generateDependancyGraph.js" - } + "name": "infinite-chess-server", + "version": "1.4.3", + "description": "infinitechess.org server", + "author": "Naviary", + "license": "AGPL", + "main": "src/server/server.js", + "type": "module", + "dependencies": { + "@swc/core": "^1.7.0", + "bcrypt": "^5.1.1", + "browserslist": "^4.23.2", + "cookie-parser": "^1.4.6", + "cors": "^2.8.5", + "date-fns": "^2.23.0", + "dotenv": "^16.0.3", + "ejs": "^3.1.10", + "esbuild": "^0.23.1", + "express": "^4.18.2", + "glob": "^11.0.0", + "i18next": "^23.12.1", + "i18next-http-middleware": "^3.6.0", + "jsonwebtoken": "^9.0.2", + "lightningcss": "^1.25.1", + "node-forge": "^1.3.1", + "nodemailer": "^6.8.0", + "nodemon": "^3.1.4", + "proper-lockfile": "^4.1.2", + "sharp": "^0.33.4", + "smol-toml": "^1.2.2", + "uuid": "^8.3.2", + "ws": "^8.16.0", + "xss": "^1.0.15" + }, + "devDependencies": { + "@eslint/js": "^9.9.0", + "@types/node": "^20.14.10", + "eslint": "^9.9.0", + "globals": "^15.9.0", + "madge": "^8.0.0" + }, + "scripts": { + "build": "node build.js", + "watch": "nodemon", + "start": "node .", + "build-images": "node src/server/utility/generateImages.js", + "generate-dependancy-graph": "node src/server/utility/generateDependancyGraph.js" + } } From 7f1862b18a9faa00f6fb0a25ded0d2e8579372cf Mon Sep 17 00:00:00 2001 From: Heinrich-XIAO <74563446+Heinrich-XIAO@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:38:52 -0400 Subject: [PATCH 02/15] fix indentation in eslint config --- eslint.config.js | 96 ++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 9a42e8b97..e4be2dac6 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -3,52 +3,52 @@ import globals from "globals"; import pluginJs from "@eslint/js"; export default [ - pluginJs.configs.recommended, - { - rules: { // Overrides the preset defined by "pluginJs.configs.recommended" above - 'no-undef': 'error', // Undefined variables not allowed - 'no-unused-vars': 'warn', // Unused variables give a warning - 'semi': ['error', 'always'], // Enforces semicolons be present at the end of every line. - 'semi-spacing': ['error', { // Enforces semicolons have a space after them if they are proceeded by other statements. - before: false, - after: true, - }], - 'keyword-spacing': ['error', { // Requires a space be after if, else, for, and while's. - before: true, - after: true, - }], - "space-before-function-paren": ["error", "never"], // Enforces there be NO space between function DECLARATIONS and () - "space-before-blocks": ["error", "always"], // Enforces there be a space between function parameters and the {} block - "arrow-spacing": ["error", { "before": true, "after": true }], // Requires a space before and after "=>" in arrow functions - "func-call-spacing": ["error", "never"], // Enforces there be NO space between function CALLS and () - "space-infix-ops": ["error", { "int32Hint": false }], // Enforces a space around infix operators, like "=" in assignments - "no-eval": "error", // Disallows use of `eval()`, as it can lead to security vulnerabilities and performance issues. - 'indent': ['error', 'tab', { // All indentation must use tabs - 'SwitchCase': 1, // Enforce switch statements to have indentation (they don't by default) - "ignoredNodes": ["ConditionalExpression", "ArrayExpression"] // Ignore conditional expressions "?" & ":" over multiple lines, AND array contents over multiple lines! - }], - "prefer-const": "error", // "let" variables that are never redeclared must be declared as "const" - "no-var": "error", // Disallows declaring variables with "var", as they are function-scoped (not block), so hoisting is very confusing. - "max-depth": ["warn", 4], // Maximum number of nested blocks allowed. - "eqeqeq": ["error", "always"], // Disallows "!=" and "==" to remove type coercion bugs. Use "!==" and "===" instead. - 'dot-notation': 'error', // Forces dot notation `.` instead of bracket notation `[""]` wherever possible - 'no-empty': 'off', // Disable the no-empty rule so blocks aren't entirely red just as we create them - 'no-prototype-builtins': 'off', // Allows Object.hasOwnProperty() to be used - // "no-multi-spaces": "error", // Disallows multiple spaces that isn't indentation. - // "max-lines": ["warn", 500] // Can choose to enable to place a cap on how big files can be, in lines. - // "complexity": ["warn", { "max": 10 }] // Can choose to enable to cap the complexity, or number of independant paths, which can lead to methods. - }, - languageOptions: { - sourceType: "module", // Can also be "commonjs", but "import" and "export" statements will give an eslint error - globals: { - ...globals.node, // Defines "require" and "exports" - ...globals.browser, // Defines all browser environment variables for the game code - // Game code scripts are considered public variables - // MOST OF THE GAME SCRIPTS are ESM scripts, importing their own definitions, so we don't need to list them below. - translations: "readonly", // Injected into the html through ejs - memberHeader: "readonly", - htmlscript: "readonly", - } - } - } + pluginJs.configs.recommended, + { + rules: { // Overrides the preset defined by "pluginJs.configs.recommended" above + 'no-undef': 'error', // Undefined variables not allowed + 'no-unused-vars': 'warn', // Unused variables give a warning + 'semi': ['error', 'always'], // Enforces semicolons be present at the end of every line. + 'semi-spacing': ['error', { // Enforces semicolons have a space after them if they are proceeded by other statements. + before: false, + after: true, + }], + 'keyword-spacing': ['error', { // Requires a space be after if, else, for, and while's. + before: true, + after: true, + }], + "space-before-function-paren": ["error", "never"], // Enforces there be NO space between function DECLARATIONS and () + "space-before-blocks": ["error", "always"], // Enforces there be a space between function parameters and the {} block + "arrow-spacing": ["error", { "before": true, "after": true }], // Requires a space before and after "=>" in arrow functions + "func-call-spacing": ["error", "never"], // Enforces there be NO space between function CALLS and () + "space-infix-ops": ["error", { "int32Hint": false }], // Enforces a space around infix operators, like "=" in assignments + "no-eval": "error", // Disallows use of `eval()`, as it can lead to security vulnerabilities and performance issues. + 'indent': ['error', 'tab', { // All indentation must use tabs + 'SwitchCase': 1, // Enforce switch statements to have indentation (they don't by default) + "ignoredNodes": ["ConditionalExpression", "ArrayExpression"] // Ignore conditional expressions "?" & ":" over multiple lines, AND array contents over multiple lines! + }], + "prefer-const": "error", // "let" variables that are never redeclared must be declared as "const" + "no-var": "error", // Disallows declaring variables with "var", as they are function-scoped (not block), so hoisting is very confusing. + "max-depth": ["warn", 4], // Maximum number of nested blocks allowed. + "eqeqeq": ["error", "always"], // Disallows "!=" and "==" to remove type coercion bugs. Use "!==" and "===" instead. + 'dot-notation': 'error', // Forces dot notation `.` instead of bracket notation `[""]` wherever possible + 'no-empty': 'off', // Disable the no-empty rule so blocks aren't entirely red just as we create them + 'no-prototype-builtins': 'off', // Allows Object.hasOwnProperty() to be used + // "no-multi-spaces": "error", // Disallows multiple spaces that isn't indentation. + // "max-lines": ["warn", 500] // Can choose to enable to place a cap on how big files can be, in lines. + // "complexity": ["warn", { "max": 10 }] // Can choose to enable to cap the complexity, or number of independant paths, which can lead to methods. + }, + languageOptions: { + sourceType: "module", // Can also be "commonjs", but "import" and "export" statements will give an eslint error + globals: { + ...globals.node, // Defines "require" and "exports" + ...globals.browser, // Defines all browser environment variables for the game code + // Game code scripts are considered public variables + // MOST OF THE GAME SCRIPTS are ESM scripts, importing their own definitions, so we don't need to list them below. + translations: "readonly", // Injected into the html through ejs + memberHeader: "readonly", + htmlscript: "readonly", + } + } + } ]; From 4606f3f869a354b77cc7f786cec9a5f3c4ba7a90 Mon Sep 17 00:00:00 2001 From: Heinrich-XIAO <74563446+Heinrich-XIAO@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:39:39 -0400 Subject: [PATCH 03/15] jsconfig.json fixed indentation --- jsconfig.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/jsconfig.json b/jsconfig.json index a3b58fe67..a1014d579 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -1,15 +1,15 @@ { - "compilerOptions": { - "module": "ESNext", - "moduleResolution": "Bundler", - "target": "ES2020", - "jsx": "react", - "allowImportingTsExtensions": true, - "strictNullChecks": true, - "strictFunctionTypes": true - }, - "exclude": [ - "node_modules", - "**/node_modules/*" - ] -} \ No newline at end of file + "compilerOptions": { + "module": "ESNext", + "moduleResolution": "Bundler", + "target": "ES2020", + "jsx": "react", + "allowImportingTsExtensions": true, + "strictNullChecks": true, + "strictFunctionTypes": true + }, + "exclude": [ + "node_modules", + "**/node_modules/*" + ] +} From 3217f85443bd3a811d31683a580ace4aa40d6564 Mon Sep 17 00:00:00 2001 From: Heinrich-XIAO <74563446+Heinrich-XIAO@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:40:38 -0400 Subject: [PATCH 04/15] fix indentation in nodemon config file --- nodemon.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nodemon.json b/nodemon.json index c0a93286b..0017f5222 100644 --- a/nodemon.json +++ b/nodemon.json @@ -1,8 +1,8 @@ { - "ignore": [ - "./database/**/*", - "./dist/**/*" - ], - "exec": "npm run build && npm run start", - "ext": "js,html,css,jpg,png,gif,mp3,wav,webp,toml,ejs,json,mjs" + "ignore": [ + "./database/**/*", + "./dist/**/*" + ], + "exec": "npm run build && npm run start", + "ext": "js,html,css,jpg,png,gif,mp3,wav,webp,toml,ejs,json,mjs" } From 1e0a5a460570c1cc10cc76b15894b8c6fe29c8a7 Mon Sep 17 00:00:00 2001 From: Heinrich-XIAO <74563446+Heinrich-XIAO@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:41:40 -0400 Subject: [PATCH 05/15] i forgot about the other js config file --- src/jsconfig.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/jsconfig.json b/src/jsconfig.json index 961a4a5e5..9a2844837 100644 --- a/src/jsconfig.json +++ b/src/jsconfig.json @@ -1,15 +1,15 @@ { - "compilerOptions": { - "module": "ESNext", - "moduleResolution": "Node", - "target": "ES2020", - "jsx": "react", - "allowImportingTsExtensions": true, - "strictNullChecks": true, - "strictFunctionTypes": true - }, - "exclude": [ - "node_modules", - "**/node_modules/*" - ] -} \ No newline at end of file + "compilerOptions": { + "module": "ESNext", + "moduleResolution": "Node", + "target": "ES2020", + "jsx": "react", + "allowImportingTsExtensions": true, + "strictNullChecks": true, + "strictFunctionTypes": true + }, + "exclude": [ + "node_modules", + "**/node_modules/*" + ] +} From 46ad67ec1beb198138aad84f96617c005f3615aa Mon Sep 17 00:00:00 2001 From: Heinrich-XIAO <74563446+Heinrich-XIAO@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:43:44 -0400 Subject: [PATCH 06/15] fix indentation in chinese toml file --- translation/zh-CN.toml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/translation/zh-CN.toml b/translation/zh-CN.toml index 2ee349d76..66ba4daab 100644 --- a/translation/zh-CN.toml +++ b/translation/zh-CN.toml @@ -493,26 +493,26 @@ more_dev_logs = ["更多开发者日志在我们的", "Discord", "和在", "ches [news.sept11-2024] date = "2024年9月11日:" paragraph1 = [ - "首届无限棋锦标赛现已开放报名!!!比赛将采用经典变体,时间控制为10分钟加6秒(此功能将很快添加)。获胜者将在 ", - "社区Discord", # The website inserts a hyperlink over this text - " 上获得特殊标识和/或角色!" + "首届无限棋锦标赛现已开放报名!!!比赛将采用经典变体,时间控制为10分钟加6秒(此功能将很快添加)。获胜者将在 ", + "社区Discord", # The website inserts a hyperlink over this text + " 上获得特殊标识和/或角色!" ], paragraph2 = [ - "这是 ", - "报名表格", # The website inserts a hyperlink over this text - "!报名截止日期是 ", - "2024年9月27日(星期五)!", # The website bolds this text - " 完整规则请查看 ", - "这里", # The website inserts a hyperlink over this text - "。有关锦标赛的最新动态,请加入 ", - "Discord", # The website inserts a hyperlink over this text - "!" + "这是 ", + "报名表格", # The website inserts a hyperlink over this text + "!报名截止日期是 ", + "2024年9月27日(星期五)!", # The website bolds this text + " 完整规则请查看 ", + "这里", # The website inserts a hyperlink over this text + "。有关锦标赛的最新动态,请加入 ", + "Discord", # The website inserts a hyperlink over this text + "!" ] paragraph3 = "更新 v.1.4.1 已发布!" list = [ - "已添加和棋提议功能!在暂停菜单中找到提议和棋按钮!", - "已添加以下语言支持:中文、波兰语、葡萄牙语!", - "修复了一个错误:重复点击创建邀请按钮时会收到如您已拥有邀请或无法接受自己的邀请等消息。" + "已添加和棋提议功能!在暂停菜单中找到提议和棋按钮!", + "已添加以下语言支持:中文、波兰语、葡萄牙语!", + "修复了一个错误:重复点击创建邀请按钮时会收到如您已拥有邀请或无法接受自己的邀请等消息。" ] From 6917c90e3ba338d13284c81710de33fe0d071808 Mon Sep 17 00:00:00 2001 From: Heinrich-XIAO <74563446+Heinrich-XIAO@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:45:07 -0400 Subject: [PATCH 07/15] fix indentation in chinese traditional toml file --- translation/zh-TW.toml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/translation/zh-TW.toml b/translation/zh-TW.toml index ea451414e..e0a2e4ba2 100644 --- a/translation/zh-TW.toml +++ b/translation/zh-TW.toml @@ -492,26 +492,26 @@ more_dev_logs = ["更多開發者日志在我們的", "Discord", "和在", "ches [news.sept11-2024] date = "2024年9月11日:" paragraph1 = [ - "首屆無限棋錦標賽現已開放報名!!!比賽將採用經典變體,時間控制為10分鐘加6秒(此功能將很快添加)。獲勝者將在 ", - "社區Discord", # The website inserts a hyperlink over this text - " 上獲得特殊標識和/或角色!" + "首屆無限棋錦標賽現已開放報名!!!比賽將採用經典變體,時間控制為10分鐘加6秒(此功能將很快添加)。獲勝者將在 ", + "社區Discord", # The website inserts a hyperlink over this text + " 上獲得特殊標識和/或角色!" ], paragraph2 = [ - "這是 ", - "報名表格", # The website inserts a hyperlink over this text - "!報名截止日期是 ", - "2024年9月27日(星期五)!", # The website bolds this text - " 完整規則請查看 ", - "這裡", # The website inserts a hyperlink over this text - "。有關錦標賽的最新動態,請加入 ", - "Discord", # The website inserts a hyperlink over this text - "!" + "這是 ", + "報名表格", # The website inserts a hyperlink over this text + "!報名截止日期是 ", + "2024年9月27日(星期五)!", # The website bolds this text + " 完整規則請查看 ", + "這裡", # The website inserts a hyperlink over this text + "。有關錦標賽的最新動態,請加入 ", + "Discord", # The website inserts a hyperlink over this text + "!" ] paragraph3 = "更新 v.1.4.1 已發布!" list = [ - "已添加和棋提議功能!在暫停菜單中找到提議和棋按鈕!", - "已添加以下語言支持:中文、波蘭語、葡萄牙語!", - "修復了一個錯誤:重復點擊創建邀請按鈕時會收到如您已擁有邀請或無法接受自己的邀請等消息。" + "已添加和棋提議功能!在暫停菜單中找到提議和棋按鈕!", + "已添加以下語言支持:中文、波蘭語、葡萄牙語!", + "修復了一個錯誤:重復點擊創建邀請按鈕時會收到如您已擁有邀請或無法接受自己的邀請等消息。" ] [news.aug1-2024] # Update 1.4 From f1f674e9be0cd6de669c0084015d62c434deb6f4 Mon Sep 17 00:00:00 2001 From: Heinrich-XIAO <74563446+Heinrich-XIAO@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:46:48 -0400 Subject: [PATCH 08/15] fix indentation in french toml translation file --- translation/en-US.toml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/translation/en-US.toml b/translation/en-US.toml index 900b445a1..e4f12617d 100644 --- a/translation/en-US.toml +++ b/translation/en-US.toml @@ -492,26 +492,26 @@ more_dev_logs = ["More dev logs are posted on the ", "official discord", ", and [news.sept11-2024] date = "Sept 11, 2024:" paragraph1 = [ - "The first-ever Infinite Chess tournament is now open for sign-ups!!! It will be played on the Classical variant, and the time control will be 10m+6s (this will be added soon). The winner will be given a special flare and/or role on the ", - "community discord", # The website inserts a hyperlink over this text - "!" + "The first-ever Infinite Chess tournament is now open for sign-ups!!! It will be played on the Classical variant, and the time control will be 10m+6s (this will be added soon). The winner will be given a special flare and/or role on the ", + "community discord", # The website inserts a hyperlink over this text + "!" ], paragraph2 = [ - "Here's the ", - "sign-up form", # The website inserts a hyperlink over this text - "! The deadline to sign up is ", - "Friday, Sept 27th!", # The website bolds this text - " The full rules are located ", - "here", # The website inserts a hyperlink over this text - ". For future updates about the tournament, join the ", - "discord", # The website inserts a hyperlink over this text - "!" + "Here's the ", + "sign-up form", # The website inserts a hyperlink over this text + "! The deadline to sign up is ", + "Friday, Sept 27th!", # The website bolds this text + " The full rules are located ", + "here", # The website inserts a hyperlink over this text + ". For future updates about the tournament, join the ", + "discord", # The website inserts a hyperlink over this text + "!" ] paragraph3 = "Update v.1.4.1 has been released!" list = [ - "Draw offers have been added! Find the offer draw button in the pause menu!", - "Added languages for the following: Chinese, Polish, Portuguese!", - "Fixed bug where spamming the Create Invite button gave you messages such as you already have an invite, or you can't accept your own invite." + "Draw offers have been added! Find the offer draw button in the pause menu!", + "Added languages for the following: Chinese, Polish, Portuguese!", + "Fixed bug where spamming the Create Invite button gave you messages such as you already have an invite, or you can't accept your own invite." ] [news.aug1-2024] # Update 1.4 From 7ab1ff1215c663a9ef4bf0d339880f3bb3da33d4 Mon Sep 17 00:00:00 2001 From: Heinrich-XIAO <74563446+Heinrich-XIAO@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:50:11 -0400 Subject: [PATCH 09/15] fix indentation in changes.json for translations --- translation/changes.json | 271 ++++++++++++++++++++------------------- 1 file changed, 136 insertions(+), 135 deletions(-) diff --git a/translation/changes.json b/translation/changes.json index 569b5065d..22978be3d 100644 --- a/translation/changes.json +++ b/translation/changes.json @@ -1,137 +1,138 @@ { - "15": { - "note": "Added news.sept9-2024, line 493", - "changes": [] - }, - "14": { - "note": "Added translations for the tab titles. Added [play] and play.title on lines 116 & 117. Changed play.main-menu.loading to play.loading, and changed play.main-menu.error to play.error", - "changes": [ - "index.title", - "member.title", - "play.title", - "play.main-menu.loading", - "play.main-menu.error", - "play.loading", - "play.error" - ] - }, - "13": { - "note": "Added draw offers. Deleted ws-player_already_has_invite, ws-accept_own_invite, and ws-invite_cancelled", - "changes": [ - "play.pause.offer_draw", - "play.drawoffer.question", - "play.javascript.offer_draw", - "play.javascript.accept_draw", - "play.javascript.termination.agreement", - "play.javascript.results.draw_agreement", - "server.javascript.ws-player_already_has_invite", - "server.javascript.ws-accept_own_invite", - "server.javascript.ws-invite_cancelled" - ] - }, - "12": { - "note": "Corrected opponen_resignation to opponent_resignation", - "changes": [ - "play.javascript.results.opponen_resignation" - ] - }, - "11": { - "note": "Changed the structure of play.javascript.termination.moverule", - "changes": [ - "play.javascript.termination.moverule" - ] - }, - "10": { - "note": "Added news post Aug 1, 2024. Deleted news post Aug 26, 2023.", - "changes": [ - "news.aug1-2024.date", - "news.aug1-2024.text_top", - "news.aug1-2024.update_list", - "news.aug26-2023.date", - "news.aug26-2023.text_top", - "news.aug26-2023.text_box" - ] - }, - "9": { - "note": "In the guide, under controls, where it describes what the Tab key does, added sentence 'Clicking these arrows will teleport you to the piece they're pointing to.' line 142. Also changed controls_paragraph, line 137.", - "changes": [ - "play.guide.controls_paragraph", - "play.guide.keybinds" - ] - }, - "8": { - "note": "Added a knightrider description for the guide, on line 170.", - "changes": ["play.guide.pieces.knightrider"] - }, - "7": { - "note": "Added ws-server_under_maintenance on line 561.", - "changes": ["server.javascript.ws-server_under_maintenance"] - }, - "6": { - "note": "Added all of play.javascript.termination, line 344, which provides spoken language descriptions of what caused the termination of the game.", - "changes": [] - }, - "5": { - "note": "Deleted create-account.argreement on line 100, and replaced it with create-account.agreement which is different. Deleted play.play-menu.variants. Added several entries to play.play-menu. Added several entries to server.javascript.", - "changes": ["create-account.argreement", - "create-account.agreement", - "play.play-menu.variants", - "play.play-menu.Classical", - "play.play-menu.Classical_Plus", - "play.play-menu.CoaIP", - "play.play-menu.Pawndard", - "play.play-menu.Knighted_Chess", - "play.play-menu.Knightline", - "play.play-menu.Core", - "play.play-menu.Standarch", - "play.play-menu.Pawn_Horde", - "play.play-menu.Space_Classic", - "play.play-menu.Space", - "play.play-menu.Obstocean", - "play.play-menu.Abundance", - "play.play-menu.Amazon_Chandelier", - "play.play-menu.Containment", - "play.play-menu.Classical_Limit_7", - "play.play-menu.CoaIP_Limit_7", - "play.play-menu.Chess", - "play.play-menu.Classical_KOTH", - "play.play-menu.CoaIP_KOTH", - "play.play-menu.Omega", - "play.play-menu.Omega_Squared", - "play.play-menu.Omega_Cubed", - "play.play-menu.Omega_Fourth", - "play.play-menu.no_clock", - "play.play-menu.casual", - "server.javascript.ws-username_reserved", - "server.javascript.ws-already_in_game", - "server.javascript.ws-player_already_has_invite", - "server.javascript.ws-invite_cancelled", - "server.javascript.ws-accept_own_invite", - "server.javascript.ws-server_restarting", - "server.javascript.ws-minutes", - "server.javascript.ws-minute", - "server.javascript.ws-no_abort_game_over", - "server.javascript.ws-no_abort_after_moves", - "server.javascript.ws-game_aborted_cheating", - "server.javascript.ws-cannot_resign_finished_game", - "server.javascript.ws-invalid_code", - "server.javascript.ws-game_aborted" - ] - }, - "4": { - "note": "Added news.july22-2024 on line 462", - "changes": ["news.july22-2024"] - }, - "3": { - "note": "added play.javascript.invites.start_game on line 314", - "changes": ["play.javascript.invites.start_game"] - }, - "2": { - "note": "added login.login_button on line 448", - "changes": ["login.login_button"] - }, - "1": { - "note": "inital commit of en-US-toml", - "changes": [] - } + "15": { + "note": "Added news.sept9-2024, line 493", + "changes": [] + }, + "14": { + "note": "Added translations for the tab titles. Added [play] and play.title on lines 116 & 117. Changed play.main-menu.loading to play.loading, and changed play.main-menu.error to play.error", + "changes": [ + "index.title", + "member.title", + "play.title", + "play.main-menu.loading", + "play.main-menu.error", + "play.loading", + "play.error" + ] + }, + "13": { + "note": "Added draw offers. Deleted ws-player_already_has_invite, ws-accept_own_invite, and ws-invite_cancelled", + "changes": [ + "play.pause.offer_draw", + "play.drawoffer.question", + "play.javascript.offer_draw", + "play.javascript.accept_draw", + "play.javascript.termination.agreement", + "play.javascript.results.draw_agreement", + "server.javascript.ws-player_already_has_invite", + "server.javascript.ws-accept_own_invite", + "server.javascript.ws-invite_cancelled" + ] + }, + "12": { + "note": "Corrected opponen_resignation to opponent_resignation", + "changes": [ + "play.javascript.results.opponen_resignation" + ] + }, + "11": { + "note": "Changed the structure of play.javascript.termination.moverule", + "changes": [ + "play.javascript.termination.moverule" + ] + }, + "10": { + "note": "Added news post Aug 1, 2024. Deleted news post Aug 26, 2023.", + "changes": [ + "news.aug1-2024.date", + "news.aug1-2024.text_top", + "news.aug1-2024.update_list", + "news.aug26-2023.date", + "news.aug26-2023.text_top", + "news.aug26-2023.text_box" + ] + }, + "9": { + "note": "In the guide, under controls, where it describes what the Tab key does, added sentence 'Clicking these arrows will teleport you to the piece they're pointing to.' line 142. Also changed controls_paragraph, line 137.", + "changes": [ + "play.guide.controls_paragraph", + "play.guide.keybinds" + ] + }, + "8": { + "note": "Added a knightrider description for the guide, on line 170.", + "changes": ["play.guide.pieces.knightrider"] + }, + "7": { + "note": "Added ws-server_under_maintenance on line 561.", + "changes": ["server.javascript.ws-server_under_maintenance"] + }, + "6": { + "note": "Added all of play.javascript.termination, line 344, which provides spoken language descriptions of what caused the termination of the game.", + "changes": [] + }, + "5": { + "note": "Deleted create-account.argreement on line 100, and replaced it with create-account.agreement which is different. Deleted play.play-menu.variants. Added several entries to play.play-menu. Added several entries to server.javascript.", + "changes": [ + "create-account.argreement", + "create-account.agreement", + "play.play-menu.variants", + "play.play-menu.Classical", + "play.play-menu.Classical_Plus", + "play.play-menu.CoaIP", + "play.play-menu.Pawndard", + "play.play-menu.Knighted_Chess", + "play.play-menu.Knightline", + "play.play-menu.Core", + "play.play-menu.Standarch", + "play.play-menu.Pawn_Horde", + "play.play-menu.Space_Classic", + "play.play-menu.Space", + "play.play-menu.Obstocean", + "play.play-menu.Abundance", + "play.play-menu.Amazon_Chandelier", + "play.play-menu.Containment", + "play.play-menu.Classical_Limit_7", + "play.play-menu.CoaIP_Limit_7", + "play.play-menu.Chess", + "play.play-menu.Classical_KOTH", + "play.play-menu.CoaIP_KOTH", + "play.play-menu.Omega", + "play.play-menu.Omega_Squared", + "play.play-menu.Omega_Cubed", + "play.play-menu.Omega_Fourth", + "play.play-menu.no_clock", + "play.play-menu.casual", + "server.javascript.ws-username_reserved", + "server.javascript.ws-already_in_game", + "server.javascript.ws-player_already_has_invite", + "server.javascript.ws-invite_cancelled", + "server.javascript.ws-accept_own_invite", + "server.javascript.ws-server_restarting", + "server.javascript.ws-minutes", + "server.javascript.ws-minute", + "server.javascript.ws-no_abort_game_over", + "server.javascript.ws-no_abort_after_moves", + "server.javascript.ws-game_aborted_cheating", + "server.javascript.ws-cannot_resign_finished_game", + "server.javascript.ws-invalid_code", + "server.javascript.ws-game_aborted" + ] + }, + "4": { + "note": "Added news.july22-2024 on line 462", + "changes": ["news.july22-2024"] + }, + "3": { + "note": "added play.javascript.invites.start_game on line 314", + "changes": ["play.javascript.invites.start_game"] + }, + "2": { + "note": "added login.login_button on line 448", + "changes": ["login.login_button"] + }, + "1": { + "note": "inital commit of en-US-toml", + "changes": [] + } } From 332787ec0d8d2f9685a637e9b780bef83d2db5da Mon Sep 17 00:00:00 2001 From: Heinrich-XIAO <74563446+Heinrich-XIAO@users.noreply.github.com> Date: Thu, 3 Oct 2024 17:20:58 -0400 Subject: [PATCH 10/15] fix nodemon merge conflict --- nodemon.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nodemon.json b/nodemon.json index 0017f5222..459e70a93 100644 --- a/nodemon.json +++ b/nodemon.json @@ -1,8 +1,9 @@ { "ignore": [ "./database/**/*", - "./dist/**/*" + "./dist/**/*", + "./docs/*" ], "exec": "npm run build && npm run start", - "ext": "js,html,css,jpg,png,gif,mp3,wav,webp,toml,ejs,json,mjs" + "ext": "js,html,css,jpg,png,gif,mp3,wav,webp,toml,ejs,json,mjs,md" } From 523a3a417830a547c401a6ddae8313228f6438d5 Mon Sep 17 00:00:00 2001 From: Heinrich-XIAO <74563446+Heinrich-XIAO@users.noreply.github.com> Date: Thu, 3 Oct 2024 17:22:28 -0400 Subject: [PATCH 11/15] fix package.json merge conflict --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 2a0aae1da..391608ee9 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "i18next-http-middleware": "^3.6.0", "jsonwebtoken": "^9.0.2", "lightningcss": "^1.25.1", + "marked": "^14.1.2", "node-forge": "^1.3.1", "nodemailer": "^6.8.0", "nodemon": "^3.1.4", From f347c7073bd425156f7183af34fce3c4e893e678 Mon Sep 17 00:00:00 2001 From: Heinrich-XIAO <74563446+Heinrich-XIAO@users.noreply.github.com> Date: Thu, 3 Oct 2024 17:24:54 -0400 Subject: [PATCH 12/15] fix merge conflict --- translation/changes.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/translation/changes.json b/translation/changes.json index 22978be3d..8b8ae0bc7 100644 --- a/translation/changes.json +++ b/translation/changes.json @@ -1,4 +1,12 @@ { + "17": { + "note": "Added credits.language_heading and credits.language_credits, line 82", + "changes": [] + }, + "16": { + "note": "Deleted all news posts. The only keys you keep in the `news` section is `title` and `more_dev_logs`! Please verify your language's news posts have been translated correctly within translation/news!", + "changes": [] + }, "15": { "note": "Added news.sept9-2024, line 493", "changes": [] From 5f59d8acfefc590b78719f734be61b487cb518d3 Mon Sep 17 00:00:00 2001 From: Heinrich-XIAO <74563446+Heinrich-XIAO@users.noreply.github.com> Date: Thu, 3 Oct 2024 18:24:01 -0400 Subject: [PATCH 13/15] fix big int js i guess --- dev-utils/scripts/bigint.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dev-utils/scripts/bigint.js b/dev-utils/scripts/bigint.js index 511a154c0..1ccd977b4 100644 --- a/dev-utils/scripts/bigint.js +++ b/dev-utils/scripts/bigint.js @@ -34,12 +34,12 @@ const bigint = (function() { return [product, factor1]; } - + // Divides and returns a BigInt with the same factor as the first argument! function divide([bigint1, factor1], [bigint2, factor2]) { const adjustedNumerator = bigint1 * factor2; const quotient = adjustedNumerator / bigint2; - + return [quotient, factor1]; } @@ -47,12 +47,12 @@ const bigint = (function() { function bigIntToString([bigInt, factor]) { const string = bigInt.toString(); - + // If the factor is 1, no need to insert a decimal point if (factor === 1n) return string; - + const factorLength = factor.toString().length - 1; // Subtract 1 because '10' has 1 zero, '100' has 2 zeros, etc. - + if (string.length <= factorLength) { // If the string length is less than or equal to the factor length, pad with zeros and place a decimal at the start const padding = '0'.repeat(factorLength - string.length + 1); // +1 for the '0.' before the number @@ -90,7 +90,7 @@ const bigint = (function() { function log10(bigint) { if (bigint < 0) return NaN; const s = bigint.toString(10); - + return s.length + Math.log10("0." + s.substring(0, 15)); } @@ -112,4 +112,4 @@ const bigint = (function() { getDecimalCountFromScalingFactor }); -})(); \ No newline at end of file +})(); From 7d596db21f4bd1bd518b850080ea8087afaf8626 Mon Sep 17 00:00:00 2001 From: Naviary <163621561+Naviary2@users.noreply.github.com> Date: Sat, 5 Oct 2024 10:48:34 -0600 Subject: [PATCH 14/15] Removed unused line --- eslint.config.js | 1 - jsconfig.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index e4be2dac6..35c9609f7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,4 +1,3 @@ -/* eslint-disable indent */ import globals from "globals"; import pluginJs from "@eslint/js"; diff --git a/jsconfig.json b/jsconfig.json index a1014d579..14b9979ca 100644 --- a/jsconfig.json +++ b/jsconfig.json @@ -12,4 +12,4 @@ "node_modules", "**/node_modules/*" ] -} +} \ No newline at end of file From d7853921cfa1c614cc30cac1d438edaf2a742bba Mon Sep 17 00:00:00 2001 From: Naviary <163621561+Naviary2@users.noreply.github.com> Date: Sat, 5 Oct 2024 10:50:16 -0600 Subject: [PATCH 15/15] Reverted line --- translation/changes.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translation/changes.json b/translation/changes.json index 8b8ae0bc7..0d501d2f5 100644 --- a/translation/changes.json +++ b/translation/changes.json @@ -8,7 +8,7 @@ "changes": [] }, "15": { - "note": "Added news.sept9-2024, line 493", + "note": "Added news.sept11-2024, line 493. ALL NEWS POSTS DELETED IN FUTURE CHANGE.", "changes": [] }, "14": {