Skip to content

abandoned#4676

Closed
2heal1 wants to merge 8 commits into
module-federation:mainfrom
2heal1:feat/proxy-debug-sdk
Closed

abandoned#4676
2heal1 wants to merge 8 commits into
module-federation:mainfrom
2heal1:feat/proxy-debug-sdk

Conversation

@2heal1

@2heal1 2heal1 commented Apr 21, 2026

Copy link
Copy Markdown
Member

Description

Related Issue

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • 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.

2heal1 and others added 2 commits April 17, 2026 10:44
Add npm publish file lists for bridge packages to avoid shipping __tests__ and test fixtures.
Extract proxy debug functionality from `chrome-devtools` into the core `sdk` package.
This move allows for:
- Standalone usage of the proxy debug logic without full DevTools dependency.
- More robust unit tests for proxy runtime and storage behaviors.
- Consistent proxy implementation across different debugging environments.

Modified packages:
- `packages/chrome-devtools`: updated to consume the new SDK-based proxy logic.
- `packages/sdk`: integrated the proxy implementation and added tests.

Co-Authored-By: Aime <aime@bytedance.com>
Change-Id: I71a2c4a75fd0611b4a313c917d315a652f55e402
@changeset-bot

changeset-bot Bot commented Apr 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1e1b345

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

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

netlify Bot commented Apr 21, 2026

Copy link
Copy Markdown

Deploy Preview for module-federation-docs ready!

Name Link
🔨 Latest commit 1e1b345
🔍 Latest deploy log https://app.netlify.com/projects/module-federation-docs/deploys/69e75bc10e91ff0008f51688
😎 Deploy Preview https://deploy-preview-4676--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.

@pkg-pr-new

pkg-pr-new Bot commented Apr 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

@module-federation/devtools

pnpm add https://pkg.pr.new/@module-federation/devtools@1e1b345

@module-federation/cli

pnpm add https://pkg.pr.new/@module-federation/cli@1e1b345

create-module-federation

pnpm add https://pkg.pr.new/create-module-federation@1e1b345

@module-federation/data-prefetch

pnpm add https://pkg.pr.new/@module-federation/data-prefetch@1e1b345

@module-federation/dts-plugin

pnpm add https://pkg.pr.new/@module-federation/dts-plugin@1e1b345

@module-federation/enhanced

pnpm add https://pkg.pr.new/@module-federation/enhanced@1e1b345

@module-federation/error-codes

pnpm add https://pkg.pr.new/@module-federation/error-codes@1e1b345

@module-federation/esbuild

pnpm add https://pkg.pr.new/@module-federation/esbuild@1e1b345

@module-federation/managers

pnpm add https://pkg.pr.new/@module-federation/managers@1e1b345

@module-federation/manifest

pnpm add https://pkg.pr.new/@module-federation/manifest@1e1b345

@module-federation/metro

pnpm add https://pkg.pr.new/@module-federation/metro@1e1b345

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

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnc-cli@1e1b345

@module-federation/metro-plugin-rnef

pnpm add https://pkg.pr.new/@module-federation/metro-plugin-rnef@1e1b345

@module-federation/modern-js

pnpm add https://pkg.pr.new/@module-federation/modern-js@1e1b345

@module-federation/modern-js-v3

pnpm add https://pkg.pr.new/@module-federation/modern-js-v3@1e1b345

@module-federation/native-federation-tests

pnpm add https://pkg.pr.new/@module-federation/native-federation-tests@1e1b345

@module-federation/native-federation-typescript

pnpm add https://pkg.pr.new/@module-federation/native-federation-typescript@1e1b345

@module-federation/nextjs-mf

pnpm add https://pkg.pr.new/@module-federation/nextjs-mf@1e1b345

@module-federation/node

pnpm add https://pkg.pr.new/@module-federation/node@1e1b345

@module-federation/retry-plugin

pnpm add https://pkg.pr.new/@module-federation/retry-plugin@1e1b345

@module-federation/rsbuild-plugin

pnpm add https://pkg.pr.new/@module-federation/rsbuild-plugin@1e1b345

@module-federation/rspack

pnpm add https://pkg.pr.new/@module-federation/rspack@1e1b345

@module-federation/rspress-plugin

