chore(v5): rename archived v5 pages to .mdx - #4700
Open
thetaPC wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue URL: internal
What is the current behavior?
Every live doc page has moved to
.mdxas part of the Strict MDX migration, but the archived versions were deliberately left alone, since they are never built.That holds only while they stay archived. Most of these pages are MDX in everything but name: 342 of v5's 460 pages contain imports and 306 contain JSX. Once Strict MDX is enabled, reviving this version would parse those as plain CommonMark, turning every import into a line of literal text on the page. It would not fail the build, so the first sign of trouble would be a reader seeing an import statement in the middle of a paragraph.
Archived versions are revivable by design: the archiving guide already documents moving one back into
versions.json. So leaving them behind converts a documented, supported operation into one that silently produces broken pages.What is the new behavior?
v5 is migrated to match the live versions: all 460 pages renamed, along with 510 component API imports and 192 internal links.
Nothing about the archived state changes. v5 stays in
versionsArchived.json, stays out ofversions.json, and is still not built. This only makes it safe to revive later.Two differences from the v7 and v6 PRs are worth knowing, because they change what a reviewer should expect.
v5 has no playground partials and no README, so the whole change is pages, component API imports and internal links. Every page is renamed, with no exclusions.
More importantly, v5's
native/andcli/commands/directories are committed content, not generated output. v6 through v8 each carry a.gitignorein those directories and track nothing inside them. v5 has no such file and tracks 191 pages undernative/and 53 undercli/commands. They are not regenerable:webengage, for example, does not appear anywhere inscripts/native.mjs, and the generator produces 24 plugin pages against v5's 191. These are legacy Cordova and Ionic Native pages that nothing has rewritten in years. They are ordinary source files that happen to sit in a directory whose name matches a generated one in later versions, so they are renamed with everything else.Does this introduce a breaking change?
Other information
This is the last of three, after v7 and v6. The three are independent, since each touches only its own version tree, so they can merge in any order.
All three land before the transitional compatibility code is removed, and that order matters. These archived pages currently import 425 component API partials by their
.mdnames, which only resolve because the plugin still writes both. Removing that first would leave the archived versions broken and then fix them afterwards. Doing the versions first means nothing anywhere imports the old names by the time it comes out.The same work then goes to
translation/jp, and reachesmajor-10.0through the usual sync.Verification was done by temporarily reviving the version, since archived pages are otherwise never built and a mistake here would have no signal at all.
How to test
Archived versions are not built, so nothing in a normal preview exercises these pages. To check them, revive the version locally:
v5out ofversionsArchived.jsonand back intoversions.json.npm run generate-markdown, thennpx docusaurus buildwith no--localeflag.versions.jsonandversionsArchived.jsonafterwards. Neither belongs in this PR.Do not add v5 to the write targets in
scripts/native.mjsorscripts/cli.mjs, even though the v7 and v6 instructions say to. Those versions have no committed pages innative/orcli/commands, so they need the generator to fill them. v5 already has 244 committed pages there, and generating over them produces duplicate routes: it silently drops the v5 page count from 460 to 286 and takes pages with it. That happened on the first attempt at this verification, which is the only reason it is called out here.The build should complete with no errors, and
/docs/v5/should render 460 pages. Worth spot checking an API page for its generated tables, and one of the legacy plugin pages undernative/.