tools,doc: upgrade dependencies
PR-URL: https://github.com/nodejs/node/pull/35244 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com>
This commit is contained in:
parent
219e9fe600
commit
0b8fdb70ac
@ -87,7 +87,7 @@ async function main() {
|
|||||||
.use(html.firstHeader)
|
.use(html.firstHeader)
|
||||||
.use(html.preprocessElements, { filename })
|
.use(html.preprocessElements, { filename })
|
||||||
.use(html.buildToc, { filename, apilinks })
|
.use(html.buildToc, { filename, apilinks })
|
||||||
.use(remark2rehype, { allowDangerousHTML: true })
|
.use(remark2rehype, { allowDangerousHtml: true })
|
||||||
.use(raw)
|
.use(raw)
|
||||||
.use(htmlStringify)
|
.use(htmlStringify)
|
||||||
.process(input);
|
.process(input);
|
||||||
|
@ -54,7 +54,7 @@ const gtocPath = path.join(docPath, 'api', 'index.md');
|
|||||||
const gtocMD = fs.readFileSync(gtocPath, 'utf8').replace(/^<!--.*?-->/gms, '');
|
const gtocMD = fs.readFileSync(gtocPath, 'utf8').replace(/^<!--.*?-->/gms, '');
|
||||||
const gtocHTML = unified()
|
const gtocHTML = unified()
|
||||||
.use(markdown)
|
.use(markdown)
|
||||||
.use(remark2rehype, { allowDangerousHTML: true })
|
.use(remark2rehype, { allowDangerousHtml: true })
|
||||||
.use(raw)
|
.use(raw)
|
||||||
.use(navClasses)
|
.use(navClasses)
|
||||||
.use(htmlStringify)
|
.use(htmlStringify)
|
||||||
@ -281,7 +281,7 @@ function parseYAML(text) {
|
|||||||
meta.changes.forEach((change) => {
|
meta.changes.forEach((change) => {
|
||||||
const description = unified()
|
const description = unified()
|
||||||
.use(markdown)
|
.use(markdown)
|
||||||
.use(remark2rehype, { allowDangerousHTML: true })
|
.use(remark2rehype, { allowDangerousHtml: true })
|
||||||
.use(raw)
|
.use(raw)
|
||||||
.use(htmlStringify)
|
.use(htmlStringify)
|
||||||
.processSync(change.description).toString();
|
.processSync(change.description).toString();
|
||||||
@ -379,7 +379,7 @@ function buildToc({ filename, apilinks }) {
|
|||||||
|
|
||||||
file.toc = unified()
|
file.toc = unified()
|
||||||
.use(markdown)
|
.use(markdown)
|
||||||
.use(remark2rehype, { allowDangerousHTML: true })
|
.use(remark2rehype, { allowDangerousHtml: true })
|
||||||
.use(raw)
|
.use(raw)
|
||||||
.use(htmlStringify)
|
.use(htmlStringify)
|
||||||
.processSync(toc).toString();
|
.processSync(toc).toString();
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
const unified = require('unified');
|
const unified = require('unified');
|
||||||
const common = require('./common.js');
|
const common = require('./common.js');
|
||||||
const html = require('remark-html');
|
const html = require('remark-html');
|
||||||
const select = require('unist-util-select');
|
const { selectAll } = require('unist-util-select');
|
||||||
|
|
||||||
module.exports = { jsonAPI };
|
module.exports = { jsonAPI };
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ function jsonAPI({ filename }) {
|
|||||||
const stabilityExpr = /^Stability: ([0-5])(?:\s*-\s*)?(.*)$/s;
|
const stabilityExpr = /^Stability: ([0-5])(?:\s*-\s*)?(.*)$/s;
|
||||||
|
|
||||||
// Extract definitions.
|
// Extract definitions.
|
||||||
const definitions = select(tree, 'definition');
|
const definitions = selectAll('definition', tree);
|
||||||
|
|
||||||
// Determine the start, stop, and depth of each section.
|
// Determine the start, stop, and depth of each section.
|
||||||
const sections = [];
|
const sections = [];
|
||||||
|
948
tools/doc/package-lock.json
generated
948
tools/doc/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -6,21 +6,19 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12.10.0"
|
"node": ">=12.10.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
|
||||||
"highlight.js": "^9.18.1",
|
|
||||||
"rehype-raw": "^2.0.0",
|
|
||||||
"rehype-stringify": "^3.0.0",
|
|
||||||
"remark-html": "^7.0.0",
|
|
||||||
"remark-parse": "^5.0.0",
|
|
||||||
"remark-rehype": "^3.0.0",
|
|
||||||
"to-vfile": "^5.0.1",
|
|
||||||
"unified": "^7.0.0",
|
|
||||||
"unist-util-find": "^1.0.1",
|
|
||||||
"unist-util-select": "^1.5.0",
|
|
||||||
"unist-util-visit": "^1.4.0"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"js-yaml": "^3.13.1"
|
"highlight.js": "10.1.0",
|
||||||
|
"js-yaml": "3.14.0",
|
||||||
|
"rehype-raw": "4.0.2",
|
||||||
|
"rehype-stringify": "8.0.0",
|
||||||
|
"remark-html": "12.0.0",
|
||||||
|
"remark-parse": "8.0.3",
|
||||||
|
"remark-rehype": "7.0.0",
|
||||||
|
"to-vfile": "6.1.0",
|
||||||
|
"unified": "9.2.0",
|
||||||
|
"unist-util-find": "1.0.1",
|
||||||
|
"unist-util-select": "3.0.1",
|
||||||
|
"unist-util-visit": "2.0.3"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {},
|
"optionalDependencies": {},
|
||||||
"bin": "./generate.js"
|
"bin": "./generate.js"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user