Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Upgrade Mermaid to 11.17.2 (fixes six advisories in 11.12.x)

Đang mở Phù hợp với người mới
#15,042 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
60/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript
Lĩnh vực
frontend, security

Hướng nghiên cứu

Bắt đầu từ dev-docs/upgrade-dependencies.md, tài liệu này mô tả các bước vendoring. Các bundle cần thay thế là mermaid.js và mermaid.min.js trong src/resources/formats/html/mermaid/, lấy từ bản phân phối 11.17.2 trên unpkg. Hãy render một trang có classDiagram, sơ đồ C4 và biểu đồ Gantt trước và sau khi thay đổi để kiểm tra renderer mới. Công việc hoàn thành khi cả hai tệp đã được cập nhật và các sơ đồ này vẫn render được.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

quarto-cli vendors Mermaid 11.12.0 in src/resources/formats/html/mermaid/. Every rendered HTML page that uses Mermaid ships it. Six advisories affect all 11.12.x releases, and they're fixed in 11.14.1 or 11.16.1:

  • GHSA-c4c3-pg64-4m4v
  • GHSA-6x64-9x62-f2gx
  • GHSA-87f9-hvmw-gh4p
  • GHSA-xcj9-5m2h-648r
  • GHSA-ghcm-xqfw-q4vr
  • GHSA-6m6c-36f7-fhxh

They cover config prototype pollution, CSS/classDef and HTML injection, and an infinite loop in Gantt charts. 11.17.2 has none of them.

Proposal: bump to 11.17.2. That would match the VS Code extension, which moved its notebook renderer and its diagram preview to 11.17.2 in quarto-dev/quarto#1189. Both now run ahead of the CLI's Mermaid version.

As in dev-docs/upgrade-dependencies.md, get dist/mermaid.js and dist/mermaid.min.js from https://unpkg.com/[email protected]/ and copy them into src/resources/formats/html/mermaid/.

Things to know about 11.13 to 11.17:

  • These releases mostly add syntax (new diagram types and shapes, extra directives), so existing diagrams should keep working.
  • One visible change: in 11.17, classDiagram and C4 diagrams moved to Mermaid's unified (v2) renderer, so they'll look somewhat different.
  • 11.17 builds no longer embed name:"mermaid",version:"…" in the bundle. Anything that sniffs the version from the file needs another pattern; the extension's test now matches the renderer.draw(…, "X.Y.Z" literal.
  • mermaid.min.js grows from 2.75 MB to 3.57 MB.
Ngôn ngữ chính
JavaScript
Star
6.1k
Fork
466
Merge trung bình
20 giờ 28 phút
Pull request đã merge (30 ngày)
64

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của quarto-dev/quarto-cli

Tất cả issue của quarto-dev/quarto-cli

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.