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

[Snyk] Upgrade markdown-to-jsx from 7.1.7 to 7.4.7 #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ASISBusiness
Copy link
Owner

snyk-top-banner

Snyk has created this PR to upgrade markdown-to-jsx from 7.1.7 to 7.4.7.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 15 versions ahead of your current version.

  • The recommended version was released on 4 months ago.

Issues fixed by the recommended upgrade:

Issue Score Exploit Maturity
medium severity Regular Expression Denial of Service (ReDoS)
SNYK-JS-MARKDOWNTOJSX-3310443
479 No Known Exploit
Release notes
Package name: markdown-to-jsx
  • 7.4.7 - 2024-04-13

    Patch Changes

    • 7603248: Fix parsing isolation of individual table cells.
    • f9328cc: Improved block html detection regex to handle certain edge cases that cause extreme slowness. Thank you @ devbrains-com for the basis for this fix 🤝
  • 7.4.6 - 2024-04-05

    Patch Changes

    • a9e5276: Browsers assign element with id to the global scope using the value as the variable name. E.g.: <h1 id="analytics"> can be referenced via window.analytics.
      This can be a problem when a name conflict happens. For instance, pages that expect analytics.push() to be a function will stop working if the an element with an id of analytics exists in the page.

      In this change, we export the slugify function so that users can easily augment it.
      This can be used to avoid variable name conflicts by giving the element a different id.

      import { slugify } from 'markdown-to-jsx';

      options={{
      slugify: str => {
      let result = slugify(str)

      <span class="pl-k">return</span> <span class="pl-s1">result</span> ? <span class="pl-s">'-'</span> <span class="pl-c1">+</span> <span class="pl-s1">str</span> : <span class="pl-s1">result</span><span class="pl-kos">;</span>
      

      }
      }}

  • 7.4.5 - 2024-03-22

    Patch Changes

    • f5a0079: fix: double newline between consecutive blockquote syntax creates separate blockquotes

      Previously, for consecutive blockquotes they were rendered as one:

      Input

      > Block A.1
      > Block A.2

      > Block B.1

      Output

      <blockquote>
        <p>Block A.1</p>
        <p>Block A.2</p>
        <p>Block.B.1</p>
      </blockquote>

      This is not compliant with the GFM spec which states that consecutive blocks should be created if there is a blank line between them.

  • 7.4.4 - 2024-03-21

    What's Changed

    New Contributors

    Full Changelog: v7.4.3...v7.4.4

  • 7.4.3 - 2024-03-13

    What's Changed

    • fix: restore x-browser stable sort logic in #548 (fixes unclosed HTML tags that showed up for some edge cases)

    Full Changelog: v7.4.2...v7.4.3

  • 7.4.2 - 2024-03-12

    Re-release 7.4.1 with less existential console screaming

  • 7.4.1 - 2024-01-29

    What's Changed

    New Contributors

    Full Changelog: v7.4.0...v7.4.1

  • 7.4.0 - 2024-01-01

    Happy New Year! 🎆

    markdown-to-jsx v7.4 features a new option renderRule! — From the README:

    Supply your own rendering function that can selectively override how rules are rendered (note, this is different than options.overrides which operates at the HTML tag level and is more general). You can use this functionality to do pretty much anything with an established AST node; here's an example of selectively overriding the "codeBlock" rule to process LaTeX syntax using the @ matejmazur/react-katex library:

    import { Markdown, RuleType } from 'markdown-to-jsx'
    import TeX from '@ matejmazur/react-katex'

    const exampleContent =
    'Some important formula:\n\nlatex\nmathbb{N} = { a in mathbb{Z} : a &gt; 0 }\n\n'

    function App() {
    return (
    <Markdown
    children={exampleContent}
    options={{
    renderRule(next, node, renderChildren, state) {
    if (node.type === RuleType.codeBlock && node.lang === 'latex') {
    return (
    <TeX as="div" key={state.key}>{String.raw<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">node</span><span class="pl-kos">.</span><span class="pl-c1">text</span><span class="pl-kos">}</span></span>}</TeX>
    )
    }

          <span class="pl-k">return</span> <span class="pl-en">next</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span>
      <span class="pl-kos">}</span><span class="pl-kos">}</span>
    <span class="pl-c1">/</span><span class="pl-c1">&gt;</span>
    

    )
    }

    The README docs around syntax highlighting have also been updated with sample code.

    With the new year comes a push toward v8. Performance will be a top priority, reducing the complexity of the library's regexes to increase throughput for SSR use-cases and ideally eliminate rare but frustrating issues like catastrophic backtracking. In addition, the library will be pivoting into more of a pure compiler model, with a React adapter offered and ones added for other major frameworks as well. The idea is anywhere you can run JS, you can use [secret new library name].

    Stay tuned and thanks for being part of the journey ✌🏼
    Here's to a great 2024 🍾

    markdown-to-jsx is maintained by @ quantizor, buy him a coffee

    Full Changelog: v7.3.2...v7.4.0

  • 7.3.2 - 2023-08-05

    fix(types): path to esm types in "exports"

    Full Changelog: v7.3.1...v7.3.2

  • 7.3.1 - 2023-08-03

    What's Changed

    • add dev-time error if trying to provide bad input

    Full Changelog: v7.3.0...v7.3.1

  • 7.3.0 - 2023-08-03
  • 7.2.1 - 2023-06-02
  • 7.2.0 - 2023-03-18
  • 7.1.9 - 2023-02-01
  • 7.1.8 - 2022-12-05
  • 7.1.7 - 2022-03-07
from markdown-to-jsx GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

Snyk has created this PR to upgrade markdown-to-jsx from 7.1.7 to 7.4.7.

See this package in npm:
markdown-to-jsx

See this project in Snyk:
https://app.snyk.io/org/enterpriseasisbusiness/project/330e9774-c82b-4ee2-8be1-667fe6b3e953?utm_source=github&utm_medium=referral&page=upgrade-pr
Copy link

stackblitz bot commented Aug 16, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

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.

2 participants