chore(web): migrate the UI to SvelteKit 3 and drop the two audit exceptions

オープン
#184 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript, typescript
領域
frontend, security

調査の方向性

Start with the errors listed in the issue: run pnpm run build and svelte-check in web/, then open web/src/lib/browse-nav.ts (the goto() call near line 140) and the page.url reads in web/src/routes/+layout.svelte and web/src/routes/browse/+page.svelte. The bits-ui peer on kit 3 is an upstream blocker, so check that before editing. Done means task web:test, task web:build and task web:drift pass on kit 3, and audit.ignore and the cookie override are gone from web/pnpm-workspace.yaml.

索引モデルが issue の本文から書いたものです。

説明

area:ui chore priority:low

Problem

Two low-severity @sveltejs/kit advisories are fixed only in kit 3:

  • GHSA-pfhg-q3qv-9q6r: URL redirection to an untrusted site through an enhanced form submission.
  • GHSA-27mw-82g8-phjj: XSS through an untrusted cache-control header in a prerendered page.

Neither is reachable in this UI. web/src/routes/+layout.ts sets ssr = false and prerender = false, the UI has no use:enhance, no form actions, no setHeaders and no server files. #183 therefore lists both under audit.ignore in web/pnpm-workspace.yaml, so task web:audit passes. That exception should go when the UI moves to kit 3.

What the migration needs

A trial upgrade (kit 3.1.0, adapter-static 4.0.0, svelte 5.57.2) found:

  • pnpm run build fails with six module_removed_lib errors: kit 3 removed modules the UI imports.
  • svelte-check reports eight errors:
    • page.url and its searchParams are now read-only (ReadonlyURLSearchParams) at src/routes/+layout.svelte:21,69, src/routes/browse/+page.svelte:38,215,219,228 and src/routes/workbench/+page.svelte:50;
    • goto() no longer accepts noScroll (src/lib/browse-nav.ts:140).
  • vitest exits 1 although all 48 tests pass, so something in the test setup breaks under kit 3.
  • [email protected], pulled in by [email protected], declares an optional peer on kit ^2.21.0. runed 0.38 supports kit 3, but bits-ui has not moved to it yet.

Done when

  • The UI builds and passes task web:test, svelte-check, task web:build, task web:drift and the UI gates on kit 3.
  • audit.ignore in web/pnpm-workspace.yaml is empty or gone.
  • The cookie@<0.7.0 override in web/pnpm-workspace.yaml is dropped: kit 3 depends on cookie ^2.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KU8UVZn3cua2NAQprLqhhG

主要言語
Go
スター
0
フォーク
0
平均マージ
7時間 42分
マージ済み PR(30日)
111

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

seanb4t/codegraph-go のほかの issue

seanb4t/codegraph-go の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。