[Snyk] Upgrade remark-flexible-containers from 1.0.6 to 1.2.1 #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
SNYK-JS-AXIOS-6671926
Release notes
Package name: remark-flexible-containers
-
1.2.1 - 2024-03-13
- added a test util, and updated all the tests
- fixed: specific identifiers for the
-
1.2.0 - 2024-03-13
- updated the dependencies
- added
- the options
- made refinements in the code
- improved the typing system,
- 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
-
1.1.0 - 2024-02-10
info
-
1.0.7 - 2023-12-26
- updated the dependencies and fixed the type issues
- refactored the
- refactored the
- updated the
- fixed "Cannot find module" error in
- added a
- added
- added the test files covering the new options
-
1.0.6 - 2023-06-16
- 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
- added the list of the remark packages I have published into README.md
from remark-flexible-containers GitHub release notesThe changes made by @ talatkuyuk
titleshould break the optiontitle: () => null, and the title should take placeRelease notes and changes made by @ talatkuyuk
package-lock.jsonon behalf of npm clean install in the github actionstitlePropertiesandcontainerPropertiesare not allowed to haveclassNamein the returned object@ types/mdastis extended with newContainertypeAdded Support for Specific Identifiers
::: [type] [{tagname#id.classname}] [title] [{tagname#id.classname}]
Now, the
remark-flexible-containerssupports syntax for specific identifiers (tagname,id,classnames) for individualcontainerandtitlenode. For example:::: info {section#foo.myclass} Title Of Information {span#baz.someclass} <!-- content --> :::The identifiers (
tagname,id,classnames) must be inside curly braces.Syntax is very simple.
tagnameis to be compatible HTML tag name, and may present only once,idis to start with hash#, and may present only once,classnamesare 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 forcontainernode.The second group of identifiers (just after the
title) is fortitlenode.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}Release notes and the changes made by @ talatkuyuk
removed inconsistencies in the outputs whether there is an empty line or not
::: info :::and
:::
Now, both produces the output without
<p>inside the container,Fixed a bug
if a
breaknode is the first child of a paragraph within the container, thebreaknode 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.For the fix, I added another
visitfunction for thehtmlnodes 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.Release notes and the changes made by @ talatkuyuk
.npmrcfilepackage.jsonand thetsconfig.jsonREADME.mdhaving at least node version 16+ts-jesttest environment by addingmoduleResolutioncallback functionfor thetitleoption (breaking change !!!)Before, the
titleoption wasnull | undefined. If you wanted not to add atitlenode, the option wastitle: null.Now, the
titleoption is a callback function(type?: string, title?: string) => string | null | undefined. If you want not to add atitlenode, the option istitle: () => null. With that callback function, you are able to change the titles according to your logic.callback functionoption for the TagName and ClassName options in addition tostringoptionIt will also provides you to define dynamic tag names and class names.
Relesae Notes:
srcdirectory into files in package.json for source map supportImportant
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: