diff --git a/packages/bun-framework-react/bun.lock b/packages/bun-framework-react/bun.lock index 5ec8eb60c9..f2eb864e1c 100644 --- a/packages/bun-framework-react/bun.lock +++ b/packages/bun-framework-react/bun.lock @@ -4,9 +4,9 @@ "": { "name": "bun-framework-react", "dependencies": { - "react": "^0.0.0-experimental-ef889445-20250930", - "react-dom": "^0.0.0-experimental-ef889445-20250930", - "react-refresh": "^0.0.0-experimental-ef889445-20250930", + "react": "0.0.0-experimental-a757cb76-20251002", + "react-dom": "0.0.0-experimental-a757cb76-20251002", + "react-refresh": "0.0.0-experimental-a757cb76-20251002", }, "devDependencies": { "@types/react": "^19.1.13", @@ -21,12 +21,12 @@ "csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="], - "react": ["react@0.0.0-experimental-ef889445-20250930", "", {}, "sha512-KVwhRIlvwh/FD8PVHkSlosAP9+PhHW2U63RJOteZaYgZv5OTRgXPZkKwelcWwAqcntntLjqH8LaYsTnGWOY2CQ=="], + "react": ["react@0.0.0-experimental-a757cb76-20251002", "", {}, "sha512-7ZcE4sSUGgrXgUWa84iwC9DqwDFbQBgffFmu2DoNqFseruA/JjxQDXKwpV5acdxOM/0uzfSGrapHU3C3ZLiU2g=="], - "react-dom": ["react-dom@0.0.0-experimental-ef889445-20250930", "", { "dependencies": { "scheduler": "0.0.0-experimental-ef889445-20250930" }, "peerDependencies": { "react": "0.0.0-experimental-ef889445-20250930" } }, "sha512-NxFoE259P9Ndg+M/JKTbNYdMQ0qc7DWvLrw4xsge2rOxJXxK5a+SmfAjteXJJIddSZHM/+c+hKGcaYFa3WJ2iQ=="], + "react-dom": ["react-dom@0.0.0-experimental-a757cb76-20251002", "", { "dependencies": { "scheduler": "0.0.0-experimental-a757cb76-20251002" }, "peerDependencies": { "react": "0.0.0-experimental-a757cb76-20251002" } }, "sha512-XjIkmW8mMx9kURHJUY+dhv1Ugan3RmEJIwrZEbAFcJA4S8RXL1wl+xsQJpDCh8kmeX/n25VAmFY8/j1MzqUHfA=="], - "react-refresh": ["react-refresh@0.0.0-experimental-ef889445-20250930", "", {}, "sha512-Ux3lsHvNGGJ7eknz7lqmCfrkOOKHG+2znsWISXvWGnZ5/+9YelfK0ht8lXH8fkbeHf44UG6/QrZ/zn4Vznt7sw=="], + "react-refresh": ["react-refresh@0.0.0-experimental-a757cb76-20251002", "", {}, "sha512-uYd+N2W8/LymZQyY5u1BMWVvLlBV+5SxztBsFjOGuitE4x7sSCj8TwgS+8bxIEBucEVJglfOhDPCPohL/uEQdg=="], - "scheduler": ["scheduler@0.0.0-experimental-ef889445-20250930", "", {}, "sha512-nQrKdca1hhFcnUJt4hEGd5NSzp4mJxqtUB+B6XYq+Ju5RBGqselw7+LHYkAcuxycYzhGNqQN9fVx5Qimsgi2Hg=="], + "scheduler": ["scheduler@0.0.0-experimental-a757cb76-20251002", "", {}, "sha512-YCVGuzmF7u5HIpOdPFD4tZTPzQlOrtViag7uaWjJXfFx37C8sypfNeSXNXoYJeT/ICybxP1EsbHh2oByQHC2Cg=="], } } diff --git a/packages/bun-framework-react/package.json b/packages/bun-framework-react/package.json index 93ad464ba9..3c0ffac09e 100644 --- a/packages/bun-framework-react/package.json +++ b/packages/bun-framework-react/package.json @@ -1,6 +1,6 @@ { "name": "bun-framework-react", - "version": "0.0.0-canary.8", + "version": "0.0.0-canary.10", "devDependencies": { "@types/react": "^19.1.13", "@types/react-dom": "^19.1.9" @@ -29,8 +29,8 @@ ], "type": "module", "dependencies": { - "react": "^0.0.0-experimental-ef889445-20250930", - "react-dom": "^0.0.0-experimental-ef889445-20250930", - "react-refresh": "^0.0.0-experimental-ef889445-20250930" + "react": "0.0.0-experimental-a757cb76-20251002", + "react-dom": "0.0.0-experimental-a757cb76-20251002", + "react-refresh": "0.0.0-experimental-a757cb76-20251002" } } diff --git a/test/bake/bake-harness.ts b/test/bake/bake-harness.ts index 4f3dd697be..abd47b7bc5 100644 --- a/test/bake/bake-harness.ts +++ b/test/bake/bake-harness.ts @@ -11,7 +11,7 @@ import { $, BunFile, Subprocess } from "bun"; import * as Bake from "bun:app"; import { expect, Matchers } from "bun:test"; -import { bunEnv, bunExe, isASAN, isCI, isWindows, mergeWindowEnvs, runBunInstall, tempDirWithFiles } from "harness"; +import { bunEnv, isASAN, isCI, isWindows, mergeWindowEnvs, tempDirWithFiles } from "harness"; import assert from "node:assert"; import { EventEmitter } from "node:events"; import fs, { readFileSync, realpathSync } from "node:fs"; @@ -1400,8 +1400,10 @@ async function installReactWithCache(root: string) { } } } else { - // Install fresh and populate cache - await Bun.$`${bunExe()} i react@experimental react-dom@experimental react-server-dom-bun react-refresh@experimental && ${bunExe()} install` + await Bun.$` + cd ${bunFrameworkReactProjectRoot} && bun pm pack --filename=bun-framework-react.tgz + cd ${root} && bun add bun-framework-react@${bunFrameworkReactProjectRoot}/bun-framework-react.tgz + ` .cwd(root) .env({ ...bunEnv }) .throws(true); @@ -1686,15 +1688,10 @@ export function indexHtmlScript(htmlFiles: string[]) { const skipTargets = [process.platform, isCI ? "ci" : null].filter(Boolean); -function testImpl( - description: string, - options: T, - NODE_ENV: "development" | "production", - caller: string, -): T { +function testImpl(description: string, options: DevServerTest, NODE_ENV: "development" | "production", caller: string) { if (interactive) return options; - const jest = (Bun as any).jest(caller); + const jest = Bun.jest(caller); const basename = path.basename(caller, ".test" + path.extname(caller)); const count = (counts[basename] = (counts[basename] ?? 0) + 1); @@ -1727,12 +1724,6 @@ function testImpl( if (runInstall) { // await copyCachedReactDeps(root); await installReactWithCache(root); - - // Also ensure bun-framework-react has its dependencies installed - const frameworkDir = path.join(__dirname, "../../packages/bun-framework-react"); - if (!fs.existsSync(path.join(frameworkDir, "node_modules"))) { - await runBunInstall(bunEnv, frameworkDir, { allowWarnings: true }); - } } if (options.files["bun.app.ts"] == undefined && htmlFiles.length === 0) { if (!options.framework) { @@ -1795,7 +1786,7 @@ function testImpl( fs.writeFileSync( path.join(root, "harness_start.ts"), dedent` - import appConfig from ${JSON.stringify(path.join(mainDir, "bun.app.ts"))}; + import appConfig from "./bun.app.ts"; import { fullGC } from "bun:jsc"; const routes = appConfig.static ?? (appConfig.routes ??= {}); @@ -2030,7 +2021,7 @@ process.on("exit", () => { } }); -export function devTest(description: string, options: T): T { +export function devTest(description: string, options: DevServerTest) { // Capture the caller name as part of the test tempdir const callerLocation = snapshotCallerLocation(); const caller = stackTraceFileName(callerLocation);