-
Notifications
You must be signed in to change notification settings - Fork 53
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
remark@next (13) #416
Comments
Thanks a lot for having taken time to inform us on this issue. I'll experiment with micromark in the upcoming weeks, and ask you if I have any questions. |
There is no version of `remark-custom-blocks` that is compatible with remark v13 yet. See zestedesavoir/zmarkdown#416
Any thoughts on remark 13 support? I am interested in upgrading |
We are planning to update them all at once, but the migration should start fairly soon. In fact, I already started working on it for some plugins (but not
In fact, I'm planning to initialize a specific branch for working on |
Thanks for the update! 👍 I was hoping the migration will be easy 😅 But happy to try anyway when your micromark extensions are ready as you suggest. |
* chore(gatsby-transformer-remark): ugprade remark-related deps * tests: update snapshots for ToC * enable remark-gfm in a backwards compatible way * gatsby-remark-autolink-headers: bump deps * gatsby-remark-code-repls: bump deps * gatsby-remark-copy-linked-files: bump deps * gatsby-remark-prismjs: bump deps * gatsby-remark-prismjs: fix breaks * gatsby-remark-embed-snippet: bump deps and fix breaks * gatsby-remark-graphviz: bump deps * gatsby-remark-images: bump deps * gatsby-remark-images-contentful: bump deps * gatsby-remark-katex: bump deps * gatsby-remark-responsive-iframe: bump deps * gatsby-remark-smartypants: bump deps * update yarn.lock * gatsby-remark-prismjs: update snapshots * gatsby-remark-images-contentful: bump deps * chore: bump root remark deps * gatsby-remark-katex: update snapshot * gatsby-remark-responsive-iframe: update snapshot * gatsby-remark-autolink-headers: update snapshot * gatsby-remark-autolink-headers: update snapshot * gatsby-remark-autolink-headers: fix tests * gatsby-remark-code-repls: update snapshot * gatsby-remark-smartypants: update snapshot * gatsby-remark-custom-blocks: disable plugin tests There is no version of `remark-custom-blocks` that is compatible with remark v13 yet. See zestedesavoir/zmarkdown#416 * dummy commit for canary * run prettier and update yarn.lock * gatsby-transformer-remark: update unified and unist-utils * gatsby-remark-autolink-headers: correct text in tests * gatsby-remark-custom-blocks: incompatibility notice
* chore(gatsby-transformer-remark): ugprade remark-related deps * tests: update snapshots for ToC * enable remark-gfm in a backwards compatible way * gatsby-remark-autolink-headers: bump deps * gatsby-remark-code-repls: bump deps * gatsby-remark-copy-linked-files: bump deps * gatsby-remark-prismjs: bump deps * gatsby-remark-prismjs: fix breaks * gatsby-remark-embed-snippet: bump deps and fix breaks * gatsby-remark-graphviz: bump deps * gatsby-remark-images: bump deps * gatsby-remark-images-contentful: bump deps * gatsby-remark-katex: bump deps * gatsby-remark-responsive-iframe: bump deps * gatsby-remark-smartypants: bump deps * update yarn.lock * gatsby-remark-prismjs: update snapshots * gatsby-remark-images-contentful: bump deps * chore: bump root remark deps * gatsby-remark-katex: update snapshot * gatsby-remark-responsive-iframe: update snapshot * gatsby-remark-autolink-headers: update snapshot * gatsby-remark-autolink-headers: update snapshot * gatsby-remark-autolink-headers: fix tests * gatsby-remark-code-repls: update snapshot * gatsby-remark-smartypants: update snapshot * gatsby-remark-custom-blocks: disable plugin tests There is no version of `remark-custom-blocks` that is compatible with remark v13 yet. See zestedesavoir/zmarkdown#416 * dummy commit for canary * run prettier and update yarn.lock * gatsby-transformer-remark: update unified and unist-utils * gatsby-remark-autolink-headers: correct text in tests * gatsby-remark-custom-blocks: incompatibility notice
Quick update: a plugin was migrated today, If you feel confident enough, then technically, you can do the same as I did with this first plugin:
If you feel like waiting more isn't a big deal, then I'm writing a guide to porting our extensions (and more generally, to writing extensions) for |
Any updates on this @StaloneLab ? @vladar Said he was willing to help |
Still in progress, it takes a long time, and I'm almost the only one working on it. Still no due date planned, and there likely won't ever be any, we'll release plugin-by-plugin when they will be ready. By now, I'm still writing a guide on how to update the plugins, so that maybe more people will be able to participate. This guide will lead to two more plugins being ported (namely, People that already know how to write EDIT: just saw that |
gatsby-remark-custom-blocks is not compatible with v4 yet. (See the readme of https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-custom-blocks + zestedesavoir/zmarkdown#416.)
gatsby-remark-custom-blocks is not compatible with v4 yet. (See the readme of https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-custom-blocks + zestedesavoir/zmarkdown#416.)
@StaloneLab I have been investigating your remark-ping plugin and been trying to use it with react-markdown and noticed it not working with the latest remark-parser. Your comment on 16 Jul suggests you had a fix and was publishing this but it still not working. I am wondering if you had a plan to migrate that plugin over to using the new remark-parser format in the near future? Happy to open a new Issue for just this plugin if you don't want to pollute this ticket. |
Actually, I think it is a great thing you used this issue to ask your question. In July, I said I was writing a guide on porting plugins, and it would lead to some plugins being ported. This is still what is planned, but I'm running out of time by now, hence very little progress has been made. The plugins will be made to work on remark 13 at some point, but we do not have any due date, as I'm almost the only one working on it. If you are interested in taking part (for instance porting To make it short, any PR is welcome (and will be reviewed as fast as possible), I am ready to provide help to anyone willing to participate, and any plugin ported will be published whenever ready. |
@StaloneLab I'd want to use the |
Thanks a lot for these, much appreciated! Tried playing around with this but I'm still unsure how to incorporate the disable into a plugin. |
function myPluginToTurnOffThings(options = {}) {
const data = this.data()
const list = data.micromarkExtensions || (data.micromarkExtensions = [])
list.push({disable: {null: options.disable || []}})
} |
I hope somebody can update it, Because I have no idea how to do that :( |
Any plans to update |
Full migration is still an objective for us, but it is not a priority. Apart from that, no release date is planned. Some plugins, namely |
Hello guys I was needing that this https://github.com/zestedesavoir/zmarkdown/tree/master/packages/remark-custom-blocks supports remark 13 (But I saw that it is in version 14 😄 ), does make sense to extract this package and release a new major version to support remark 14? But in theory it leads to split all packages in small ones! and I don't know if it's a good idea, because the packages's code are quite small! |
It would be super if you create some solution for latest Gatsby. |
yep, the goal is bump it for Gatsby 😄 ! But I would like to know what is the best approach for this ;) ! |
But as I can see, have many @StaloneLab what do you think we create a 12.x branch to make the this repository support remark 14? Edit: or should we use |
The "next" branch is indeed the "work in progress" branch for support of remark 13+ and therefore micromark. I try to dig into it many times and, the new way is really hard to understand, I'm quite stuck. |
Hey @artragis thanks to confirm it! is there anywhere a for example: |
Here is the full affected plugin list :
mdast-util, rebber, rebber-plugins do not need to be upgraded because they work on the AST, not on the markdown itself. |
Hello everyone, @artragis has answered most of the questions asked, but seeing people commenting on this issue again and again makes me think that I might not have been clear before about our goals regarding the migration. This message aims to give some additional information to @eerison and anyone having questions about why migrating to What is ZMarkdown?Although it might be obvious for some people, I think it is interesting to give a bit of context on what is ZMarkdown and why it exists. To start from the beginning, ZMarkdown (this repository) is a Markdown engine powering “Zeste de Savoir”, a French website, hosted and maintained by volunteers on their spare time. Being a Markdown engine based on What is the migration?That being said, let’s talk a bit about So when this version of remark came out (and even before to be honest), we started to wonder whether we would benefit from migrating to the new system, and came to the following conclusion: we likely do not need to migrate our plugins, but it would be a nice investment, both for us (to get fixes from remark) and for people who need the packages. How is it organized?Because we do not actively need to switch to the new parser, and considering that at most one person in our team (that’s me) knows how the new system works, I decided that I was going to work on migrating the plugins according to the following rules:
This policy is what guides all the answers to this issue: whenever some asks if a plugin will soon be ported, I answer that it likely will, but that no due date is planned, and that any pull request will be considered. Pull requests regarding this issue, are to be opened towards the How do I get my plugin ported?To summarize, there are two ways to get your plugin to work with the new remark version: the first one is to simply wait (potentially for a long time) for us to do it, in that case there is not guarantee of any kind, and asking here when a given plugin will be ready is not necessary: we know there is work to be done. A better (and likely faster) way is to contribute to the project in order to migrate one, or even many, plugins you need. Apart from making your own schedule, there are at least two advantages for you in contributing to this project: first, you will help the whole community of people using the stack; second, I am willing to help anyone who wants to work on the project (including professionally, contact me by email in this regard), so you gain insight on the new system, with which I have worked. Can you release my plugin?This question was not asked before, so I am putting extra attention to answer it: while we do not normally release plugins before all the others are migrated, if you help us migrating a plugin, and need the new version to be published, I am ready to do it. This is essentially quite simple to do, and will cause little trouble, even if it is not optimal for us (hence why I am not doing it automatically). What that means is that we do not need to split our monorepo into “smaller packages” as mentioned. The way is currently works already allows plugins to be independently published, in fact we have already done it in the past. TL;DRFeel free to contribute! We will not do the migration for you, but I am ready to help if necessary. I hope this message will clarify everything, but I am ready to answer any specific question not answered here. I shall also thank @artragis again for the list of plugins, and for his previous answers. |
I've used micromark/micromark-extension-gfm-strikethrough/blob/1.0.4/dev/lib/syntax.js as base to get an Feel free to check my implementation and copy when needed (MIT from unified and MIT from me), all plugins i've "modifed" (no tests...) can be found in this repository.
|
Duely noted, thanks for your work, I'll see if it can be ported here! |
for anyone looking for a solution to import { SKIP, visit } from 'unist-util-visit';
import type { Plugin } from 'unified';
import type { UnistNode, UnistParent } from 'node_modules/unist-util-visit/lib';
const limitedMarkdownPlugin: Plugin = () => {
return (tree, file) => {
const contents = file.toString();
visit(tree, (node: UnistNode, index, parent: UnistParent) => {
if (
index == null ||
['paragraph', 'text', 'inlineCode', 'code', 'strong', 'emphasis'].includes(node.type) ||
!node.position
) {
return true;
}
let value = contents.slice(node.position.start.offset, node.position.end.offset);
if (node.type === 'heading') {
value = `\n${value}`;
}
parent.children[index] = {
type: 'text',
value,
} as any;
return [SKIP, index] as const;
});
};
}; |
I'm wondering where this effort ended up. It's awesome that @elbakerino got this up and running. Is it in a state where you could submit a PR for this? @StaloneLab it sounded like you were looking into that as well. What's required to get that across the finish line" |
It's upgraded and works with latest unified@11, remark@15, but still got I only use it for If wanted in such a state I'm happy to submit a PR, best would be to give me a quick intro and tell me how to add the second license (readme license notice). |
Still ready to accept changes, and planning to release as-is the plugins we already have. I need to think a bit and discuss with a few persons before. In the meantime, still ready to accept PR, and will definitely be looking to integrate plugins I am aware of in a (hopefully) short time. Since we are discussing specifically strike-through, can I ask about the licensing beforehand going any further: when you refer to a second license, do you mean that your code is licensed under MIT but simply derives from (also MIT) code from Titus Woormer and |
Please, help me with remark-grid-plugin. I try using it with docusaurus, but it still fires this error:
Can i see working dependencies list in package.json? |
Yes it is expected not to work if you are using a recent version of remark. For this specific package, you might want to use |
Hi!
remark is switching to a new parser (and compiler) internally (micromark,
remarkjs/remark#536
), which will break several of these plugins.Several of the remark plugins, such as frontmatter, footnotes, math, a new remark-gfm, and a couple others, will update soon too.
Those might server well as inspiration on how to tokenize with micromark in remark. There are several micromark extensions already as well (which deal with tokenizing markdown), and corresponding mdast extensions, which deal with mapping those tokens to mdast.
Anyway, feel free to ask me questions!
The text was updated successfully, but these errors were encountered: