feat(runtime-core): introduce Effect-based runtime with structural consolidation#4339
Closed
ScriptedAlchemy wants to merge 47 commits intomainfrom
Closed
feat(runtime-core): introduce Effect-based runtime with structural consolidation#4339ScriptedAlchemy wants to merge 47 commits intomainfrom
ScriptedAlchemy wants to merge 47 commits intomainfrom
Conversation
- Fix catch_ dual-form detection to use 'pipe' instead of '_tag' for robust MFEffect detection - Remove unused _extraOptions parameter from getManifestJsonEffect - Remove noop .then((res) => res) in SnapshotHandler manifest loading - Restore domain comments across module, remote, shared, and snapshot files - Add vitest test suite for micro-effect package (18 test cases) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…uce bundle size Consolidate runtime-core source by ~400 LOC across 6 phases: - Collapse 6 hook files into single unified Hook class with typed subclasses - Extract attachLinks/attachScripts helpers in preload, replacing 4 duplicate blocks - Deduplicate share loading with resolveRegistered/loadFoundAsync/loadNotFoundAsync helpers - Convert module Effect programs to private class methods, inline defineModuleId - Merge 3 global init functions into single initGlobalFederation - Tighten semver parser (parseHyphen/parseCarets) and extract buildAtom in satisfy ESM bundle: 134,880 → 128,738 bytes (-4.6%), gzipped: 26,823 → 25,840 (-3.7%) All 182 tests pass (micro-effect: 31, runtime-core: 61, runtime: 90). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 4ff3e8a The changes in this PR will be included in the next version bump. This PR includes changesets to release 44 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 failed. Why did it fail? →
|
Phase 6: Move Effect programs from Module to RemoteHandler, inline createRemoteEntryInitOptions, simplify wraperFactory with tag helper. Module reduced from 283 to 75 LOC as a thin delegate. Delete unused semver re-export stubs (constants.ts, utils.ts, compare.ts). All 182 tests pass (micro-effect:31, runtime-core:61, runtime:90). ESM bundle: 121,753 bytes (was 128,738, -5.4%). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…OC reduction) Reduce runtime-core source from 5,332 to 4,266 LOC (1,066 lines, ~20%) across all 6 consolidation phases while preserving public API and all 182 tests: - Phase 1: Snapshot/preload unification — compact walkSnapshot, collectModuleAssets, collectLoadedSharedAssets, resolvePreloadConfig helpers - Phase 2: Remote pipeline compression — collapse _getModule, compact registerRemote, removeRemote, preloadRemoteEffect, loadRemote, getRemoteModuleAndOptions - Phase 3: Share resolution simplification — merge loadFoundAsync/loadNotFoundAsync into loadSharedAsync, compact formatShare, setShared, initializeSharing, getTargetSharedOptions - Phase 4: Hook system compression — compact emit strategies, applyPlugin, removePlugin - Phase 5: Core/global/helpers folding — typeof inference for interfaces, compact matchRemote, formatOptions, initGlobalFederation, processModuleAlias - Phase 6: Misc tightening — compact parseXRanges, remove unused hooks, tighten error recovery in load.ts and SnapshotHandler.ts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
# Conflicts: # packages/runtime-core/src/module/index.ts # pnpm-lock.yaml # scripts/bundle-size-report.mjs
Contributor
Bundle Size Report21 package(s) changed, 21 unchanged.
Total dist: 4.87 MB (-359924 B (-6.6%)) |
# Conflicts: # pnpm-lock.yaml
# Conflicts: # pnpm-lock.yaml
raven-actions/actionlint@v2 runs npm install internally which fails on pnpm workspace repos due to workspace:* protocol. Switch to direct binary download which has no npm dependency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # pnpm-lock.yaml
# Conflicts: # .github/actions/android-e2e/action.yaml # .github/actions/ios-e2e/action.yaml # .github/workflows/e2e-metro.yml # packages/cli/rslib.config.ts # packages/data-prefetch/rslib.config.ts # packages/managers/rslib.config.ts # packages/manifest/rslib.config.ts # packages/rspack/rslib.config.ts # pnpm-lock.yaml
# Conflicts: # apps/metro-example-host/ios/Podfile.lock # packages/metro-core/src/plugin/serializer.ts # packages/metro-core/tsconfig.json # pnpm-lock.yaml
Update pnpm-lock.yaml to match package manifest changes on this branch. This restores frozen-lockfile installs in GitHub Actions. Co-authored-by: Cursor <cursoragent@cursor.com>
Correct sdk/error-codes/managers entrypoints and update RawSource usage so dts-plugin TYPE-001 and module resolution failures are eliminated. Co-authored-by: Cursor <cursoragent@cursor.com>
Restore sdk and error-codes package entrypoints to match emitted dist files and keep lockfile metadata in sync after install checks on this branch. Co-authored-by: Cursor <cursoragent@cursor.com>
Cast pluginPublint in utilities rslib config so CI builds do not fail when mixed rsbuild versions produce incompatible plugin type signatures. Co-authored-by: Cursor <cursoragent@cursor.com>
@module-federation/devtools
@module-federation/cli
create-module-federation
@module-federation/data-prefetch
@module-federation/dts-plugin
@module-federation/enhanced
@module-federation/error-codes
@module-federation/managers
@module-federation/manifest
@module-federation/metro
@module-federation/metro-plugin-rnc-cli
@module-federation/metro-plugin-rnef
@module-federation/micro-effect
@module-federation/modern-js-v3
@module-federation/retry-plugin
@module-federation/rsbuild-plugin
@module-federation/rspack
@module-federation/rspress-plugin
@module-federation/runtime
@module-federation/runtime-core
@module-federation/runtime-tools
@module-federation/sdk
@module-federation/third-party-dts-extractor
@module-federation/treeshake-frontend
@module-federation/treeshake-server
@module-federation/webpack-bundler-runtime
@module-federation/bridge-react
@module-federation/bridge-react-webpack-plugin
@module-federation/bridge-shared
@module-federation/bridge-vue3
@module-federation/inject-external-runtime-core-plugin
commit: |
Co-authored-by: Cursor <cursoragent@cursor.com>
# Conflicts: # pnpm-lock.yaml
# Conflicts: # packages/runtime-core/src/module/index.ts
# Conflicts: # packages/runtime-core/src/utils/load.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changed Packages
@module-federation/cli@module-federation/data-prefetch@module-federation/devtools@module-federation/dts-plugin@module-federation/enhanced@module-federation/error-codes@module-federation/esbuild@module-federation/inject-external-runtime-core-plugin@module-federation/managers@module-federation/manifest@module-federation/metro@module-federation/micro-effect@module-federation/nextjs-mf@module-federation/retry-plugin@module-federation/rsbuild-plugin@module-federation/rspack@module-federation/rspress-plugin@module-federation/runtime@module-federation/runtime-core@module-federation/runtime-tools@module-federation/sdk@module-federation/utilities@module-federation/webpack-bundler-runtimeChangesets
.changeset/effect-runtime-consolidation.md.changeset/config.json(changeset tooling config update)Base
mainSingle-PR Review Guide (No Additional PRs)
This PR will remain a single PR. Improvements are being done in-place (no stacked or follow-up PR splitting).
Suggested Review Order
In-Place Scope Trim Checklist