mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
changes
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
"workspaces": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"react": "^0.0.0-experimental-e2332183-20250924",
|
||||
"react-dom": "^0.0.0-experimental-e2332183-20250924",
|
||||
"react-refresh": "^0.0.0-experimental-e2332183-20250924",
|
||||
"react": "0.0.0-experimental-e2332183-20250924",
|
||||
"react-dom": "0.0.0-experimental-e2332183-20250924",
|
||||
"react-refresh": "0.0.0-experimental-e2332183-20250924",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.1.13",
|
||||
|
||||
@@ -69,6 +69,12 @@ const initialRscPayload: Promise<NonNullishReactNode> =
|
||||
}),
|
||||
);
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
__bun_f: Array<string | Uint8Array<ArrayBuffer>>;
|
||||
}
|
||||
}
|
||||
|
||||
const appStore: Store<AppState> = store<AppState>({
|
||||
rsc: initialRscPayload,
|
||||
});
|
||||
|
||||
12
src/bake.zig
12
src/bake.zig
@@ -294,7 +294,7 @@ pub const Framework = struct {
|
||||
/// the above react configuration.
|
||||
/// The provided allocator is not stored.
|
||||
pub fn auto(
|
||||
arena: std.mem.Allocator,
|
||||
_: std.mem.Allocator,
|
||||
resolver: *bun.resolver.Resolver,
|
||||
file_system_router_types: []FileSystemRouterType,
|
||||
) !Framework {
|
||||
@@ -313,16 +313,6 @@ pub const Framework = struct {
|
||||
|
||||
if (resolveOrNull(resolver, "react-refresh/runtime")) |rfr| {
|
||||
fw.react_fast_refresh = .{ .import_source = rfr };
|
||||
} else if (resolveOrNull(resolver, "react")) |_| {
|
||||
fw.react_fast_refresh = .{ .import_source = "react-refresh/runtime/index.js" };
|
||||
try fw.built_in_modules.put(
|
||||
arena,
|
||||
"react-refresh/runtime/index.js",
|
||||
if (Environment.codegen_embed)
|
||||
.{ .code = @embedFile("node-fallbacks/react-refresh.js") }
|
||||
else
|
||||
.{ .code = bun.runtimeEmbedFile(.codegen, "node-fallbacks/react-refresh.js") },
|
||||
);
|
||||
}
|
||||
|
||||
return fw;
|
||||
|
||||
4
src/bake/bake.private.d.ts
vendored
4
src/bake/bake.private.d.ts
vendored
@@ -80,10 +80,6 @@ declare var IS_BUN_DEVELOPMENT: unknown;
|
||||
/** If this is the fallback error page */
|
||||
declare const IS_ERROR_RUNTIME: boolean;
|
||||
|
||||
interface Window {
|
||||
__bun_f: Array<string | Uint8Array<ArrayBuffer>>;
|
||||
}
|
||||
|
||||
declare module "react-dom/server.node" {
|
||||
export * from "react-dom/server";
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import { Matchers } from "bun:test";
|
||||
import { EventEmitter } from "node:events";
|
||||
// @ts-ignore
|
||||
import { dedent } from "../bundler/expectBundled.ts";
|
||||
import { bunEnv, bunExe, isCI, isWindows, mergeWindowEnvs, tempDirWithFiles } from "harness";
|
||||
import { bunEnv, bunExe, isCI, isWindows, mergeWindowEnvs, tempDirWithFiles, runBunInstall } from "harness";
|
||||
import { expect } from "bun:test";
|
||||
import { exitCodeMapStrings } from "./exit-code-map.mjs";
|
||||
|
||||
@@ -1722,6 +1722,12 @@ function testImpl<T extends DevServerTest>(
|
||||
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);
|
||||
}
|
||||
}
|
||||
if (options.files["bun.app.ts"] == undefined && htmlFiles.length === 0) {
|
||||
if (!options.framework) {
|
||||
|
||||
Reference in New Issue
Block a user