hikerpig / pintora

An extensible text-to-diagrams library that works in both browser and node.js
https://pintorajs.vercel.app
MIT License
1.08k stars 22 forks source link

feat(cli): add option `renderInSubprocess` to avoid polluting global scope #276

Closed hikerpig closed 3 months ago

hikerpig commented 3 months ago

In order to avoid polluting the global environment, cli render function wil by default fork a subprocess to run the actual rendering.

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
pintorajs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 1, 2024 3:47pm
codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 82.40000% with 22 lines in your changes are missing coverage. Please review.

Project coverage is 91.53%. Comparing base (87f80b1) to head (911062f). Report is 148 commits behind head on master.

Files Patch % Lines
...ackages/pintora-cli/src/subprocess-render/index.ts 15.78% 16 Missing :warning:
packages/pintora-cli/src/render-impl.ts 94.56% 5 Missing :warning:
packages/pintora-cli/src/render.ts 90.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #276 +/- ## ========================================== + Coverage 91.06% 91.53% +0.47% ========================================== Files 69 91 +22 Lines 3994 5200 +1206 Branches 762 918 +156 ========================================== + Hits 3637 4760 +1123 - Misses 357 440 +83 ``` | [Flag](https://app.codecov.io/gh/hikerpig/pintora/pull/276/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hikerpig) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/hikerpig/pintora/pull/276/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hikerpig) | `91.53% <82.40%> (+0.47%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=hikerpig#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.