Skip to content

Commit c10a17a

Browse files
committed
fix: remove jsdom to allow seamless packaging
1 parent 1342ab5 commit c10a17a

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

frontend/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@plutojl/rainbow",
3-
"version": "0.6.11",
3+
"version": "0.6.12",
44
"description": "TypeScript/JavaScript API for programmatically interacting with Pluto notebooks",
55
"type": "module",
66
"main": "dist/standalone/index.js",
@@ -56,13 +56,11 @@
5656
"@rollup/plugin-json": "^6.1.0",
5757
"@rollup/plugin-node-resolve": "^15.2.3",
5858
"@rollup/plugin-typescript": "^12.1.4",
59-
"@types/jsdom": "^21.1.7",
6059
"@types/lodash-es": "^4.17.6",
6160
"@types/node": "^20.11.0",
6261
"@types/react": "^19.1.10",
6362
"@types/ws": "^8.18.1",
6463
"@web/rollup-plugin-copy": "^0.5.1",
65-
"jsdom": "^26.1.0",
6664
"memfs": "^4.36.0",
6765
"path-browserify": "^1.0.1",
6866
"rollup": "^4.46.2",
@@ -98,6 +96,7 @@
9896
"dependencies": {
9997
"@observablehq/stdlib": "^3.3.1",
10098
"immer": "^10.1.1",
99+
"linkedom": "^0.18.12",
101100
"lodash-es": "^4.17.21",
102101
"msgpack-lite": "github:fonsp/msgpack-lite#0.1.27-es.1",
103102
"requestidlecallback-polyfill": "^1.0.2",

frontend/standalone/integrations/node-polyfill.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
*/
77

88
import { webcrypto } from "crypto"
9+
import { parseHTML } from "linkedom"
910
import { WebSocket as NodeWebSocket } from "ws"
10-
import { JSDOM } from "jsdom"
1111

12-
const dom = new JSDOM("<!DOCTYPE html><html><body></body></html>", {
13-
url: "http://localhost:1234",
14-
pretendToBeVisual: true,
15-
})
12+
// Simplified way for HTML
13+
const dom = parseHTML(`
14+
<!doctype html>
15+
<html lang="en">
16+
</html>
17+
`)
1618

1719
// Copy jsdom globals to Node.js global scope
1820
Object.assign(global, {

0 commit comments

Comments
 (0)