Skip to content

Commit 11b10d7

Browse files
aduh95MylesBorins
authored andcommittedNov 16, 2020
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 = [];

‎tools/doc/package-lock.json

+523-395
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tools/doc/package.json

+12-14
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,19 @@
66
"engines": {
77
"node": ">=12.10.0"
88
},
9-
"dependencies": {
10-
"highlight.js": "^9.18.1",
11-
"rehype-raw": "^2.0.0",
12-
"rehype-stringify": "^3.0.0",
13-
"remark-html": "^7.0.0",
14-
"remark-parse": "^5.0.0",
15-
"remark-rehype": "^3.0.0",
16-
"to-vfile": "^5.0.1",
17-
"unified": "^7.0.0",
18-
"unist-util-find": "^1.0.1",
19-
"unist-util-select": "^1.5.0",
20-
"unist-util-visit": "^1.4.0"
21-
},
229
"devDependencies": {
23-
"js-yaml": "^3.13.1"
10+
"highlight.js": "10.1.0",
11+
"js-yaml": "3.14.0",
12+
"rehype-raw": "4.0.2",
13+
"rehype-stringify": "8.0.0",
14+
"remark-html": "12.0.0",
15+
"remark-parse": "8.0.3",
16+
"remark-rehype": "7.0.0",
17+
"to-vfile": "6.1.0",
18+
"unified": "9.2.0",
19+
"unist-util-find": "1.0.1",
20+
"unist-util-select": "3.0.1",
21+
"unist-util-visit": "2.0.3"
2422
},
2523
"optionalDependencies": {},
2624
"bin": "./generate.js"

0 commit comments

Comments
 (0)
Please sign in to comment.