-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8771f57
commit 2ff7fe8
Showing
19 changed files
with
17,338 additions
and
12,473 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,5 @@ versioned_sidebars/* | |
!versioned_sidebars/.keep | ||
|
||
static/generated/*.json | ||
versions-shipped.json | ||
versions.json |
This file contains 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
This file contains 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
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
'use strict' | ||
|
||
const { join } = require('node:path') | ||
const replace = require('replace') | ||
|
||
function processDocusaurusV3Upgrade(dir) { | ||
// global updates | ||
// adding spacing between <[ characters | ||
|
||
replace({ | ||
regex: /<\[/g, | ||
replacement: '< [', | ||
paths: [dir], | ||
includes: join(dir, `*`), | ||
recursive: true, | ||
silent: false, | ||
}) | ||
|
||
// In case of errors, just check what is wrong with this playground: | ||
// https://mdxjs.com/playground/ | ||
const edits = [ | ||
{ | ||
inFile: 'TypeScript.md', | ||
from: 'fastify.preSerializationHookHandler<PreSerializationPayload', | ||
to: 'fastify.preSerializationHookHandler< PreSerializationPayload', | ||
}, | ||
|
||
{ | ||
inFile: 'TypeScript.md', | ||
from: 'fastify.onSendHookHandler<OnSendPayload', | ||
to: 'fastify.onSendHookHandler< OnSendPayload', | ||
}, | ||
|
||
{ | ||
inFile: 'TypeScript.md', | ||
from: '& { path: string; prefix', | ||
to: '& \\{ path: string; prefix', | ||
}, | ||
|
||
{ | ||
inFile: 'Server.md', | ||
from: '</a> option is set.', | ||
to: '</a> \noption is set.', | ||
}, | ||
] | ||
|
||
for (const edit of edits) { | ||
replace({ | ||
paths: [dir], | ||
regex: edit.from, | ||
replacement: edit.to, | ||
includes: edit.inFile, | ||
recursive: true, | ||
silent: false, | ||
}) | ||
} | ||
} | ||
|
||
module.exports = processDocusaurusV3Upgrade |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.