pnpm add https://pkg.pr.new/@module-federation/rspress-plugin@1e1b345

@module-federation/runtime

pnpm add https://pkg.pr.new/@module-federation/runtime@1e1b345

@module-federation/runtime-core

pnpm add https://pkg.pr.new/@module-federation/runtime-core@1e1b345

@module-federation/runtime-tools

pnpm add https://pkg.pr.new/@module-federation/runtime-tools@1e1b345

@module-federation/sdk

pnpm add https://pkg.pr.new/@module-federation/sdk@1e1b345

@module-federation/storybook-addon

pnpm add https://pkg.pr.new/@module-federation/storybook-addon@1e1b345

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

pnpm add https://pkg.pr.new/@module-federation/third-party-dts-extractor@1e1b345

@module-federation/treeshake-frontend

pnpm add https://pkg.pr.new/@module-federation/treeshake-frontend@1e1b345

@module-federation/treeshake-server

pnpm add https://pkg.pr.new/@module-federation/treeshake-server@1e1b345

@module-federation/typescript

pnpm add https://pkg.pr.new/@module-federation/typescript@1e1b345

@module-federation/utilities

pnpm add https://pkg.pr.new/@module-federation/utilities@1e1b345

@module-federation/webpack-bundler-runtime

pnpm add https://pkg.pr.new/@module-federation/webpack-bundler-runtime@1e1b345

@module-federation/bridge-react

pnpm add https://pkg.pr.new/@module-federation/bridge-react@1e1b345

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

pnpm add https://pkg.pr.new/@module-federation/bridge-react-webpack-plugin@1e1b345

@module-federation/bridge-shared

pnpm add https://pkg.pr.new/@module-federation/bridge-shared@1e1b345

@module-federation/bridge-vue3

pnpm add https://pkg.pr.new/@module-federation/bridge-vue3@1e1b345

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

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

commit: 1e1b345

@github-actions

github-actions Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Report

16 package(s) changed, 24 unchanged.

Package dist + ESM entry

Package Total dist (raw) Delta ESM gzip Delta
@module-federation/bridge-vue3 152.1 kB +4.8 kB (+3.3%) 23.3 kB +795 B (+3.4%)
@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 472.1 kB -9507 B (-1.9%) 3.9 kB no change
@module-federation/dts-plugin 306.8 kB +648 B (+0.2%) 4.6 kB no change
@module-federation/enhanced 814.0 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/node 193.4 kB no change 217 B no change
@module-federation/retry-plugin 62.3 kB +648 B (+1.0%) 2.8 kB no change
@module-federation/runtime-core 262.8 kB +10.1 kB (+4.0%) 477 B no change
@module-federation/sdk 200.0 kB +79.1 kB (+65.4%) 798 B no change
@module-federation/storybook-addon 77.6 kB no change 100 B no change
@module-federation/utilities 110.6 kB no change 328 B no change
@module-federation/webpack-bundler-runtime 94.8 kB +682 B (+0.7%) 405 B no change

Bundle targets

Package Web bundle (gzip) Delta Node bundle (gzip) Delta
@module-federation/bridge-vue3 17.9 kB +699 B (+4.0%) 17.7 kB +703 B (+4.0%)
@module-federation/cli 2.3 kB -36 B (-1.5%) 2.3 kB -36 B (-1.5%)
@module-federation/core 1.1 kB -33 B (-2.9%) 1.0 kB -32 B (-3.0%)
@module-federation/devtools 21.3 kB -43 B (-0.2%) 21.3 kB -43 B (-0.2%)
@module-federation/dts-plugin 14.3 kB no change 14.3 kB no change
@module-federation/enhanced 2.6 kB -46 B (-1.7%) 2.6 kB -46 B (-1.7%)
@module-federation/managers 2.4 kB -28 B (-1.1%) 2.4 kB -28 B (-1.1%)
@module-federation/manifest 6.2 kB -40 B (-0.6%) 6.2 kB -40 B (-0.6%)
@module-federation/metro-plugin-rnc-cli 411 B -26 B (-5.9%) 411 B -26 B (-5.9%)
@module-federation/node 9.2 kB -30 B (-0.3%) 9.2 kB -30 B (-0.3%)
@module-federation/retry-plugin 1.8 kB no change 1.8 kB no change
@module-federation/runtime-core 14.4 kB +702 B (+5.0%) 14.1 kB +724 B (+5.3%)
@module-federation/sdk 4.7 kB no change 5.5 kB no change
@module-federation/storybook-addon 1.9 kB -24 B (-1.2%) 1.7 kB -24 B (-1.3%)
@module-federation/utilities 2.6 kB -34 B (-1.3%) 2.6 kB -34 B (-1.3%)
@module-federation/webpack-bundler-runtime 4.0 kB no change 4.0 kB no change

