Skip to content

Commit 11b10d7

Browse files
aduh95MylesBorins
authored andcommitted
tools,doc: upgrade dependencies
PR-URL: #35244 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com>
1 parent d938e85 commit 11b10d7

File tree

5 files changed

+541
-415
lines changed

5 files changed

+541
-415
lines changed

tools/doc/generate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ async function main() {
8787
.use(html.firstHeader)
8888
.use(html.preprocessElements, { filename })
8989
.use(html.buildToc, { filename, apilinks })
90-
.use(remark2rehype, { allowDangerousHTML: true })
90+
.use(remark2rehype, { allowDangerousHtml: true })
9191
.use(raw)
9292
.use(htmlStringify)
9393
.process(input);

tools/doc/html.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const gtocPath = path.join(docPath, 'api', 'index.md');
5454
const gtocMD = fs.readFileSync(gtocPath, 'utf8').replace(/^<!--.*?-->/gms, '');
5555
const gtocHTML = unified()
5656
.use(markdown)
57-
.use(remark2rehype, { allowDangerousHTML: true })
57+
.use(remark2rehype, { allowDangerousHtml: true })
5858
.use(raw)
5959
.use(navClasses)
6060
.use(htmlStringify)
@@ -281,7 +281,7 @@ function parseYAML(text) {
281281
meta.changes.forEach((change) => {
282282
const description = unified()
283283
.use(markdown)
284-
.use(remark2rehype, { allowDangerousHTML: true })
284+
.use(remark2rehype, { allowDangerousHtml: true })
285285
.use(raw)
286286
.use(htmlStringify)
287287
.processSync(change.description).toString();
@@ -368,7 +368,7 @@ function buildToc({ filename, apilinks }) {
368368

369369
file.toc = unified()
370370
.use(markdown)
371-
.use(remark2rehype, { allowDangerousHTML: true })
371+
.use(remark2rehype, { allowDangerousHtml: true })
372372
.use(raw)
373373
.use(htmlStringify)
374374
.processSync(toc).toString();

tools/doc/json.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
const unified = require('unified');
2525
const common = require('./common.js');
2626
const html = require('remark-html');
27-
const select = require('unist-util-select');
27+
const { selectAll } = require('unist-util-select');
2828

2929
module.exports = { jsonAPI };
3030

@@ -38,7 +38,7 @@ function jsonAPI({ filename }) {
3838
const stabilityExpr = /^Stability: ([0-5])(?:\s*-\s*)?(.*)$/s;
3939

4040
// Extract definitions.
41-
const definitions = select(tree, 'definition');
41+
const definitions = selectAll('definition', tree);
4242

4343
// Determine the start, stop, and depth of each section.
4444
const sections = [];

0 commit comments

Comments
 (0)