From fd7534dae75713888f2950be728746999c2ca9c6 Mon Sep 17 00:00:00 2001 From: kxxt Date: Tue, 14 Apr 2026 20:27:57 +0800 Subject: [PATCH 1/2] fix: disable wasm highlighter for big endian platforms --- src/utils/highlighter.mjs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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', }); /** From 9d222a1107b599216feef5d24810abc60ec0175c Mon Sep 17 00:00:00 2001 From: kxxt Date: Wed, 15 Apr 2026 00:02:17 +0800 Subject: [PATCH 2/2] chore: bump version to 1.3.4 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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"