diff --git a/package-lock.json b/package-lock.json index e9c588fd..fffa097b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@node-core/doc-kit", - "version": "1.3.3", + "version": "1.3.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@node-core/doc-kit", - "version": "1.3.3", + "version": "1.3.4", "dependencies": { "@actions/core": "^3.0.0", "@heroicons/react": "^2.2.0", diff --git a/package.json b/package.json index 2768520c..5d26f94c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@node-core/doc-kit", "type": "module", - "version": "1.3.3", + "version": "1.3.4", "repository": { "type": "git", "url": "git+https://github.com/nodejs/doc-kit.git" diff --git a/src/utils/highlighter.mjs b/src/utils/highlighter.mjs index 985b9c3c..9e8fb6e2 100644 --- a/src/utils/highlighter.mjs +++ b/src/utils/highlighter.mjs @@ -1,5 +1,7 @@ 'use strict'; +import { endianness } from 'node:os'; + import createHighlighter from '@node-core/rehype-shiki'; import { h as createElement } from 'hastscript'; import { SKIP, visit } from 'unist-util-visit'; @@ -40,7 +42,10 @@ export const highlighter = await createHighlighter({ // riscv64 with sv39 has limited virtual memory space, where creating // too many (>20) wasm memory instances fails. // https://github.com/nodejs/node/pull/60591 - wasm: process.arch !== 'riscv64', + // + // The wasm highlighter is currently not compatible with big endian. + // https://github.com/nodejs/node/pull/62512#issuecomment-4243469950 + wasm: process.arch !== 'riscv64' && endianness() === 'LE', }); /**