From 1f1729ac0d759c3d9b0756182364ffc255a46d53 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Thu, 12 Sep 2024 11:21:37 +0200 Subject: [PATCH] fix(metro-service): add RAM bundle deprecation warning --- .changeset/cold-eggs-poke.md | 8 ++++++++ packages/metro-service/src/ramBundle.ts | 5 +++++ 2 files changed, 13 insertions(+) create mode 100644 .changeset/cold-eggs-poke.md diff --git a/.changeset/cold-eggs-poke.md b/.changeset/cold-eggs-poke.md new file mode 100644 index 000000000..01beecad5 --- /dev/null +++ b/.changeset/cold-eggs-poke.md @@ -0,0 +1,8 @@ +--- +"@rnx-kit/metro-service": patch +--- + +RAM bundle is deprecated and was removed in 0.75. This command may stop working +altogether in the future. + +For more details, see https://github.com/facebook/react-native/pull/43292. diff --git a/packages/metro-service/src/ramBundle.ts b/packages/metro-service/src/ramBundle.ts index 6f831e548..74dd8715d 100644 --- a/packages/metro-service/src/ramBundle.ts +++ b/packages/metro-service/src/ramBundle.ts @@ -1,3 +1,4 @@ +import { warn } from "@rnx-kit/console"; import type { ConfigT } from "metro-config"; import * as path from "path"; import type { BundleArgs } from "./bundle"; @@ -5,6 +6,10 @@ import { bundle } from "./bundle"; import { requireMetroPath } from "./metro"; export function ramBundle(args: BundleArgs, config: ConfigT): Promise { + warn( + "RAM bundle is deprecated and was removed in 0.75; for more details, see https://github.com/facebook/react-native/pull/43292" + ); + const ramBundlePath = path.join( requireMetroPath(config.projectRoot), "src",