Skip to content

Upgrade marked to latest v18 with v4+ compatibility patch#554

Open
nerdCopter wants to merge 1 commit intoemuflight:masterfrom
nerdCopter:marked-latest
Open

Upgrade marked to latest v18 with v4+ compatibility patch#554
nerdCopter wants to merge 1 commit intoemuflight:masterfrom
nerdCopter:marked-latest

Conversation

@nerdCopter
Copy link
Copy Markdown
Member

@nerdCopter nerdCopter commented Apr 16, 2026

Bump marked to latest v18.0.0 and patch the loader and release note rendering path for marked (marked).marked and marked.parse().

Summary by CodeRabbit

  • Chores
    • Updated the markdown rendering library to a newer major version and adjusted code to ensure continued compatibility.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 166090ce-ffc3-41f8-ad5c-f607803c46b4

📥 Commits

Reviewing files that changed from the base of the PR and between 9f2263c and 01a6ec0.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • package.json
  • src/js/tabs/firmware_flasher.js
  • src/main.html

📝 Walkthrough

Walkthrough

Dependency upgrade from marked v2.0.7 to v18.0.0 with corresponding API adjustments. The global window assignment now explicitly accesses the .marked export, and markdown rendering invocations changed from direct function calls to explicit .parse() method calls across two locations.

Changes

Cohort / File(s) Summary
Dependency Version Update
package.json
Updated marked dependency constraint from ^2.0.7 to ^18.0.0.
Marked API Migration
src/main.html, src/js/tabs/firmware_flasher.js
Updated global assignment to use require('marked').marked and replaced two instances of marked(formattedNotes) with marked.parse(formattedNotes) to align with v18 API.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: upgrading the marked library to v18 with necessary compatibility patches.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nerdCopter
Copy link
Copy Markdown
Member Author

@coderabbitai, full review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 16, 2026

@nerdCopter Sure, I'll redo the full review of PR #554 now!


🧠 Learnings used
Learnt from: nerdCopter
Repo: emuflight/EmuConfigurator PR: 553
File: package.json:62-62
Timestamp: 2026-04-16T20:04:32.879Z
Learning: In emuflight/EmuConfigurator, `marked` is loaded as a global in `src/main.html` via `window.marked = require('marked').marked` (named CJS export, required for marked v4+). The single call site is `src/js/tabs/firmware_flasher.js` line 72, which uses `marked.parse(formattedNotes)` (preferred API from marked v4 onward). No custom options, renderers, or extensions are used. Upgrading past v3 requires exactly these two code changes plus the package.json version bump.
✅ Actions performed

Full review triggered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant