refactor(markdown-magic): Replatform onto remark/mdast - #28098
Conversation
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (21305 lines, 263 files), I've queued these reviewers:
How this works
|
| @@ -0,0 +1,149 @@ | |||
| /*! | |||
There was a problem hiding this comment.
TODO: remove this before we merge the PR
| The Azure local service includes most of the basic features needed to **test** data stores and containers. While we use the [Webpack Fluid Loader](../../packages/tools/webpack-fluid-loader)'s in browser service for much of our data store and container development, the Azure local service offers some advantages because it's a standalone process. For instance, testing a Fluid container from 2+ simultaneously connected clients is much easier using the Azure local service. | ||
|
|
||
| <!-- AUTO-GENERATED-CONTENT:START (LIBRARY_README_HEADER) --> | ||
| <!-- markdown-magic:begin {"transform":"library-readme-header","headingLevel":2} --> |
There was a problem hiding this comment.
Note for reviewers: the syntax for our transforms has changed. A key benefit to the new syntax is that it supports JSON for the options.
|
|
||
| - The configuration works but needs official support. | ||
| - The configuration does not work and requires changes. | ||
| * The configuration works but needs official support. |
There was a problem hiding this comment.
Note for reviewers: the Markdown formatting used by ReMark is different from what we were previously hard-coding. There should be no end-reader-visible changes made here, but the PR does include a lot of formatting changes. There wasn't a practical way to prevent this :/
| @@ -386,51 +386,92 @@ import { YoutubeVideo } from "@site/src/components/youtubeVideo"; | |||
|
|
|||
| The following npm scripts are supported in this directory: | |||
|
|
|||
| <!-- AUTO-GENERATED-CONTENT:START (PACKAGE_SCRIPTS:includeHeading=FALSE) --> | |||
| <!-- markdown-magic:begin { | |||
There was a problem hiding this comment.
Note for reviewers: there wasn't a great way to implement this package scripts functionality in the new model without needing to declare all of the relevant scripts up-front. That said, the existing behavior was VERY error-prone, and the new behavior is much more robust. In particular, if a referenced script is removed from the package.json, the docs build will error if that script is still mentioned here, which is quite useful.
But all-in-all, I'm on the fence about this. It's strictly opt-in, so READMEs don't need to do this. But I also question how valuable this content really is.
I'm interested in others' opinions :)
| @@ -1,306 +0,0 @@ | |||
| --- | |||
There was a problem hiding this comment.
Note for reviewers: I guess the changes here were substantial enough that git doesn't see this as a rename. But this file wasn't removed. It's just now a .mdx file.
Alex Villarreal (alexvy86)
left a comment
There was a problem hiding this comment.
A few comments below. Otherwise overall lgtm. I did not look in detail at all the src/test files, and I only skimmed the docs/transforms/ files, but the idea looks correct and the implementation seems to be working as intended. Since stakes are relatively low, I think less nitpicky reviews and quick iteration is where this code wants to be, so approving anyway.
| "dependencyComments": [ | ||
| "chalk is left at version 4 (not 5) to keep CommonJS support." | ||
| ], |
There was a problem hiding this comment.
If we're making markdown-magic an ESM module, can we bump the chalk version now?
There was a problem hiding this comment.
Good catch! I think so!
There was a problem hiding this comment.
It looks like at least one other package in the client workspace is using the older version too. I'll do this update as a separate PR.
|
[Agent-generated] Summary of a deep review of commit Recommendation: address these three reproduced correctness issues before merging. These are generator edge cases, not failures observed in the checked-in website.
The remaining repository-wide README churn and lockfile contents were not reviewed line by line. |
Bundle size comparisonBase commit: Pending — |
|
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output |
This pattern unlocks a lot more flexibility in how we do generation / content copying. New functionality included in this PR:
.mdxfiles (like we use in the website)Future improvements that will be possible:
Also updates the code to use TypeScript.