chore(deps): refresh runtimes and adopt ESLint 10

This commit is contained in:
backryun
2026-08-23 23:27:50 +09:00
committed by Markus Hartung
parent 158fb1a806
commit 8a14cefcb1
4 changed files with 71 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
# ── Multi-stage Dockerfile for Native Bun Runtime (web-latest-bun) ───────────
FROM oven/bun:1.3.14-slim AS base
FROM oven/bun:1.4.0-slim AS base
WORKDIR /app
RUN apt-get update \
@@ -50,7 +50,7 @@ ENV NODE_ENV=production
RUN bun run --quiet build
# ── Runner Base stage (100% Bun Native Production Runtime) ──────────────────
FROM oven/bun:1.3.14-slim AS runner-base
FROM oven/bun:1.4.0-slim AS runner-base
LABEL org.opencontainers.image.title="omniroute" \
org.opencontainers.image.description="Unified AI proxy — route any LLM through one endpoint (Bun Native)" \

View File

@@ -12,6 +12,7 @@
"@dnd-kit/core",
"@dnd-kit/sortable",
"@dnd-kit/utilities",
"@eslint/compat",
"@huggingface/transformers",
"@lobehub/icons",
"@modelcontextprotocol/sdk",
@@ -60,6 +61,7 @@
"eslint",
"eslint-config-next",
"eslint-plugin-sonarjs",
"espree",
"express",
"fast-check",
"fetch-socks",

View File