Consumer scenarios

Scenario Web output (gzip) Delta Node output (gzip) Delta Gap (node-web) Delta
Enhanced remoteEntry 20.5 kB +633 B (+3.1%) 21.5 kB +665 B (+3.1%) +1.0 kB +32 B

Total dist (raw): 6.41 MB (+86.6 kB (+1.3%))
Total ESM gzip: 74.7 kB (+795 B (+1.0%))
Total web bundle (gzip): 180.9 kB (+1.0 kB (+0.6%))
Total node bundle (gzip): 181.3 kB (+1.1 kB (+0.6%))
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.

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

Copy link
Copy Markdown

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: b6c927984a

ℹ️ 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 on lines +133 to +135
if (typeof value !== 'string') {
memo[key] = value;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve non-override string runtime fields

stripLegacyOverrides currently drops every string-valued key that is not in RESERVED_RUNTIME_FIELDS, and both setOverrides and clearOverrides run through this path. That means any legitimate string runtime option stored in runtimeConfig (for example a custom mode/url-like flag carried via the [key: string]: unknown contract) is silently deleted whenever overrides are updated, which is data loss outside the proxy override scope.

Useful? React with 👍 / 👎.

2heal1 and others added 6 commits April 21, 2026 15:40
## Summary

- add a browser-safe IIFE build for the proxy runtime helpers
  and expose it as `FederationSdk`
- surface the bundle through package metadata for CDN access
- document the preload injection flow, internal `moduleInfo`
  usage, and the runtime version requirement
- widen the snapshot typings to accept Vmok/Garfish
  `extendInfos` metadata and cover it with proxy tests

## Validation

- `pnpm exec prettier --check packages/sdk/README.md \
  packages/sdk/tsdown.config.ts \
  packages/sdk/src/proxy/iife.ts \
  packages/sdk/src/types/snapshot.ts \
  packages/sdk/__tests__/proxy-storage.spec.ts \
  packages/sdk/__tests__/proxy-runtime.spec.ts \
  packages/sdk/package.json`
- `pnpm --filter @module-federation/sdk run build`
- `pnpm --filter @module-federation/sdk run test`

## Notes

- the package build now emits `packages/sdk/dist/index.iife.js`
- validation ran in the current workspace with Node `v22.22.0`
- the repo declares Node `^20`, so pnpm printed an engine warning
  while the build and tests still passed

Co-Authored-By: Aime <aime@bytedance.com>
Change-Id: I48fb342965802a10fb9f6087d51c7978740c3aa9
…r api in node

Co-Authored-By: Aime <aime@bytedance.com>
Change-Id: I6ae25cc8818d50f877f6af6354ae5924d53eb576
- Freeze security options and allowedProxyOrigins arrays to prevent runtime tampering.
- Block proxy override targets that are not in security.allowedProxyOrigins.
- Block snapshot-loaded moduleInfo remoteEntry URLs that are not allowed.
- Normalize console.warn output format for proxy debug runtime warnings.

Tests:
- pnpm --filter @module-federation/runtime-core test
- pnpm --filter @module-federation/sdk test

Co-Authored-By: Aime <aime@bytedance.com>
Change-Id: Iace648928621808694b33e8cc5b44ea757b2d048
…tions.remotes

Co-Authored-By: Aime <aime@bytedance.com>
Change-Id: If4622ae2e647d2dce956bd0bb717826d5683dfc6
@2heal1 2heal1 closed this Apr 24, 2026
@2heal1 2heal1 deleted the feat/proxy-debug-sdk branch April 24, 2026 04:04
@2heal1 2heal1 changed the title Feat/proxy debug sdk abandoned Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant