Skip to content

Commit 742ebf7

Browse files
committed
Fix root problem
1 parent ee96e22 commit 742ebf7

File tree

6 files changed

+258
-190
lines changed

6 files changed

+258
-190
lines changed

packages/histoire-controls/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"autoprefixer": "catalog:",
6060
"concurrently": "^9.1.0",
6161
"floating-vue": "5.2.2",
62-
"jsdom": "^25.0.1",
62+
"jsdom": "^27.4.0",
6363
"postcss": "catalog:",
6464
"postcss-import": "^16.1.0",
6565
"tailwindcss": "catalog:",

packages/histoire/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"globby": "^14.0.2",
6363
"gray-matter": "^4.0.3",
6464
"jiti": "^2.4.1",
65-
"jsdom": "^25.0.1",
65+
"jsdom": "^27.4.0",
6666
"markdown-it": "^14.1.0",
6767
"markdown-it-anchor": "^9.2.0",
6868
"markdown-it-attrs": "^4.3.0",

packages/histoire/src/node/collect/run.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
import type { ServerRunPayload } from '@histoire/shared'
2-
import { atob as NodeAtob } from 'node:buffer'
32
// @ts-expect-error virtual module
43
import { collectSupportPlugins } from 'virtual:$histoire-support-plugins-collect'
54

6-
// Polyfill atob, which can hang in Node.js environments where it's not available.
7-
// See: https://github.com/histoire-dev/histoire/issues/821
8-
globalThis.atob = NodeAtob
9-
105
export async function run(payload: ServerRunPayload) {
116
const { run } = await collectSupportPlugins[payload.file.supportPluginId]()
127
const result = await run(payload)

packages/histoire/src/node/dom/dom-keys.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,7 @@ const LIVING_KEYS = [
177177
const OTHER_KEYS = [
178178
'addEventListener',
179179
'alert',
180-
'atob',
181180
'blur',
182-
'btoa',
183181
'cancelAnimationFrame',
184182
/* 'clearInterval', */
185183
/* 'clearTimeout', */

packages/histoire/src/node/dom/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function createDomEnv() {
1111
pretendToBeVisual: true,
1212
runScripts: 'dangerously',
1313
url: 'http://localhost:3000',
14-
virtualConsole: console && globalThis.console ? new VirtualConsole().sendTo(globalThis.console) : undefined,
14+
virtualConsole: console && globalThis.console ? new VirtualConsole().forwardTo(globalThis.console) : undefined,
1515
includeNodeLocations: false,
1616
contentType: 'text/html',
1717
},

0 commit comments

Comments
 (0)