Files
OJ2/apps/web/package.json
T
xuyueandClaude Opus 5.5 2a4405d2ea
Deploy / deploy (push) Canceled after 0s
feat(题目): Python 语法错误改成中文说明,在编辑器里标出位置,中文标点可以一键换成英文
中职学生看不懂英文报错。原来提交前用浏览器里的 Skulpt 拦语法错误,只弹一句
「第 N 行存在语法错误」——Skulpt 九成报的是 bad input / bad token,没有列号。

- 提交前的语法检查挪到服务端:/code/format 先用 CPython 编译一遍(只编译不执行),
  api 镜像加 python3-minimal(3.13,与判题机同版本,+17MB),前端删掉 Skulpt
- 报错按规则表翻成中文(pythonError.ts),生产库 2695 条 Python 编译错误覆盖 99.7%;
  提交前拦下的和判题回来的编译错误共用同一张卡片
- 编辑器里标红出错行和 ^ 指的位置
- 中文标点(历史编译错误的 22%)一键换成英文,跳过字符串和注释、处理 f 字符串花括号;
  594 条里修好 593 条,经 tokenize 核对没有改到字符串内容;走编辑器事务,可 Ctrl+Z

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 21:47:01 +08:00

71 lines
2.0 KiB
JSON

{
"name": "@oj2/web",
"version": "1.9.0",
"type": "module",
"scripts": {
"dev": "vite",
"start": "vite",
"build": "vite build",
"build:staging": "vite build --mode staging",
"build:test": "vite build --mode test",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json"
},
"dependencies": {
"@codemirror/autocomplete": "^6.20.3",
"@codemirror/lang-cpp": "^6.0.3",
"@codemirror/lang-python": "^6.2.1",
"@codemirror/lang-sql": "^6.10.0",
"@codemirror/language": "^6.12.4",
"@codemirror/state": "^6.7.1",
"@codemirror/view": "^6.43.9",
"@lezer/highlight": "^1.2.3",
"@oj2/contract": "workspace:*",
"@vue-flow/background": "^1.3.2",
"@vue-flow/controls": "^1.1.3",
"@vue-flow/core": "^1.48.2",
"@vue-flow/minimap": "^1.5.4",
"@vue-flow/node-resizer": "^1.5.1",
"@vue-flow/node-toolbar": "^1.1.1",
"@vueuse/core": "^14.4.0",
"@vueuse/router": "^14.4.0",
"@wangeditor-next/editor": "^6.2.0",
"@wangeditor-next/editor-for-vue": "^6.2.0",
"axios": "^1.19.0",
"canvas-confetti": "^1.9.4",
"chart.js": "^4.5.1",
"chartjs-chart-wordcloud": "^4.4.5",
"codemirror": "^6.0.2",
"copy-text-to-clipboard": "^3.2.2",
"date-fns": "^4.4.0",
"fflate": "^0.8.3",
"highlight.js": "^11.12.0",
"lib0": "0.2.117",
"md-editor-v3": "^6.5.6",
"mermaid": "^11.17.2",
"naive-ui": "^2.45.2",
"nanoid": "^6.0.1",
"normalize.css": "^8.0.1",
"pinia": "^4.0.3",
"pinyin-pro": "^3.29.3",
"vue": "^3.5.41",
"vue-chartjs": "^5.3.4",
"vue-codemirror": "^6.1.1",
"vue-router": "^5.2.0",
"y-codemirror.next": "^0.3.6",
"y-protocols": "1.0.7",
"yjs": "^13.6.32"
},
"devDependencies": {
"@iconify/vue": "^5.0.1",
"@types/canvas-confetti": "^1.9.0",
"@types/node": "^26.3.0",
"@vitejs/plugin-legacy": "^8.2.3",
"@vitejs/plugin-vue": "^6.0.8",
"@vue/tsconfig": "^0.9.1",
"unplugin-auto-import": "^21.1.0",
"unplugin-vue-components": "^32.1.0",
"vite": "^8.2.2",
"vue-tsc": "^3.3.11"
}
}