Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Mar 3, 2024
1 parent b62fa00 commit 53fce6f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ export async function createStarryNight(grammars, options) {
* `vscode-oniguruma`.
*/
async function createOniguruma(options) {
const wasmBin = await getOniguruma(options || undefined)
await vscodeOniguruma.loadWASM(wasmBin)
const wasmBinary = await getOniguruma(options || undefined)
await vscodeOniguruma.loadWASM(wasmBinary)
return vscodeOniguruma
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"@types/json-stable-stringify": "^1.0.0",
"@types/mdast": "^4.0.0",
"@types/node": "^20.0.0",
"c8": "^8.0.0",
"c8": "^9.0.0",
"css": "^3.0.0",
"generate-github-markdown-css": "^6.0.0",
"hast-util-to-html": "^9.0.0",
Expand All @@ -75,7 +75,7 @@
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"unist-builder": "^4.0.0",
"xo": "^0.56.0",
"xo": "^0.57.0",
"yaml": "^2.0.0"
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions script/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,10 @@ const ruleSchema = {
const grammarsBase = new URL('grammars/', gemBase)
const grammarBasenames = await fs.readdir(grammarsBase)
const scopes = grammarBasenames.flatMap(function (d) {
const ext = path.extname(d)
const extension = path.extname(d)

if (ext === '.json') {
return path.basename(d, ext)
if (extension === '.json') {
return path.basename(d, extension)
}

assert(d === 'version', d)
Expand Down
10 changes: 5 additions & 5 deletions script/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,19 +128,19 @@ for (const fileName of fileNames) {
const lightCss = light ? themeMap.get(light) : undefined
const darkCss = dark ? themeMap.get(dark) : undefined
/** @type {Array<string>} */
const doc = []
const document = []

if (lightCss && darkCss) {
doc.push(
document.push(
lightCss,
'@media (prefers-color-scheme: dark) {\n' + darkCss + '\n}'
)
} else {
doc.push(lightCss || darkCss || '')
document.push(lightCss || darkCss || '')
}

for (const rule of selectorsMap.values()) {
doc.push(rule)
document.push(rule)
}

writePromises.push(
Expand All @@ -150,7 +150,7 @@ for (const fileName of fileNames) {
'/* This is a theme distributed by `starry-night`.\n' +
' * It’s based on what GitHub uses on their site.\n' +
' * See <https://github.com/wooorm/starry-night> for more info. */' +
doc.join('\n\n'),
document.join('\n\n'),
{...prettierConfig, parser: 'css'}
)
)
Expand Down
4 changes: 2 additions & 2 deletions script/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {common, createStarryNight} from '../index.js'

const highlighter = await createStarryNight(common)

const doc = `<!doctype html>
const document = `<!doctype html>
<html lang=en>
<title>Example</title>
<link rel="stylesheet" href="https://esm.sh/github-markdown-css/github-markdown.css">
Expand Down Expand Up @@ -49,7 +49,7 @@ console.log(tree)`,
</html>
`

fs.writeFile(new URL('../media/preview.html', import.meta.url), doc)
fs.writeFile(new URL('../media/preview.html', import.meta.url), document)

/**
* @param {string} value
Expand Down

0 comments on commit 53fce6f

Please sign in to comment.