Skip to content

Conversation

Codes-Exe
Copy link

snyk-top-banner

Snyk has created this PR to upgrade remark-flexible-containers from 1.0.6 to 1.2.1.

ℹ️ 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 4 versions ahead of your current version.

  • The recommended version was released a year ago.

Issues fixed by the recommended upgrade:

Issue Score Exploit Maturity
medium severity Cross-site Scripting (XSS)
SNYK-JS-AXIOS-6671926
265 No Known Exploit
Release notes
Package name: remark-flexible-containers
  • 1.2.1 - 2024-03-13

    The changes made by @ talatkuyuk

    • added a test util, and updated all the tests
    • fixed: specific identifiers for the title should break the option title: () => null, and the title should take place
  • 1.2.0 - 2024-03-13

    Release notes and changes made by @ talatkuyuk

    • updated the dependencies
    • added package-lock.json on behalf of npm clean install in the github actions
    • the options titleProperties and containerProperties are not allowed to have className in the returned object
    • made refinements in the code
    • improved the typing system, @ types/mdast is extended with new Container type
    • added test coverage 100% and codecov connection
    • added type coverage 100%
    • added a github action for commits and pull requests
    • added npm provenance
    • added a test file for creating details-summary HTML elements via plugin
    • updated README.md including badges, plugin list, options and support for specific identifiers sections

    Added Support for Specific Identifiers

    ::: [type] [{tagname#id.classname}] [title] [{tagname#id.classname}]

    Now, the remark-flexible-containers supports syntax for specific identifiers (tagname, id, classnames) for individual container and title node. For example:

    ::: info {section#foo.myclass} Title Of Information {span#baz.someclass}
    <!-- content -->
    :::
    <section class="remark-container info myclass" id="foo">
      <span class="remark-container-title info someclass" id="baz">
        Title Of Information
      </span>
      <!-- content -->
    </section>

    The identifiers (tagname, id, classnames) must be inside curly braces.

    Syntax is very simple.

    • tagname is to be compatible HTML tag name, and may present only once,
    • id is to start with hash #, and may present only once,
    • classnames are to start with dot ., and may present many.

    There are two groups of identifiers. Each group is optional, may present or not.
    The first group of identifiers (just after the type) is for container node.
    The second group of identifiers (just after the title) is for title node.

    Here are some example usages. For simplicity, I omitted the container contents and ending syntax, just put the beginning syntax in the examples. All are valid usage for specific identifiers.

    These identifiers can be placed as all three, any two, or just any of them in the desired order, with or without a space between them. This is why the "flexibility" term comes from.

    ::: info {section#foo.myclass.second-class} Title {span#baz.someclass.other-class}
    ::: info {section#foo.myclass} Title {span#baz.someclass}
    ::: info {section #foo .myclass .second-class} Title {span #baz .someclass .other-class}
    ::: info {section #foo .myclass} Title {span #baz .someclass}
    ::: info {section.myclass#foo} Title {span.someclass#baz}
    ::: info {.myclass#foo} Title {.someclass#baz}
    ::: info {.myclass #foo} Title {.someclass #baz}
    ::: info {.myclass #foo section} Title {.someclass #baz span}
    ::: info {#foo section} Title {#baz span}
    ::: info {.myclass} Title {#baz}
    ::: info {#foo} Title {.someclass}
    ::: info {#foo} Title
    ::: info {#foo}
    ::: info {section#foo.myclass}
    ::: info Title {.someclass}
    ::: info Title {span#baz.someclass}
  • 1.1.0 - 2024-02-10

    Release notes and the changes made by @ talatkuyuk

    removed inconsistencies in the outputs whether there is an empty line or not

    ::: info
    :::

    and

    info

    :::

    Now, both produces the output without <p> inside the container,

    <div class="remark-container info"></div>

    Fixed a bug

    if a break node is the first child of a paragraph within the container, the break node is removed.

    Fixed a bug for the block-level html elements in markdown files (not related with mdx files)

    Block-level html elements was causing a bug if the ::: closing container sign is just after the that element closing tag.

    ::: info Title
    <p>Hi</p>
    :::

    For the fix, I added another visit function for the html nodes in the AST that if a html node.value ends with "\n:::", remove and carry it into a new paragraph.

    Now, we don't need to put an empty line after the block-level html elements like <p> tag in the container, before it was needed an empty line to work with "markdown" documents.

  • 1.0.7 - 2023-12-26

    Release notes and the changes made by @ talatkuyuk

    • updated the dependencies and fixed the type issues
    • refactored the .npmrc file
    • refactored the package.json and the tsconfig.json
    • updated the README.md having at least node version 16+
    • fixed "Cannot find module" error in ts-jest test environment by adding moduleResolution
    • added a callback function for the title option (breaking change !!!)
      Before, the title option was null | undefined. If you wanted not to add a title node, the option was title: null.
      Now, the title option is a callback function(type?: string, title?: string) => string | null | undefined. If you want not to add a title node, the option is title: () => null. With that callback function, you are able to change the titles according to your logic.
    • added callback function option for the TagName and ClassName options in addition to string option
      It will also provides you to define dynamic tag names and class names.
    • added the test files covering the new options
  • 1.0.6 - 2023-06-16

    Relesae Notes:

    • removed the "unist-util-find-all-between" package (it causes "Error [ERR_REQUIRE_ESM]: require() of ES Module not supported" )
    • added the "unist-util-find-between-all" package instead
    • added src directory into files in package.json for source map support
    • added the list of the remark packages I have published into README.md
from remark-flexible-containers 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 remark-flexible-containers from 1.0.6 to 1.2.1.

See this package in npm:
remark-flexible-containers

See this project in Snyk:
https://app.snyk.io/org/codes-exe/project/4ecc5cb6-47dd-4c60-b1c6-44734276eb03?utm_source=github&utm_medium=referral&page=upgrade-pr
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