diff --git a/framework/eslint-config/package.json b/framework/eslint-config/package.json index 44c9c796b..305e33b40 100644 --- a/framework/eslint-config/package.json +++ b/framework/eslint-config/package.json @@ -8,9 +8,9 @@ "@eslint-react/eslint-plugin": "^1.52.3", "@eslint/compat": "^1.3.1", "@eslint/eslintrc": "^3.3.1", - "@stylistic/eslint-plugin": "^5.2.1", - "@typescript-eslint/eslint-plugin": "^8.37.0", - "@typescript-eslint/parser": "^8.37.0", + "@stylistic/eslint-plugin": "^5.2.2", + "@typescript-eslint/eslint-plugin": "^8.38.0", + "@typescript-eslint/parser": "^8.38.0", "eslint-config-airbnb": "^19.0.4", "eslint-plugin-de-morgan": "^1.3.0", "eslint-plugin-github": "^6.0.0", diff --git a/package.json b/package.json index cc375df42..e44271785 100644 --- a/package.json +++ b/package.json @@ -53,11 +53,11 @@ "mongodb-memory-server": "10.1.4", "nyc": "^17.1.0", "ora": "^8.2.0", - "oxlint": "^1.7.0", + "oxlint": "^1.8.0", "package-json": "^10.0.1", "semver": "^7.7.2", "simple-git": "^3.28.0", - "supertest": "^7.1.3", + "supertest": "^7.1.4", "supports-hyperlinks": "^4.1.0", "typescript": "5.8.3", "wtfnode": "^0.10.0" diff --git a/packages/elastic/index.ts b/packages/elastic/index.ts index 9f722efec..cc8e2730c 100644 --- a/packages/elastic/index.ts +++ b/packages/elastic/index.ts @@ -51,7 +51,7 @@ export default class ElasticSearchService extends Service { }, }); let hits = res.hits.hits.map((i) => i._id); - if (!opts.skip) { + if (!opts?.skip) { let pdoc = await ProblemModel.get(domainId, +q || q, ProblemModel.PROJECTION_LIST); if (pdoc) { hits = hits.filter((i) => i !== `${pdoc.domainId}/${pdoc.docId}`); diff --git a/packages/hydrojudge/package.json b/packages/hydrojudge/package.json index c704a54b6..60c4fde1f 100644 --- a/packages/hydrojudge/package.json +++ b/packages/hydrojudge/package.json @@ -8,13 +8,13 @@ "dependencies": { "@hydrooj/common": "workspace:^", "@hydrooj/utils": "workspace:^", - "@zip.js/zip.js": "^2.7.64", + "@zip.js/zip.js": "^2.7.68", "cac": "^6.7.14", "p-queue": "^8.1.0", "schemastery": "^3.16.1", "semver": "^7.7.2", "shell-quote": "^1.8.3", - "superagent": "^10.2.2", + "superagent": "^10.2.3", "ws": "^8.18.3" }, "preferUnplugged": true, diff --git a/packages/hydrojudge/src/task.ts b/packages/hydrojudge/src/task.ts index 8b2b995e7..4828d4ace 100644 --- a/packages/hydrojudge/src/task.ts +++ b/packages/hydrojudge/src/task.ts @@ -127,7 +127,10 @@ export class JudgeTask { if (filenames.length) { logger.info(`Getting problem data: ${this.session?.config.host || 'local'}/${source}`); this.next({ message: 'Syncing testdata, please wait...' }); - await this.session.fetchFile(source, Object.fromEntries(files.map((i) => [i.name, join(filePath, i.name)]))); + await this.session.fetchFile(source, Object.fromEntries( + files.filter((i) => filenames.includes(i.name)) + .map((i) => [i.name, join(filePath, i.name)]), + )); await fs.writeFile(join(filePath, 'etags'), JSON.stringify(version)); this.compileCache = {}; } diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json index c9f373652..ac34d6dfd 100644 --- a/packages/hydrooj/package.json +++ b/packages/hydrooj/package.json @@ -23,7 +23,7 @@ "@hydrooj/utils": "workspace:^", "@simplewebauthn/server": "13.1.2", "@undefined-moe/require-resolve-hook": "^1.1.0", - "@zip.js/zip.js": "^2.7.64", + "@zip.js/zip.js": "^2.7.68", "adm-zip": "0.5.16", "cac": "^6.7.14", "cordis": "4.0.0-beta.5", @@ -38,7 +38,7 @@ "lru-cache": "^11.1.0", "mime-types": "^3.0.1", "moment-timezone": "^0.6.0", - "mongodb": "^6.17.0", + "mongodb": "^6.18.0", "mongodb-uri": "^0.9.7", "nanoid": "^5.1.5", "nodemailer": "^7.0.5", @@ -49,7 +49,7 @@ "schemastery": "^3.16.1", "semver": "^7.7.2", "shorty.js": "^1.0.1", - "superagent": "^10.2.2", + "superagent": "^10.2.3", "tar": "6.2.1", "thirty-two": "^1.0.2", "ua-parser-js": "^2.0.4" diff --git a/packages/hydrooj/src/service/server.ts b/packages/hydrooj/src/service/server.ts index 354076ade..58895fd9a 100644 --- a/packages/hydrooj/src/service/server.ts +++ b/packages/hydrooj/src/service/server.ts @@ -195,7 +195,7 @@ export async function apply(ctx: Context) { if (overrideLimit) maxOperations = overrideLimit; // deprecated: remove boolean support in future if (typeof defaultKey === 'boolean') defaultKey = defaultKey ? '{{user}}' : '{{ip}}'; - const id = defaultKey.replace('{{ip}}', this.request.ip).replace('{{user}}', this.user._id); + const id = defaultKey.replace('{{ip}}', this.request.ip).replace('{{user}}', this.user?._id?.toString() || '0'); await opcount.inc(op, id, periodSecs, maxOperations); }, renderTitle(str: string) { diff --git a/packages/migrate/package.json b/packages/migrate/package.json index 89e9ccc7e..4a7b99284 100644 --- a/packages/migrate/package.json +++ b/packages/migrate/package.json @@ -6,8 +6,8 @@ "author": "undefined ", "license": "AGPL-3.0-or-later", "dependencies": { - "mariadb": "^3.4.4", - "mongodb": "^6.17.0", + "mariadb": "^3.4.5", + "mongodb": "^6.18.0", "turndown": "^7.2.0", "xml2js": "^0.6.2" }, diff --git a/packages/ui-default/components/discussion/reaction.page.tsx b/packages/ui-default/components/discussion/reaction.page.tsx index 5df7aa86b..c3a18c6c5 100644 --- a/packages/ui-default/components/discussion/reaction.page.tsx +++ b/packages/ui-default/components/discussion/reaction.page.tsx @@ -9,7 +9,7 @@ import ReactDOM from 'react-dom/client'; import { AutoloadPage } from 'vj/misc/Page'; import { request } from 'vj/utils'; -function renderReactions(reactions, self, rootEle) { +function renderReactions(reactions = {}, self = {}, rootEle) { let html = ''; for (const [k, v] of Object.entries(reactions).sort(([, v1], [, v2]) => +v2 - +v1)) { if (!v) continue; diff --git a/packages/ui-default/components/omnisearch/index.page.tsx b/packages/ui-default/components/omnisearch/index.page.tsx index 2a9c3db09..191c7fccc 100644 --- a/packages/ui-default/components/omnisearch/index.page.tsx +++ b/packages/ui-default/components/omnisearch/index.page.tsx @@ -50,12 +50,17 @@ export default new AutoloadPage('omnibar', () => { href={`${base}/p/${pid || docId}`} >
- { + if (psdict[`${domainId}#${docId}`]?.rid) { + window.location.href = `${base}/record/${psdict[`${domainId}#${docId}`]?.rid}`; + } + ev.preventDefault(); + }} className={`record-status--text ${STATUS_CODES[psdict[`${domainId}#${docId}`]?.status]}`} > - +

{title}
diff --git a/packages/ui-default/package.json b/packages/ui-default/package.json index eef24687a..5f70ebbc4 100644 --- a/packages/ui-default/package.json +++ b/packages/ui-default/package.json @@ -72,7 +72,7 @@ "monaco-editor": "0.52.2", "monaco-editor-nls": "^3.1.0", "monaco-editor-webpack-plugin": "^7.1.0", - "monaco-themes": "^0.4.5", + "monaco-themes": "^0.4.6", "monaco-yaml": "5.1.1", "nanoid": "^5.1.5", "normalize.css": "^8.0.1", diff --git a/packages/ui-default/pages/contest_edit.page.ts b/packages/ui-default/pages/contest_edit.page.ts index a0cbad85d..a4709a357 100644 --- a/packages/ui-default/pages/contest_edit.page.ts +++ b/packages/ui-default/pages/contest_edit.page.ts @@ -42,7 +42,7 @@ const page = new NamedPage(['contest_edit', 'contest_create', 'homework_create', }); } const message = `Confirm deleting this ${pagename.split('_')[0]}? Its files and status will be deleted as well.`; - confirm(i18n(message)).then((yes) => { + return confirm(i18n(message)).then((yes) => { if (yes) { confirmed = true; ev.target.click(); diff --git a/packages/ui-next/package.json b/packages/ui-next/package.json index 761e84488..4439006a1 100644 --- a/packages/ui-next/package.json +++ b/packages/ui-next/package.json @@ -16,6 +16,6 @@ "@types/react": "^18.3.23", "@types/react-dom": "^18.3.7", "@vitejs/plugin-react-swc": "^3.11.0", - "vite": "^7.0.5" + "vite": "^7.0.6" } }