Skip to content

Conversation

ScriptedAlchemy
Copy link
Member

This PR integrates the metro package into the Module Federation release pipeline and changeset system.

Changes

  • Add @module-federation/metro to fixed packages in .changeset/config.json
  • Add metro-core to changegen script in package.json
  • Add build target to metro-core/project.json
  • Create changeset for metro package integration

Benefits

  • Metro package will be included in coordinated releases
  • Changes will be tracked by the changeset system
  • Automatic version bumping synchronized with the ecosystem
  • Proper build integration in the release pipeline

- Add @module-federation/metro to fixed packages in .changeset/config.json
- Add metro-core to changegen script in package.json
- Add build target to metro-core/project.json
- Create changeset for metro package integration
Copy link

changeset-bot bot commented Sep 2, 2025

🦋 Changeset detected

Latest commit: 6efc3b6

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

This PR includes changesets to release 36 packages
Name Type
@module-federation/metro-plugin-rnc-cli Patch
@module-federation/metro-plugin-rnef Patch
@module-federation/metro Patch
@module-federation/runtime Patch
@module-federation/enhanced Patch
@module-federation/rspack Patch
@module-federation/webpack-bundler-runtime Patch
@module-federation/sdk Patch
@module-federation/runtime-tools Patch
@module-federation/managers Patch
@module-federation/manifest Patch
@module-federation/dts-plugin Patch
@module-federation/third-party-dts-extractor Patch
@module-federation/devtools Patch
@module-federation/bridge-react Patch
@module-federation/bridge-vue3 Patch
@module-federation/bridge-shared Patch
@module-federation/bridge-react-webpack-plugin Patch
@module-federation/modern-js Patch
@module-federation/retry-plugin Patch
@module-federation/data-prefetch Patch
@module-federation/rsbuild-plugin Patch
@module-federation/error-codes Patch
@module-federation/inject-external-runtime-core-plugin Patch
@module-federation/runtime-core Patch
create-module-federation Patch
@module-federation/cli Patch
@module-federation/rspress-plugin Patch
@module-federation/nextjs-mf Patch
@module-federation/node Patch
@module-federation/storybook-addon Patch
@module-federation/modernjsapp Patch
@module-federation/esbuild Patch
@module-federation/utilities Patch
remote5 Patch
website-new 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

Copy link

netlify bot commented Sep 2, 2025

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 6efc3b6
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/68b826408c711f000856fa0e
😎 Deploy Preview https://deploy-preview-4035--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.

- Update metro package tags from 'type:pkg' to 'type:metro' for separate CI handling
- Create dedicated build-metro.yml workflow for metro package builds
- Update build-and-test.yml to include metro build job after main build
- Update release.yml to build both pkg and metro tagged packages
- Ensure metro packages are properly built and tested in CI/CD pipeline
ScriptedAlchemy and others added 24 commits September 2, 2025 14:22
…ain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…le workflow

The secrets: inherit directive should only be in the calling workflow,
not in the reusable workflow definition. This was causing YAML syntax
errors that prevented the workflow from running.
…test execution

- Add missing test execution step to run E2E tests for ModernJS SSR projects
- Add cleanup step to kill processes and ports after tests complete
- Ensures workflow actually tests the applications instead of just starting them
…rkflow

- Exclude all metro packages from main build-and-test publint check
- Add dedicated publint step to build-metro workflow
- Prevents metro package build issues from blocking main CI pipeline
- Fix YAML indentation in build-and-test workflow
…cache

- Remove --skip-nx-cache flag to allow nx cache utilization for faster builds
- Keep single build command to avoid redundant builds
…g issues

- Change metro-core build executor to use cwd instead of --prefix
- Add missing build target for metro-plugin-rnef
- Prevents build failures when NX tries to pass --prefix to incompatible tools
…flow

- Add metro packages (tag:type:metro) to main build commands
- Remove separate build-metro job to avoid dependency conflicts
- Build metro dependencies first in metro workflow
- This prevents nx from trying to build workspace dependencies with wrong context
- Revert metro packages from main build workflow
- Fix metro workflow to build dependencies first individually
- Build metro packages one by one to avoid nx dependency conflicts
- Keep metro builds isolated from main package builds
…nuking cache

