Skip to content

infra: ensure markdown rendered is only ever initialized once - #3984

Merged
xDivisionByZerox merged 1 commit into
nextfrom
chore/parallel-safe-initMarkdownRenderer
Aug 9, 2026
Merged

infra: ensure markdown rendered is only ever initialized once#3984
xDivisionByZerox merged 1 commit into
nextfrom
chore/parallel-safe-initMarkdownRenderer

Conversation

@ST-DDT

@ST-DDT ST-DDT commented Aug 8, 2026

Copy link
Copy Markdown
Member

Implement suggestion from shikijs/shiki#1289


Store the promise to ensure we only ever initialize the markdown rendered backend once.
This is an attempt to fix the flaky markdown rendered test.

While I don't think that it is the cause for the failure, it does fix the unintended side effects of calling initMarkdownRenderer() multiple times.

@ST-DDT ST-DDT added this to the v10.x milestone Aug 8, 2026
@ST-DDT
ST-DDT requested a balanced review from Copilot August 8, 2026 16:16
@ST-DDT ST-DDT self-assigned this Aug 8, 2026
@ST-DDT
ST-DDT requested a review from a team as a code owner August 8, 2026 16:16
@ST-DDT ST-DDT added c: docs Improvements or additions to documentation p: 1-normal Nothing urgent c: infra Changes to our infrastructure or project setup labels Aug 8, 2026
@netlify

netlify Bot commented Aug 8, 2026

Copy link
Copy Markdown

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 82b79c3
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/6a775657697810000887c22f
😎 Deploy Preview https://deploy-preview-3984.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Caches the Markdown renderer’s initialization promise to prevent concurrent duplicate initialization.

Changes:

  • Adds a shared renderer promise.
  • Reuses the in-flight promise across initialization calls.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/shared/markdown.ts
@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.92%. Comparing base (d4b35a4) to head (82b79c3).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3984   +/-   ##
=======================================
  Coverage   98.92%   98.92%           
=======================================
  Files         926      926           
  Lines        3241     3241           
  Branches      588      568   -20     
=======================================
  Hits         3206     3206           
  Misses         31       31           
  Partials        4        4           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread scripts/shared/markdown.ts
@xDivisionByZerox
xDivisionByZerox added this pull request to the merge queue Aug 9, 2026
Merged via the queue into next with commit d68f978 Aug 9, 2026
27 checks passed
@xDivisionByZerox
xDivisionByZerox deleted the chore/parallel-safe-initMarkdownRenderer branch August 9, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: docs Improvements or additions to documentation c: infra Changes to our infrastructure or project setup p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants