Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make printing Markdown to the Terminal optional #2937

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

diogokiss
Copy link

@diogokiss diogokiss commented Sep 4, 2023

This PR adds a new configuration option called 'marked'. When set to true, the output of Semantic Release would print Markdown to the terminal, whenever supported, using the 'marked-terminal' library as usual.

https://www.npmjs.com/package/marked-terminal

When set to false, the output will be printed in plain text. This feature is particularly useful when the output or the command will be consumed by another Markdown renderer, like GitHub.

This addresses the following issue.
#2191

Additionally, I'm also adding a 'silent' option that disables any logging output.
This is particularly useful when running with '--dry-run' in order to capture
only the release notes output from Semantic Versioning without the logging
messages.

@diogokiss diogokiss force-pushed the add-marked-output-options branch 5 times, most recently from fff5466 to fb4936b Compare September 4, 2023 17:00
This commit adds a new configuration option called 'marked'.
When set to true, the output of Semantic Release would print Markdown to the
terminal, whenever supported, using the 'marked-terminal' library as usual.

https://www.npmjs.com/package/marked-terminal

When set to false, the output will be printed in plain text.
This feature is particularly useful when the output or the command will be
consumed by another Markdown renderer, like GitHub.

This addresses the following issue.
semantic-release#2191
This commit disables to flags that are deprecated in the 'marked-terminal' as
pointed in the following issue.

markedjs/marked#2793

```
marked(): mangle parameter is enabled by default, but is deprecated since
version 5.0.0, and will be removed in the future. To clear this warning, install
https://www.npmjs.com/package/marked-mangle, or disable by setting
`{mangle: false}`.

marked(): headerIds and headerPrefix parameters enabled by default, but are
deprecated since version 5.0.0, and will be removed in the future. To clear this
warning, install  https://www.npmjs.com/package/marked-gfm-heading-id, or
disable by setting `{headerIds: false}`.
```
This commit adds a 'silent' option that disables any logging output.
This is particularly useful when running with '--dry-run' in order to capture
only the release notes output from Semantic Versioning without the logging
messages.
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.

None yet

2 participants