Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit 11ccea9

Browse files
authored
Merge pull request #768 from ldapjs/dependabot/npm_and_yarn/marked-4.0.0
2 parents b64ed9f + 66f30b5 commit 11ccea9

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"get-port": "^5.1.1",
3737
"highlight.js": "^11.0.1",
3838
"husky": "^4.2.5",
39-
"marked": "^3.0.0",
39+
"marked": "^4.0.0",
4040
"tap": "15.0.10"
4141
},
4242
"scripts": {

scripts/build-docs.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
const fs = require('fs/promises')
22
const path = require('path')
3-
const marked = require('marked')
3+
const { marked } = require('marked')
44
const fm = require('front-matter')
55
const { highlight } = require('highlight.js')
66

77
marked.use({
88
highlight: (code, lang) => {
99
if (lang) {
10-
return highlight(lang, code).value
10+
return highlight(code, { language: lang }).value
1111
}
1212

1313
return code
@@ -100,7 +100,13 @@ async function createDocs () {
100100
const branding = path.join(docs, 'branding')
101101
const src = path.join(branding, 'public')
102102

103-
await fs.rmdir(dist, { recursive: true })
103+
try {
104+
await fs.rm(dist, { recursive: true })
105+
} catch (ex) {
106+
if (ex.code !== 'ENOENT') {
107+
throw ex
108+
}
109+
}
104110
await copyRecursive(src, dist)
105111

106112
const highlightjsStyles = path.resolve(__dirname, '..', 'node_modules', 'highlight.js', 'styles')

0 commit comments

Comments
 (0)