Skip to content

Commit 7f17905

Browse files
committed
fix(app): dedupe react for gridland tui
1 parent 521b1af commit 7f17905

3 files changed

Lines changed: 28 additions & 10 deletions

File tree

bun.lock

Lines changed: 5 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161
"node-pty",
6262
"unrs-resolver"
6363
],
64+
"overrides": {
65+
"react": "19.2.7"
66+
},
6467
"repository": {
6568
"type": "git",
6669
"url": "git+https://github.com/ProverCoderAI/docker-git.git"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import * as fs from "node:fs"
2+
import { createRequire } from "node:module"
3+
import path from "node:path"
4+
import { fileURLToPath } from "node:url"
5+
6+
import { describe, expect, it } from "@effect/vitest"
7+
8+
const currentDir = path.dirname(fileURLToPath(import.meta.url))
9+
const appRequire = createRequire(import.meta.url)
10+
const appReactEntry = appRequire.resolve("react")
11+
const gridlandEntry = fs.realpathSync(
12+
path.join(currentDir, "../../node_modules/@gridland/bun/dist/index.js")
13+
)
14+
const gridlandRequire = createRequire(gridlandEntry)
15+
16+
describe("Gridland React singleton contract", () => {
17+
it("resolves the app and Gridland renderer to the same React module", () => {
18+
expect(gridlandRequire.resolve("react")).toBe(appReactEntry)
19+
})
20+
})

0 commit comments

Comments
 (0)