- Build both tag:type:pkg and tag:type:metro packages in metro workflow
- Use nx cache for faster builds (no --skip-nx-cache flag)
- This ensures metro packages and their dependencies build correctly
- Add eslint-disable comments for global var declarations (required for Metro)
- Add eslint-disable for undefined babel transform variables (replaced at build time)
- Add eslint-disable for non-null assertion where resolver is guaranteed to exist
- These are necessary Metro/Babel patterns that need to bypass standard lint rules
- Add eslint-disable comments for var declarations in TypeScript global declarations
- Configure ESLint globals for runtime JavaScript template variables
- Fix all 46 ESLint errors to allow build-metro CI job to pass

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace placeholder echo command with actual pnpm build
- This fixes the publishing compatibility check in CI

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
The e2e-modern-ssr test was failing because @module-federation/modern-js
wasn't properly linked in the workspace after building packages. Adding
pnpm install after the build step ensures all workspace dependencies
are properly linked before running tests.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
The pnpm install inside the build command could interfere with
workspace dependency resolution. Dependencies should be installed
at the workspace level, not during individual package builds.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…ects

The project.json files had incorrect paths with redundant 'modernjs-ssr-'
prefix in directory names. Fixed:
- sourceRoot paths from 'apps/modernjs-ssr/modernjs-ssr-{name}/src'
  to 'apps/modernjs-ssr/{name}/src'
- cypressConfig paths from 'apps/modernjs-ssr/modernjs-ssr-{name}/cypress.config.ts'
  to 'apps/modernjs-ssr/{name}/cypress.config.ts'

This fixes the ENOENT error in e2e-modern-ssr tests where Cypress couldn't
find the project directories.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix modernjs project.json output path configuration
- Ensure ModernJS plugin is built explicitly before SSR tests
- Use pnpm install --prefer-offline instead of --frozen-lockfile after build
- Add missing cypress.config.ts for dynamic-nested-remote app
- This ensures @module-federation/modern-js is available for SSR tests
- Add explicit verification of ModernJS plugin build in CI
- Force rebuild with --skip-nx-cache to ensure fresh build
- Add basic cypress test files for dynamic-nested-remote
- Remove prefer-offline flag as requested
…emote

The modernjs-ssr/dynamic-remote app was failing during e2e tests because
it imports from @module-federation/modern-js in its module-federation.config.ts
but didn't have it as a dependency.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Build modernjs plugin explicitly with --skip-nx-cache
- Run pnpm install after builds to ensure workspace packages are properly linked
- Remove unnecessary verification step

This ensures @module-federation/modern-js is properly available to all apps
after building.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
ScriptedAlchemy and others added 3 commits September 3, 2025 14:41
Apply suggested changes
The --prefer-offline flag can cause issues with package resolution.
Using only --frozen-lockfile ensures packages are installed correctly.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR integrates the metro package into the Module Federation release pipeline and changeset system. It also includes various code quality improvements such as ESLint rule compliance and project configuration fixes.

  • Adds metro packages to the coordinated release system via changeset configuration and build scripts
  • Implements ESLint compliance fixes across metro-core package files
  • Updates project configurations and build targets for metro packages

Reviewed Changes

Copilot reviewed 29 out of 30 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.changeset/config.json Adds @module-federation/metro to fixed packages for coordinated releases
.changeset/metro-package-integration.md Creates initial release changeset for metro package
package.json Adds metro-core to changegen script for automated changelog generation
.github/workflows/ Adds metro build workflow and updates existing workflows to include metro packages
packages/metro-*/project.json Updates project configurations with build targets and correct tags
packages/metro-core/src/ Adds ESLint disable comments for global variable declarations
packages/metro-core/.eslintrc.json Adds global variable definitions for runtime JavaScript files
apps/modernjs-ssr/ Fixes incorrect sourceRoot paths in project configurations
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

ScriptedAlchemy and others added 7 commits September 3, 2025 14:59
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add metro-plugin-rnc-cli and metro-plugin-rnef to changeset for initial release

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Updated changeset configuration and VS Code debug launch settings for metro packages

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ScriptedAlchemy ScriptedAlchemy merged commit 14e0c78 into main Sep 3, 2025
18 checks passed
@ScriptedAlchemy ScriptedAlchemy deleted the metro-ci branch September 3, 2025 11:39
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