ZeroOne 技術文章第 30 頁

HTML Popover API 怎麼用:用原生按鈕建立可關閉的浮層
HTML Popover API 可用原生按鈕建立浮層,但 auto、hint 與 manual 的關閉規則不同。本文補上提示不關閉選單的選用方式、hint 相容性退路、焦點與語意檢查,以及 dialog 必須用 showModal 才能阻擋背景操作的界線。
1317 字
|
7 分鐘
Cover Image of the Post
fetch 逾時怎麼處理:用 AbortSignal.timeout() 取消慢請求
fetch 收到回應標頭後,讀取 JSON 仍可能逾時。本文用 AbortSignal.timeout() 與 AbortSignal.any() 處理慢請求、保留第一個取消原因,並提供本機 HTTP 測試,檢查回應本文中止與重用 signal 的陷阱。
1715 字
|
9 分鐘
Cover Image of the Post
Cloudflare Workers integration test 怎麼寫?用 createTestHarness 測 production build
Cloudflare Workers 新增 createTestHarness,可在 Node.js test runner 中測試一個或多個 Worker 的 production build、route 與外部 fetch。本文整理 Vitest 最小範例與 unit test 的分工。
806 字
|
4 分鐘
Cover Image of the Post
Dependabot malware alert 怎麼處理?先確認能否修補,再收斂供應鏈風險
GitHub Dependabot 擴大惡意套件 advisory 的生態系覆蓋。本文整理 malware alert 啟用方式、為何不一定有自動更新 PR,以及發現命中後的 lockfile、token 與替代套件檢查流程。
654 字
|
3 分鐘
Cover Image of the Post
GitHub Actions workflow 被保留等待核准怎麼辦?先做來源與權限檢查
GitHub Actions 會自動保留部分疑似惡意的 public repository workflow,等待有 write 權限的協作者核准。本文整理核准前的來源、diff、secrets 與替代處理流程。
672 字
|
3 分鐘
Cover Image of the Post
GitHub Copilot Code Review 怎麼用 Skills 與 MCP?先限制脈絡與驗證方式
GitHub Copilot Code Review 已支援 agent skills 與 MCP。本文整理 repository 設定、唯讀工具邊界、PR head branch 的風險,以及如何從 session log 驗證實際使用的脈絡。
739 字
|
4 分鐘
Cover Image of the Post
Cloudflare Workers compatibility_date 怎麼升:先盤點 flags,再更新日期
Cloudflare Workers 的 compatibility_date 決定採用哪些相容性變更。本文補上 2026-08-04 後 Node.js 相容性預設行為,並整理 flags、測試、rollback 與分階段部署。
1058 字
|
5 分鐘
Cover Image of the Post
Docker Compose include 怎麼拆檔:先釐清路徑、變數與名稱衝突
Docker Compose 的 include 可拆分服務設定檔,但相對路徑、.env 優先順序與資源名稱衝突都會影響結果。本文整理拆檔前後的檢查重點、驗證指令,以及多人協作時的服務所有權安排。
689 字
|
3 分鐘
Cover Image of the Post