@@ -1,4 +1,6 @@
import { fixupConfigRules } from "@eslint/compat";
import nextVitals from "eslint-config-next/core-web-vitals";
import * as espree from "espree";
import tseslint from "typescript-eslint";
// #7879: bar NEW local `toNumber` definitions outside the canonical helper.
@@ -37,7 +39,22 @@ const IMPORT_BOUNDARY_RESTRICTIONS = {
/** @type {import("eslint").Linter.Config[]} */
const eslintConfig = [
...nextVitals,
...fixupConfigRules(nextVitals),
// eslint-config-next's Babel parser has not adopted ESLint 10's ScopeManager
// finalize contract yet. Plain JS/JSX does not need that parser, so use the
// ESLint-native parser while retaining Next's plugins and rules.
{
files: ["**/*.{js,jsx,mjs,cjs}"],
languageOptions: {
parser: espree,
},
},
{
files: ["**/*.{mts,cts}"],
languageOptions: {
parser: tseslint.parser,
},
},
// Pacote 4 (plano mestre testes+CI, 2026-07-04) — zero-warning policy: TODA regra roda
// como "error" e a dívida pré-existente vive congelada por arquivo+regra em
// config/quality/eslint-suppressions.json (ESLint bulk suppressions nativo). Violação
@@ -133,28 +150,45 @@ const eslintConfig = [
"no-restricted-syntax": "off",
},
},
// Relaxed rules for open-sse and tests (incremental adoption)
// Relaxed rules for TypeScript in open-sse and tests (incremental adoption).
// eslint-config-next already registers @typescript-eslint for every TS file;
// registering a second plugin object is rejected by ESLint 10.
{
files: ["open-sse/**/*.ts", "tests/**/*.mjs", "tests/**/*.ts"],
plugins: {
"@typescript-eslint": tseslint.plugin,
},
files: ["open-sse/**/*.ts", "tests/**/*.ts"],
rules: {
"@typescript-eslint/no-explicit-any": "error",
"@next/next/no-assign-module-variable": "off",
"react-hooks/rules-of-hooks": "off",
},
},
{
files: ["tests/**/*.mjs"],
plugins: {
"@typescript-eslint": tseslint.plugin,
},
rules: {
"@next/next/no-assign-module-variable": "off",
"react-hooks/rules-of-hooks": "off",
},
},
// JS/JSX files do not match eslint-config-next's TypeScript block. Register
// the plugin only for that disjoint scope so the shared unused-vars ratchet
// works without redefining the plugin for TS/TSX under ESLint 10.
{
files: ["src/**/*.{js,jsx}"],
plugins: {
"@typescript-eslint": tseslint.plugin,
},
},
// Ratchet: bar NEW unused vars/args/catches outside the `_` escape hatch.
// Pre-existing violations are frozen via config/quality/eslint-suppressions.json
// (same pattern as #7879 toNumber); only genuinely NEW unused bindings fail
// lint. `args: "all"` (not `after-used`) so a leading unused param is never
// silently skipped, e.g. `function handle(req, _opts, next)` must flag `req`.
// eslint-config-next already registers @typescript-eslint; registering it again
// in this block is rejected by ESLint 10.
{
files: ["src/**/*.{ts,tsx,js,jsx}", "open-sse/**/*.ts", "tests/**/*.{ts,tsx,mjs}"],
plugins: {
"@typescript-eslint": tseslint.plugin,
},
rules: {
"@typescript-eslint/no-unused-vars": [
"error",

View File

@@ -261,7 +261,7 @@
"alibaba:sync-allowlist": "node --import tsx/esm scripts/ops/sync-alibaba-allowlist.mjs"
},
"dependencies": {
"@aws-sdk/client-bedrock-runtime": "^3.1112.0",
"@aws-sdk/client-bedrock-runtime": "^3.1116.0",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
@@ -280,29 +280,29 @@
"commander": "^15.0.0",
"cron-parser": "^5.10.0",
"csv-stringify": "^6.8.3",
"dompurify": "^3.4.13",
"dompurify": "^3.4.14",
"express": "^5.2.1",
"fetch-socks": "^1.3.3",
"fflate": "^0.8.3",
"fumadocs-core": "^16.14.4",
"fumadocs-ui": "^16.14.4",
"fumadocs-core": "^16.15.1",
"fumadocs-ui": "^16.15.1",
"http-proxy-middleware": "^4.0.0",
"https-proxy-agent": "^9.0.0",
"ink": "^7.0.3",
"ink-spinner": "^5.0.0",
"ink-text-input": "^6.0.0",
"ioredis": "^5.10.1",
"jose": "^6.2.9",
"jose": "^6.2.10",
"js-yaml": "^5.3.0",
"jsonc-parser": "^3.3.1",
"lowdb": "^7.0.1",
"lucide-react": "^1.21.0",
"marked": "^18.0.9",
"lucide-react": "^1.33.0",
"marked": "^18.0.10",
"marked-terminal": "^7.3.0",
"material-symbols": "^0.46.0",
"mermaid": "^11.15.0",
"mermaid": "^11.17.0",
"monaco-editor": "^0.56.0",
"next": "16.3.1",
"next": "16.3.2",
"next-intl": "^4.13.7",
"next-themes": "^0.4.6",
"node-machine-id": "^1.1.12",
@@ -332,7 +332,7 @@
"turndown-plugin-gfm": "1.0.2",
"undici": "^8.10.0",
"update-notifier": "^7.3.1",
"uuid": "^14.0.0",
"uuid": "^14.0.2",
"ws": "^8.21.3",
"xxhash-wasm": "^1.1.0",
"yazl": "^3.3.1",
@@ -348,11 +348,12 @@
"onnxruntime-node": "1.24.3",
"sqlite-vec": "^0.1.9",
"tls-client-node": "^0.2.0",
"wreq-js": "^3.0.0"
"wreq-js": "^3.1.0"
},
"devDependencies": {
"@axe-core/playwright": "^4.13.0",
"@cyclonedx/cyclonedx-npm": "6.0.1",
"@eslint/compat": "^2.1.0",
"@playwright/test": "^1.62.1",
"@size-limit/file": "^13.0.3",
"@stryker-mutator/core": "^10.0.0",
@@ -363,24 +364,25 @@
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.6",
"@types/better-sqlite3": "^9.6.0",
"@types/bun": "latest",
"@types/bun": "1.4.0",
"@types/node": "^26.2.0",
"@types/react": "^19.2.18",
"@types/react-dom": "^19.2.4",
"@types/safe-regex": "^1.1.6",
"@types/ws": "^8.18.0",
"@vitejs/plugin-react": "^6.0.5",
"bun": "1.3.14",
"@vitejs/plugin-react": "^6.1.0",
"bun": "1.4.0",
"c8": "^12.0.0",
"concurrently": "^10.0.5",
"cross-env": "^10.1.0",
"ctrf": "^0.3.0",
"dpdm": "^4.3.0",
"eslint": "^9.39.4",
"eslint-config-next": "16.3.1",
"eslint": "^10.9.0",
"eslint-config-next": "16.3.2",
"eslint-plugin-sonarjs": "^4.1.0",
"espree": "^11.2.0",
"fast-check": "^4.8.0",
"fumadocs-mdx": "^15.2.3",
"fumadocs-mdx": "^15.3.1",
"glob": "^13.0.6",
"httpyac": "^6.16.7",
"husky": "^9.1.7",
@@ -392,7 +394,7 @@
"lint-staged": "^17.3.0",
"lockfile-lint": "^5.0.1",
"node-loader": "^2.1.0",
"opencode-ai": "1.18.18",
"opencode-ai": "1.18.21",
"playwright-ctrf-json-reporter": "^0.0.29",
"prettier": "^3.9.6",
"promptfoo": "^0.122.0",
@@ -401,7 +403,7 @@
"type-coverage": "^2.30.1",
"typescript": "^6.0.3",
"typescript-eslint": "^8.67.0",
"vitest": "^4.1.7",
"vitest": "^4.1.11",
"wait-on": "^9.1.0",
"wtfnode": "^0.10.1"
},
@@ -435,12 +437,13 @@
},
"overrides": {
"onnxruntime-node": "1.24.3",
"eslint-plugin-react-hooks": "7.0.1",
"fast-xml-parser": "^5.10.1",
"sharp": "^0.35.3",
"postcss": "^8.5.18",
"ip-address": "^10.3.1",
"qs": "^6.15.2",
"uuid": "^14.0.0",
"uuid": "^14.0.2",
"form-data": "^4.0.6",
"vite": "^8.0.16",
"protobufjs": "^7.6.5",
@@ -468,10 +471,6 @@
},
"socket.io-parser": "^4.2.7",
"tar": "^7.5.21",
"brace-expansion": "^5.0.9",
"minimatch": {
"brace-expansion": "^1.1.18"
},
"libxmljs2": {
"minimatch": {
"brace-expansion": "^2.1.4"
@@ -496,7 +495,7 @@
},
"nanoid": "^3.3.17",
"monaco-editor": {
"dompurify": "^3.4.13"
"dompurify": "^3.4.14"
}
}
}