upgrade deps

This commit is contained in:
undefined committed 2025-07-21 18:03:17 +08:00
1 parent 1232e8f3a1
commit ff41b1b887
17 files changed
+60 -56

No files matched your search

+6
View File
@@ -111,6 +111,12 @@ Hydro 用户群:1085853538
<details>
<summary><h2>更新日志(点击展开)</h2></summary>
## Hydro 5.0.0-beta.6 / UI 4.58.0-beta.6
- core: 修复网页端执行脚本返回值
- core: patch: 支持从本地文件读取
- core: 支持复制/导入题目时设置隐藏
## Hydro 5.0.0-beta.3 / UI 4.58.0-beta.3
### New Features
+5 -5
View File
@@ -5,12 +5,12 @@
"main": "base.mjs",
"repository": "https://github.com/hydro-dev/Hydro",
"dependencies": {
"@eslint-react/eslint-plugin": "^1.52.2",
"@eslint-react/eslint-plugin": "^1.52.3",
"@eslint/compat": "^1.3.1",
"@eslint/eslintrc": "^3.3.1",
"@stylistic/eslint-plugin": "^5.1.0",
"@typescript-eslint/eslint-plugin": "^8.35.0",
"@typescript-eslint/parser": "^8.35.0",
"@stylistic/eslint-plugin": "^5.2.1",
"@typescript-eslint/eslint-plugin": "^8.37.0",
"@typescript-eslint/parser": "^8.37.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-de-morgan": "^1.3.0",
"eslint-plugin-github": "^6.0.0",
@@ -19,7 +19,7 @@
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.20",
"eslint-plugin-simple-import-sort": "^12.1.1",
"globals": "^16.2.0"
"globals": "^16.3.0"
},
"peerDependencies": {
"eslint": ">= 9"
+1 -1
View File
@@ -14,7 +14,7 @@
"koa": "^3.0.0",
"koa-body": "^6.0.1",
"koa-compress": "^5.1.1",
"koa-router": "^13.0.1",
"koa-router": "^13.1.1",
"path-to-regexp": "^8.2.0",
"sanitize-filename": "^1.6.3",
"saslprep": "^1.0.3",
+8 -8
View File
@@ -21,8 +21,8 @@
"test": "node -r @hydrooj/register packages/common/tests/subtask.spec.ts && node test/entry.js",
"benchmark": "cross-env BENCHMARK=true node test/entry.js",
"oxlint": "cd framework/eslint-config && node -r @hydrooj/register build.ts && cd ../../ && oxlint --config framework/eslint-config/.oxlintrc.json",
"lint": "eslint --flag unstable_config_lookup_from_file packages plugins modules framework --ext .ts,.tsx,.jsx --fix",
"lint:ci": "eslint --flag unstable_config_lookup_from_file packages plugins modules framework --ext .ts,.tsx,.jsx --max-warnings=0",
"lint": "eslint --flag v10_config_lookup_from_file packages plugins modules framework --ext .ts,.tsx,.jsx --fix",
"lint:ci": "eslint --flag v10_config_lookup_from_file packages plugins modules framework --ext .ts,.tsx,.jsx --max-warnings=0",
"debug": "node --trace-warnings --inspect=192.168.99.234:1111 --async-stack-traces --trace-deprecation packages/hydrooj/bin/hydrooj --debug --template",
"start": "packages/hydrooj/bin/hydrooj.js",
"postinstall": "node build/prepare.js",
@@ -35,29 +35,29 @@
"@types/autocannon": "^7.12.7",
"@types/chai": "^5.2.2",
"@types/cross-spawn": "^6.0.6",
"@types/node": "22.14.1",
"@types/node": "24.0.15",
"@types/semver": "^7.7.0",
"autocannon": "^8.0.0",
"cac": "^6.7.14",
"chai": "^5.2.0",
"chai": "^5.2.1",
"cross-env": "^7.0.3",
"cross-spawn": "^7.0.6",
"esbuild": "0.25.2",
"eslint": "^9.30.0",
"eslint": "^9.31.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-import-resolver-webpack": "^0.13.10",
"fs-extra": "^11.3.0",
"globals": "^16.2.0",
"globals": "^16.3.0",
"globby": "~14.0.2",
"inspectpack": "^4.7.1",
"mongodb-memory-server": "10.1.4",
"nyc": "^17.1.0",
"ora": "^8.2.0",
"oxlint": "^1.4.0",
"oxlint": "^1.7.0",
"package-json": "^10.0.1",
"semver": "^7.7.2",
"simple-git": "^3.28.0",
"supertest": "^7.1.1",
"supertest": "^7.1.3",
"supports-hyperlinks": "^4.1.0",
"typescript": "5.8.3",
"wtfnode": "^0.10.0"
+1 -1
View File
@@ -20,7 +20,7 @@
"devDependencies": {
"@types/diff": "^8.0.0",
"@types/js-yaml": "^4.0.9",
"@types/lodash": "^4.17.19",
"@types/lodash": "^4.17.20",
"sass": "^1.89.2"
},
"peerDependencies": {
+1 -1
View File
@@ -6,7 +6,7 @@
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0-or-later",
"dependencies": {
"@elastic/elasticsearch": "^9.0.2"
"@elastic/elasticsearch": "^9.0.3"
},
"engines": {
"hydrooj": ">=5.0.0-alpha.1"
+1 -1
View File
@@ -6,7 +6,7 @@
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0-or-later",
"dependencies": {
"maxmind": "^4.3.27"
"maxmind": "^4.3.28"
},
"preferUnplugged": true
}
+2 -2
View File
@@ -8,13 +8,13 @@
"dependencies": {
"@hydrooj/common": "workspace:^",
"@hydrooj/utils": "workspace:^",
"@zip.js/zip.js": "^2.7.62",
"@zip.js/zip.js": "^2.7.64",
"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.1",
"superagent": "^10.2.2",
"ws": "^8.18.3"
},
"preferUnplugged": true,
+6 -6
View File
@@ -21,13 +21,13 @@
"@hydrooj/common": "workspace:^",
"@hydrooj/framework": "workspace:^",
"@hydrooj/utils": "workspace:^",
"@simplewebauthn/server": "13.1.1",
"@simplewebauthn/server": "13.1.2",
"@undefined-moe/require-resolve-hook": "^1.1.0",
"@zip.js/zip.js": "^2.7.62",
"@zip.js/zip.js": "^2.7.64",
"adm-zip": "0.5.16",
"cac": "^6.7.14",
"cordis": "4.0.0-beta.5",
"csv-stringify": "^6.5.2",
"csv-stringify": "^6.6.0",
"emoji-regex": "^10.4.0",
"emojis-list": "2.1.0",
"fs-extra": "^11.3.0",
@@ -41,7 +41,7 @@
"mongodb": "^6.17.0",
"mongodb-uri": "^0.9.7",
"nanoid": "^5.1.5",
"nodemailer": "^7.0.4",
"nodemailer": "^7.0.5",
"notp": "^2.0.3",
"p-queue": "^8.1.0",
"sanitize-filename": "^1.6.3",
@@ -49,7 +49,7 @@
"schemastery": "^3.16.1",
"semver": "^7.7.2",
"shorty.js": "^1.0.1",
"superagent": "^10.2.1",
"superagent": "^10.2.2",
"tar": "6.2.1",
"thirty-two": "^1.0.2",
"ua-parser-js": "^2.0.4"
@@ -60,7 +60,7 @@
"@types/fs-extra": "^11.0.4",
"@types/js-yaml": "^4.0.9",
"@types/koa-static-cache": "^5.1.4",
"@types/lodash": "^4.17.19",
"@types/lodash": "^4.17.20",
"@types/mime-types": "^3.0.1",
"@types/mongodb-uri": "^0.9.4",
"@types/nodemailer": "^6.4.17",
+8 -7
View File
@@ -194,27 +194,28 @@ export class ProblemMainHandler extends Handler {
async postCopy(domainId: string, pids: number[], target: string, hidden?: boolean) {
let t = `,${this.domain.share || ''},`;
if (t !== ',*,' && !t.includes(`,${target},`)) throw new ProblemNotAllowCopyError(this.domain._id, target);
let ddoc = await domain.get(target);
const ddoc = await domain.get(target);
if (!ddoc) throw new NotFoundError(target);
const dudoc = await user.getById(target, this.user._id);
if (!dudoc.hasPerm(PERM.PERM_CREATE_PROBLEM)) throw new PermissionError(PERM.PERM_CREATE_PROBLEM);
// Check if user can access all those problems
const pdict = await problem.getList(
domainId, pids, this.user.hasPerm(PERM.PERM_VIEW_PROBLEM_HIDDEN) || this.user._id,
true, ['docId'], true,
true, ['domainId', 'docId', 'reference'], true,
);
const ids = [];
for (const pid of pids) {
let pdoc = pdict[pid];
if (pdoc.reference) {
// eslint-disable-next-line no-await-in-loop
[pdoc, ddoc] = await Promise.all([
const [sourcePdoc, sourceDdoc] = await Promise.all([
problem.get(pdoc.reference.domainId, pdoc.reference.pid),
domain.get(pdoc.reference.domainId),
]);
if (!pdoc) throw new ProblemNotFoundError(pdoc.reference.domainId, pdoc.reference.pid);
t = `,${ddoc.share || ''},`;
if (t !== ',*,' && !t.includes(`,${target},`)) throw new ProblemNotAllowCopyError(ddoc._id, target);
if (!sourcePdoc) throw new ProblemNotFoundError(pdoc.reference.domainId, pdoc.reference.pid);
else pdoc = sourcePdoc;
t = `,${sourceDdoc.share || ''},`;
if (t !== ',*,' && !t.includes(`,${target},`)) throw new ProblemNotAllowCopyError(sourceDdoc._id, target);
}
// eslint-disable-next-line no-await-in-loop
ids.push(await problem.copy(pdoc.domainId, pdoc.docId, target, undefined, hidden));
@@ -317,7 +318,7 @@ export class ProblemDetailHandler extends ContestDetailBaseHandler {
if (this.pdoc.config.langs) t.push(this.pdoc.config.langs);
if (ddoc.langs) t.push(ddoc.langs.split(',').map((i) => i.trim()).filter((i) => i));
if (this.domain.langs) t.push(this.domain.langs.split(',').map((i) => i.trim()).filter((i) => i));
if (this.tdoc?.langs) t.push(this.tdoc.langs);
if (this.tdoc?.langs?.length) t.push(this.tdoc.langs);
if (this.pdoc.config.type === 'remote_judge') {
const p = this.pdoc.config.subType;
const dl = Object.keys(setting.langs).filter((i) => i.startsWith(`${p}.`) || setting.langs[i].validAs[p]);
+1 -1
View File
@@ -6,7 +6,7 @@
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0-or-later",
"dependencies": {
"mariadb": "^3.4.2",
"mariadb": "^3.4.4",
"mongodb": "^6.17.0",
"turndown": "^7.2.0",
"xml2js": "^0.6.2"
+3 -4
View File
@@ -4,7 +4,7 @@ import mongodb, { Db, FindCursor } from 'mongodb';
import {
db as dst,
DiscussionModel, DiscussionTailReplyDoc, DocumentModel,
MessageDoc, RecordDoc, TestCase, TrainingNode,
RecordDoc, TestCase, TrainingNode,
} from 'hydrooj';
const map = {};
@@ -359,15 +359,14 @@ async function message(src: Db, report: Function) {
.toArray();
for (const doc of docs) {
for (const msg of doc.reply) {
const mdoc: MessageDoc = {
await dst.collection('message').insertOne({
_id: objid(msg.at),
from: msg.sender_uid,
to: msg.sender_uid === doc.sender_uid ? doc.sendee_uid : doc.sender_uid,
content: msg.content,
// Mark all as read
flag: 0,
};
await dst.collection('message').insertOne(mdoc);
});
}
}
await report({ progress: Math.round(100 * ((i + 1) / (total + 1))) });
@@ -126,8 +126,6 @@ export async function prompt<T extends string>(title: string, fields: Record<T,
const defaultValues = Object.fromEntries(Object.entries(fields)
.map(([name, field]: [T, Field]) => [name, field.default || ''])) as Record<T, string | number | boolean>;
console.log(valueCache, defaultValues);
const Component = () => {
const [values, setValues] = React.useState(defaultValues);
@@ -18,7 +18,7 @@ async function handlerSwitchAccount(ev) {
const target = await selectUser('Hint::icon::switch_account');
if (!target) return;
try {
const res = await request.get(`/account/${target._id}`);
const res = await request.get(`/account/${target}`);
if (res.url) window.location.href = res.url;
else window.location.reload();
} catch (error) {
+11 -11
View File
@@ -11,7 +11,7 @@
"cli": false
},
"devDependencies": {
"@blueprintjs/core": "^6.0.0",
"@blueprintjs/core": "^6.1.0",
"@fontsource/dm-mono": "^5.2.6",
"@fontsource/fira-code": "^5.2.6",
"@fontsource/inconsolata": "^5.2.6",
@@ -21,9 +21,9 @@
"@fontsource/source-code-pro": "^5.2.6",
"@fontsource/ubuntu-mono": "^5.2.6",
"@hydrooj/utils": "workspace:^",
"@sentry/browser": "^9.33.0",
"@sentry/webpack-plugin": "^3.5.0",
"@simplewebauthn/browser": "13.1.0",
"@sentry/browser": "^9.40.0",
"@sentry/webpack-plugin": "^4.0.0",
"@simplewebauthn/browser": "13.1.2",
"@svgr/webpack": "^8.1.0",
"@types/html-to-text": "^9.0.4",
"@types/jquery": "^3.5.32",
@@ -39,19 +39,19 @@
"@types/redux-logger": "^3.0.13",
"@types/uuid": "^10.0.0",
"@types/webpack-env": "^1.18.8",
"@vscode/codicons": "^0.0.36",
"@vscode/codicons": "^0.0.38",
"ajv": "^8.17.1",
"allotment": "^1.20.4",
"autoprefixer": "^10.4.21",
"browser-update": "^3.3.55",
"browser-update": "^3.3.60",
"chalk": "^5.4.1",
"classnames": "^2.5.1",
"clean-webpack-plugin": "^4.0.0",
"clipboard": "^2.0.11",
"copy-webpack-plugin": "^13.0.0",
"cordis": "4.0.0-beta.5",
"core-js": "^3.43.0",
"core-js-compat": "^3.43.0",
"core-js": "^3.44.0",
"core-js-compat": "^3.44.0",
"css-loader": "^7.1.2",
"diff": "^8.0.2",
"diff-dom": "^5.2.0",
@@ -66,7 +66,7 @@
"jquery.easing": "^1.4.1",
"jquery.transit": "^0.9.12",
"matchmedia-polyfill": "^0.3.2",
"md-editor-rt": "^5.7.1",
"md-editor-rt": "^5.8.2",
"mini-css-extract-plugin": "^2.9.2",
"moment": "^2.30.1",
"monaco-editor": "0.52.2",
@@ -114,7 +114,7 @@
"timeago.js": "^4.0.2",
"ts-loader": "^9.5.2",
"web-streams-polyfill": "^4.1.0",
"webpack": "^5.99.9",
"webpack": "^5.100.2",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-dev-server": "^5.2.2",
"webpack-manifest-plugin": "^5.0.1",
@@ -140,7 +140,7 @@
"markdown-it-merge-cells": "^2.0.0",
"markdown-it-table-of-contents": "^0.9.0",
"nunjucks": "^3.2.4",
"schemastery-jsonschema": "^1.1.0",
"schemastery-jsonschema": "^1.1.1",
"streamsaver": "^2.0.6",
"uuid": "^11.1.0",
"xss": "^1.0.15"
@@ -28,9 +28,9 @@ const page = new NamedPage([
autofocus: true,
},
});
if (!res) return;
if (!res?.target) return;
try {
const { url } = await request.post('..', {
const { url } = await request.post('.', {
operation: 'copy',
pids: [UiContext.pdoc.docId],
target: res.target,
+3 -3
View File
@@ -8,14 +8,14 @@
"preview": "vite preview"
},
"dependencies": {
"@vitejs/plugin-react": "^4.6.0",
"@vitejs/plugin-react": "^4.7.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/react": "^18.3.23",
"@types/react-dom": "^18.3.7",
"@vitejs/plugin-react-swc": "^3.10.2",
"vite": "^7.0.0"
"@vitejs/plugin-react-swc": "^3.11.0",
"vite": "^7.0.5"
}
}