-
-
Notifications
You must be signed in to change notification settings - Fork 373
feat: integrate metro package into release pipeline and changesets #4035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 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
🦋 Changeset detectedLatest commit: 6efc3b6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
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 |
✅ Deploy Preview for module-federation-docs ready!
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
…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>
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>
There was a problem hiding this 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.
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>
This PR integrates the metro package into the Module Federation release pipeline and changeset system.
Changes
Benefits