Skip to content

feat(metro): add metro-plugin-rock and migrate examples to Rock#4652

Open
jbroma wants to merge 16 commits intomodule-federation:mainfrom
jbroma:refactor/plugin-rock-migration
Open

feat(metro): add metro-plugin-rock and migrate examples to Rock#4652
jbroma wants to merge 16 commits intomodule-federation:mainfrom
jbroma:refactor/plugin-rock-migration

Conversation

@jbroma
Copy link
Copy Markdown
Member

@jbroma jbroma commented Apr 10, 2026

Description

RNEF was renamed to Rock by Callstack. This PR adds @module-federation/metro-plugin-rock as the new primary package, deprecates metro-plugin-rnef, and migrates all metro example apps, CI, and docs to use Rock tooling.

Changes

New package — metro-plugin-rock

  • Targets @rock-js/* (v0.13.0) and rock CLI
  • Added to changeset fixed version group

Deprecation — metro-plugin-rnef

  • Deprecation notice in README and package description
  • Patch changeset

Example app migration

  • metro-example-host, metro-example-mini, metro-example-nested-mini migrated from @rnef/* to @rock-js/*
  • Updated native build files (Podfile, settings.gradle, build.gradle, project.pbxproj)
  • rock.config.mjs uses providerGitHub() from @rock-js/provider-github (non-deprecated remote cache API)

CI

  • e2e-metro.yml: bumped callstackincubator/{android,ios} from @v1 to latest @v3
  • Added NO_COLOR=1 env var to e2e jobs
  • Updated run-metro-e2e.mjs script (rnef → rock references)

Docs

  • Updated metro plugin docs (EN + ZH) with Rock integration guide and RNEF migration note

Related Issue

RNEF → Rock rename by Callstack (npm scope @rnef/*@rock-js/*, CLI rnefrock)

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the documentation.

jbroma added 2 commits April 10, 2026 12:25
RNEF has been renamed to Rock (ROCKjs). This adds a new
@module-federation/metro-plugin-rock package targeting @rock-js/tools
and @rock-js/config, while keeping metro-plugin-rnef published for
backward compatibility with a deprecation notice.
Migrate all three metro example apps (host, mini, nested-mini) from
@rnef/* packages to @rock-js/* (v0.13.0). Update native build files,
e2e scripts, and CI workflow to use Rock tooling and actions v3.
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 10, 2026

🦋 Changeset detected

Latest commit: 150ea0e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 46 packages
Name Type
@module-federation/metro-plugin-rock Major
@module-federation/metro-plugin-rnef Major
@module-federation/runtime Major
@module-federation/enhanced Major
@module-federation/rspack Major
@module-federation/webpack-bundler-runtime Major
@module-federation/sdk Major
@module-federation/runtime-tools Major
@module-federation/managers Major
@module-federation/manifest Major
@module-federation/dts-plugin Major
@module-federation/third-party-dts-extractor Major
@module-federation/devtools Major
@module-federation/bridge-react Major
@module-federation/bridge-vue3 Major
@module-federation/bridge-shared Major
@module-federation/bridge-react-webpack-plugin Major
@module-federation/modern-js Major
@module-federation/modern-js-v3 Major
@module-federation/retry-plugin Major
@module-federation/data-prefetch Major
@module-federation/rsbuild-plugin Major
@module-federation/error-codes Major
@module-federation/inject-external-runtime-core-plugin Major
@module-federation/runtime-core Major
create-module-federation Major
@module-federation/cli Major
@module-federation/rspress-plugin Major
@module-federation/treeshake-server Major
@module-federation/treeshake-frontend Major
@module-federation/metro Major
@module-federation/metro-plugin-rnc-cli Major
@module-federation/esbuild Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/storybook-addon Major
shared-tree-shaking-no-server-host Patch
shared-tree-shaking-no-server-provider Patch
@module-federation/utilities Patch
remote5 Patch
remote6 Patch
shared-tree-shaking-with-server-host Patch
shared-tree-shaking-with-server-provider Patch
website-new Patch
node-dynamic-remote-new-version Patch
node-dynamic-remote Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 10, 2026

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 150ea0e
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/69dd436a3291cb0008ab13fa
😎 Deploy Preview https://deploy-preview-4652--module-federation-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jbroma jbroma changed the title refactor(metro): migrate metro-plugin-rnef to metro-plugin-rock (ROCKjs) feat(metro): add metro-plugin-rock and migrate examples to ROCKjs Apr 10, 2026
@jbroma jbroma changed the title feat(metro): add metro-plugin-rock and migrate examples to ROCKjs feat(metro): add metro-plugin-rock and migrate examples to Rock Apr 10, 2026
@jbroma jbroma marked this pull request as ready for review April 10, 2026 11:12
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 10, 2026

Open in StackBlitz

@module-federation/devtools

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/devtools@150ea0e

@module-federation/cli

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/cli@150ea0e

create-module-federation

pnpm add https://pkg.pr.new/module-federation/core/create-module-federation@150ea0e

@module-federation/data-prefetch

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/data-prefetch@150ea0e

@module-federation/dts-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/dts-plugin@150ea0e

@module-federation/enhanced

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/enhanced@150ea0e

@module-federation/error-codes

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/error-codes@150ea0e

@module-federation/esbuild

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/esbuild@150ea0e

@module-federation/managers

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/managers@150ea0e

@module-federation/manifest

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/manifest@150ea0e

@module-federation/metro

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/metro@150ea0e

@module-federation/metro-plugin-rnc-cli

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/metro-plugin-rnc-cli@150ea0e

@module-federation/metro-plugin-rnef

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/metro-plugin-rnef@150ea0e

@module-federation/metro-plugin-rock

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/metro-plugin-rock@150ea0e

@module-federation/modern-js

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/modern-js@150ea0e

@module-federation/modern-js-v3

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/modern-js-v3@150ea0e

@module-federation/native-federation-tests

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/native-federation-tests@150ea0e

@module-federation/native-federation-typescript

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/native-federation-typescript@150ea0e

@module-federation/nextjs-mf

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/nextjs-mf@150ea0e

@module-federation/node

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/node@150ea0e

@module-federation/retry-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/retry-plugin@150ea0e

@module-federation/rsbuild-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/rsbuild-plugin@150ea0e

@module-federation/rspack

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/rspack@150ea0e

@module-federation/rspress-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/rspress-plugin@150ea0e

@module-federation/runtime

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/runtime@150ea0e

@module-federation/runtime-core

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/runtime-core@150ea0e

@module-federation/runtime-tools

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/runtime-tools@150ea0e

@module-federation/sdk

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/sdk@150ea0e

@module-federation/storybook-addon

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/storybook-addon@150ea0e

@module-federation/third-party-dts-extractor

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/third-party-dts-extractor@150ea0e

@module-federation/treeshake-frontend

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/treeshake-frontend@150ea0e

@module-federation/treeshake-server

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/treeshake-server@150ea0e

@module-federation/typescript

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/typescript@150ea0e

@module-federation/utilities

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/utilities@150ea0e

@module-federation/webpack-bundler-runtime

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/webpack-bundler-runtime@150ea0e

@module-federation/bridge-react

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/bridge-react@150ea0e

@module-federation/bridge-react-webpack-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/bridge-react-webpack-plugin@150ea0e

@module-federation/bridge-shared

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/bridge-shared@150ea0e

@module-federation/bridge-vue3

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/bridge-vue3@150ea0e

@module-federation/inject-external-runtime-core-plugin

pnpm add https://pkg.pr.new/module-federation/core/@module-federation/inject-external-runtime-core-plugin@150ea0e

commit: 150ea0e

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

Bundle Size Report

11 package(s) changed, 30 unchanged.

Package dist + ESM entry

Package Total dist (raw) Delta ESM gzip Delta
@module-federation/cli 26.3 kB no change 786 B no change
@module-federation/core 39.1 kB no change 173 B no change
@module-federation/devtools 481.4 kB no change 3.9 kB no change
@module-federation/enhanced 813.5 kB no change 672 B no change
@module-federation/managers 69.8 kB no change 334 B no change
@module-federation/manifest 138.0 kB no change 182 B no change
@module-federation/metro-plugin-rnc-cli 0 B no change 314 B no change
@module-federation/metro-plugin-rock 8.5 kB +8.5 kB (+∞%) 111 B +111 B (+∞%)
@module-federation/node 189.1 kB no change 217 B no change
@module-federation/storybook-addon 77.5 kB no change 100 B no change
@module-federation/utilities 110.6 kB no change 328 B no change

Bundle targets

Package Web bundle (gzip) Delta Node bundle (gzip) Delta
@module-federation/cli 2.3 kB -32 B (-1.3%) 2.3 kB -32 B (-1.3%)
@module-federation/core 1.1 kB -32 B (-2.9%) 1.0 kB -31 B (-2.9%)
@module-federation/devtools 21.3 kB -26 B (-0.1%) 21.3 kB -26 B (-0.1%)
@module-federation/enhanced 2.6 kB -44 B (-1.6%) 2.6 kB -44 B (-1.6%)
@module-federation/managers 2.4 kB -27 B (-1.1%) 2.4 kB -27 B (-1.1%)
@module-federation/manifest 6.2 kB -38 B (-0.6%) 6.2 kB -38 B (-0.6%)
@module-federation/metro-plugin-rnc-cli 411 B -26 B (-5.9%) 411 B -26 B (-5.9%)
@module-federation/metro-plugin-rock 599 B +599 B (+∞%) 599 B +599 B (+∞%)
@module-federation/node 9.2 kB -28 B (-0.3%) 9.2 kB -28 B (-0.3%)
@module-federation/storybook-addon 1.9 kB -23 B (-1.2%) 1.7 kB -22 B (-1.2%)
@module-federation/utilities 2.6 kB -31 B (-1.2%) 2.6 kB -31 B (-1.2%)

Consumer scenarios

Scenario Web output (gzip) Delta Node output (gzip) Delta Gap (node-web) Delta
Enhanced remoteEntry 19.8 kB -17 B (-0.1%) 20.8 kB -15 B (-0.1%) +1.0 kB +2 B

Total dist (raw): 6.32 MB (+8.5 kB (+0.1%))
Total ESM gzip: 74.0 kB (+111 B (+0.1%))
Total web bundle (gzip): 180.0 kB (+292 B (+0.2%))
Total node bundle (gzip): 180.5 kB (+294 B (+0.2%))
Tracked ./bundler entry gzip: 556 B (no change)
Tracked ./bundler web bundle (gzip): 4.8 kB (no change)
Tracked ./bundler node bundle (gzip): 4.8 kB (no change)

Bundle sizes are generated with rslib (Rspack). Package-root metrics preserve the historical report. Tracked subpath exports such as ./bundler are measured separately so ENV_TARGET-driven tree-shaking is visible. Bare imports are externalized to keep package-level sizes consistent, and assets are emitted as resources.

jbroma added 2 commits April 10, 2026 13:39
The 'github-actions' shorthand for remoteCacheProvider emits a
deprecation warning with ANSI codes that corrupts $GITHUB_ENV
inside the Rock CI actions, breaking both Android and iOS e2e jobs.
Fork callstackincubator/{android,ios}@V3 into .github/actions/ with
working-directory propagated to all composite steps. The upstream
actions miss it on cache-related steps, causing rock.config.mjs
lookup failures when the app is not at the repo root.

Also switch rock.config.mjs to use providerGitHub() (non-deprecated)
from @rock-js/provider-github and add NO_COLOR=1 to e2e jobs.
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bdea246de4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/actions/rock-ios/action.yml Outdated
Comment thread .github/actions/rock-android/action.yml Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0e6ad09eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/e2e-metro.yml Outdated
Comment thread .github/workflows/e2e-metro.yml Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant