diff --git a/.changeset/ai-eager-wolf.md b/.changeset/ai-eager-wolf.md
new file mode 100644
index 00000000000..ab5fe276767
--- /dev/null
+++ b/.changeset/ai-eager-wolf.md
@@ -0,0 +1,12 @@
+---
+"@module-federation/runtime-core": minor
+---
+
+Added support for OR ranges in semantic version satisfaction logic with comprehensive unit tests.
+
+- Implemented parsing for OR (||) conditions in version ranges.
+ - Split input ranges by || to evaluate alternatives individually.
+ - Ensured logical handling of wildcards '*' and 'x' within ranges.
+- Refactored internal parsing to support more complex range constructs.
+- Added comprehensive test cases to cover diverse scenarios for OR range support.
+- Introduced error handling during range processing, with console logging for tracking issues.
diff --git a/.changeset/ai-happy-fox.md b/.changeset/ai-happy-fox.md
new file mode 100644
index 00000000000..51821121aff
--- /dev/null
+++ b/.changeset/ai-happy-fox.md
@@ -0,0 +1,12 @@
+---
+"@module-federation/nextjs-mf": minor
+---
+
+Refactor and enhance module federation support for Next.js.
+
+- Introduced `getShareScope` function to dynamically generate the default share scope based on the client or server environment, replacing static DEFAULT_SHARE_SCOPE declarations.
+- Implemented `RscManifestInterceptPlugin` to intercept and modify client reference manifests, ensuring proper prefix handling.
+- Refined server-side externals handling to ensure shared federation modules are bundled.
+- Simplified and modularized sharing logic by creating distinct functions for React, React DOM, React JSX Runtime, and React JSX Dev Runtime package configurations.
+- Captured the original webpack public path for potential use in plugins and adjustments.
+- Enhanced logging for debug tracing of shared module resolution processes in runtimePlugin.
diff --git a/.changeset/ai-hungry-bear.md b/.changeset/ai-hungry-bear.md
new file mode 100644
index 00000000000..da78a9f2555
--- /dev/null
+++ b/.changeset/ai-hungry-bear.md
@@ -0,0 +1,10 @@
+---
+"@module-federation/enhanced": minor
+---
+
+Enhancements to layer handling in module federation tests and configuration.
+
+- Improved handling of `shareKey` for layers within `ConsumeSharedPlugin` and `ProvideSharedPlugin`.
+ - Conditionally prepend the `shareKey` with the `layer` if applicable.
+- Introduced new layer configurations to support more nuanced federation scenarios that consider multiple layers of dependency.
+
diff --git a/.changeset/ai-sleepy-fox.md b/.changeset/ai-sleepy-fox.md
new file mode 100644
index 00000000000..36d84f71503
--- /dev/null
+++ b/.changeset/ai-sleepy-fox.md
@@ -0,0 +1,9 @@
+---
+"@module-federation/enhanced": patch
+---
+
+Refactored module sharing configuration handling.
+
+- Simplified plugin schema for better maintainability
+- Improved layer-based module sharing test coverage
+- Removed redundant plugin exports
diff --git a/.changeset/ai-sleepy-tiger.md b/.changeset/ai-sleepy-tiger.md
new file mode 100644
index 00000000000..faf9daf7c26
--- /dev/null
+++ b/.changeset/ai-sleepy-tiger.md
@@ -0,0 +1,5 @@
+---
+"@module-federation/runtime": minor
+---
+
+- Added a new property 'layer' of type string or null to SharedConfig.
diff --git a/.changeset/brown-badgers-fetch.md b/.changeset/brown-badgers-fetch.md
new file mode 100644
index 00000000000..00d28f1f096
--- /dev/null
+++ b/.changeset/brown-badgers-fetch.md
@@ -0,0 +1,5 @@
+---
+'@module-federation/enhanced': minor
+---
+
+support request option on ConsumeSharePlugin. Allows matching requests like the object key of shared does
diff --git a/.changeset/shy-snails-battle.md b/.changeset/shy-snails-battle.md
new file mode 100644
index 00000000000..8d4fb5ec2f1
--- /dev/null
+++ b/.changeset/shy-snails-battle.md
@@ -0,0 +1,5 @@
+---
+'@module-federation/enhanced': minor
+---
+
+Layer support for Provide Share Plugin
diff --git a/.cursor/rules/nx-rules.mdc b/.cursor/rules/nx-rules.mdc
index ed6c085a49b..6169b6b2748 100644
--- a/.cursor/rules/nx-rules.mdc
+++ b/.cursor/rules/nx-rules.mdc
@@ -6,7 +6,7 @@ alwaysApply: true
// This file is automatically generated by Nx Console
-You are in an nx workspace using Nx 0.0.0 and npm as the package manager.
+You are in an nx workspace using Nx 21.0.3 and pnpm as the package manager.
You have access to the Nx MCP server and the tools it provides. Use them. Follow these guidelines in order to best help the user:
@@ -17,7 +17,7 @@ You have access to the Nx MCP server and the tools it provides. Use them. Follow
- To help answer questions about the workspace structure or simply help with demonstrating how tasks depend on each other, use the 'nx_visualize_graph' tool
# Generation Guidelines
-If the user wants to generate something, use the following flow:
+If the user wants to generate something, use the following flow:
- learn about the nx workspace and any specifics the user needs by using the 'nx_workspace' tool and the 'nx_project_details' tool if applicable
- get the available generators using the 'nx_generators' tool
diff --git a/.cursor/rules/running-tests.mdc b/.cursor/rules/running-tests.mdc
new file mode 100644
index 00000000000..dfc8df4c75f
--- /dev/null
+++ b/.cursor/rules/running-tests.mdc
@@ -0,0 +1,6 @@
+---
+description:
+globs: packages/enhanced/*
+alwaysApply: false
+---
+use pnpm enhanced:jest to test this
diff --git a/.cursorignore b/.cursorignore
index 9ff4e05b449..5b264c56cf9 100644
--- a/.cursorignore
+++ b/.cursorignore
@@ -2,7 +2,7 @@
**/.cache/
**/.temp/
**/coverage/
-**/dist/
+!**/dist/
# Explicitly ignore specific packages
packages/typescript/
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index b6caed555d9..c62251dc2e4 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -42,13 +42,25 @@ jobs:
node-version: '18'
cache: 'pnpm'
+ - name: Cache Browsers
+ uses: actions/cache@v3
+ id: browsers-cache
+ with:
+ path: |
+ ~/.cache/ms-playwright
+ ~/.cache/Cypress
+ key: ${{ runner.os }}-browsers-${{ hashFiles('**/pnpm-lock.yaml') }}
+
+ - name: Set Nx SHA
+ uses: nrwl/nx-set-shas@v3
+
- name: Install deps
run: pnpm install
- name: Build and test Packages
run: |
git fetch origin main
- npx nx run-many --targets=build --projects=tag:type:pkg --skip-nx-cache
+ npx nx run-many --targets=build --projects=tag:type:pkg
ls -l packages/*/dist packages/*/package.json
- name: Release
diff --git a/apps/3000-home/next-env.d.ts b/apps/3000-home/next-env.d.ts
index a4a7b3f5cfa..52e831b4342 100644
--- a/apps/3000-home/next-env.d.ts
+++ b/apps/3000-home/next-env.d.ts
@@ -2,4 +2,4 @@
///