Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9c9eb54
feat(module-federation): add opencode config for alias resolution in …
ScriptedAlchemy Aug 28, 2025
6e829a7
feat(enhanced): improve module sharing with alias resolution
ScriptedAlchemy Sep 2, 2025
5d4cd6d
refactor(enhanced): simplify consume factorize; rename option; refine…
ScriptedAlchemy Sep 5, 2025
42a9b47
feat(enhanced): add alias-aware consume matching via resolverFactory;…
ScriptedAlchemy Sep 5, 2025
5a67bc8
feat(enhanced): alias-aware share-key derivation
ScriptedAlchemy Sep 6, 2025
667a941
chore: debugging
ScriptedAlchemy Sep 8, 2025
ad9b72e
Revert "chore: debugging"
ScriptedAlchemy Sep 8, 2025
2bf170b
Revert "feat(enhanced): alias-aware share-key derivation"
ScriptedAlchemy Sep 8, 2025
4c8ab16
Revert "feat(enhanced): add alias-aware consume matching via resolver…
ScriptedAlchemy Sep 8, 2025
2ec299f
feat(enhanced): add alias-aware providing and consuming for shared mo…
ScriptedAlchemy Sep 8, 2025
baf0d9d
Merge branch 'main' into feat/share-resolver
ScriptedAlchemy Sep 8, 2025
c0810a2
Delete opencode.json
ScriptedAlchemy Sep 8, 2025
097e612
test: add missing aliased target stub for share-with-aliases-provide-…
ScriptedAlchemy Sep 8, 2025
7e502bf
Apply suggested changes
ScriptedAlchemy Sep 8, 2025
f76b386
ci: trigger build
ScriptedAlchemy Sep 9, 2025
7c86fb0
test(enhanced): force sync startup in alias-sharing cases so harness …
ScriptedAlchemy Sep 9, 2025
27e09a9
Merge branch 'main' into feat/share-resolver
ScriptedAlchemy Sep 9, 2025
f15e761
chore: remove unused aliasResolver.ts file
ScriptedAlchemy Sep 9, 2025
e29ec0f
Merge branch 'main' into feat/share-resolver
ScriptedAlchemy Sep 11, 2025
48d4dfd
Delete prompts/alias-resolver.md
ScriptedAlchemy Sep 11, 2025
180e9bf
Merge branch 'main' into feat/share-resolver
ScriptedAlchemy Sep 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ apps/**/dist
**/cypress/downloads

# test cases
!packages/enhanced/test/configCases/**/**/node_modules
packages/enhanced/test/js
.ignored
**/.mf
Expand Down Expand Up @@ -89,3 +88,8 @@ vitest.config.*.timestamp*
ssg
.claude
__mocks__/

# test mock modules
!packages/enhanced/test/configCases/**/**/node_modules
!packages/enhanced/test/configCases/sharing/share-with-aliases/node_modules/next/dist
!packages/enhanced/test/configCases/sharing/share-with-aliases-provide-only/node_modules/next/dist
23 changes: 23 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# AGENTS.md - Module Federation Core Repository Guidelines

## Build/Test Commands
```bash
pnpm build # Build all packages (tag:type:pkg)
pnpm test # Run all tests via nx
pnpm lint # Lint all packages
pnpm lint-fix # Fix linting issues
pnpm nx run <pkg>:test # Test specific package
npx jest path/to/test.ts --no-coverage # Run single test file
```

## Code Style
- **Imports**: External → SDK/core → Local (grouped with blank lines)
- **Type imports**: `import type { ... }` explicitly marked
- **Naming**: camelCase functions, PascalCase classes, SCREAMING_SNAKE constants
- **Files**: kebab-case or PascalCase for class files
- **Errors**: Use `@module-federation/error-codes`, minimal try-catch
- **Comments**: Minimal, use `//` inline, `/** */` for deprecation
- **Async**: Named async functions for major ops, arrow functions in callbacks
- **Exports**: Named exports preferred, barrel exports in index files
- **Package manager**: ALWAYS use pnpm, never npm
- **Parallelization**: Break tasks into 3-10 parallel subtasks minimum
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "module-federation",
"version": "0.0.0",
"engines": {
"node": "^18",
"pnpm": "^8.11.0"
},
"packageManager": "[email protected]",
Expand Down Expand Up @@ -38,7 +37,7 @@
"build:website": "nx run website-new:build",
"extract-i18n:website": "nx run website:extract-i18n",
"sync:pullMFTypes": "concurrently \"node ./packages/enhanced/pullts.js\"",
"app:next:dev": "nx run-many --target=serve --configuration=development -p 3000-home,3001-shop,3002-checkout",
"app:next:dev": "NX_TUI=false nx run-many --target=serve --configuration=development -p 3000-home,3001-shop,3002-checkout",
"app:next:build": "nx run-many --target=build --parallel=2 --configuration=production -p 3000-home,3001-shop,3002-checkout",
"app:next:prod": "nx run-many --target=serve --configuration=production -p 3000-home,3001-shop,3002-checkout",
"app:node:dev": "nx run-many --target=serve --parallel=10 --configuration=development -p node-host,node-local-remote,node-remote,node-dynamic-remote-new-version,node-dynamic-remote",
Expand Down
1 change: 1 addition & 0 deletions packages/bridge/bridge-react/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default defineConfig({
external: [
...perDepsKeys,
'@remix-run/router',
'react-error-boundary',
/react-dom\/.*/,
'react-router',
'react-router-dom/',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export type ConsumeOptions = {
*/
include?: ConsumeSharedModuleIncludeOptions;
/**
* Enable reconstructed lookup for node_modules paths for this share item
* Allow matching against path suffix after node_modules for this share item
*/
nodeModulesReconstructedLookup?: boolean;
allowNodeModulesSuffixMatch?: boolean;
};
const TYPES = new Set(['consume-shared']);
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,5 @@ export interface ConsumesConfig {
request?: string;
exclude?: IncludeExcludeOptions;
include?: IncludeExcludeOptions;
nodeModulesReconstructedLookup?: boolean;
allowNodeModulesSuffixMatch?: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ export interface ProvidesConfig {
*/
include?: IncludeExcludeOptions;
/**
* Node modules reconstructed lookup.
* Allow matching against path suffix after node_modules.
*/
nodeModulesReconstructedLookup?: any;
allowNodeModulesSuffixMatch?: any;
/**
* Original prefix for prefix matches (internal use).
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ export interface SharedConfig {
*/
include?: IncludeExcludeOptions;
/**
* Node modules reconstructed lookup.
* Allow matching against path suffix after node_modules.
*/
nodeModulesReconstructedLookup?: boolean;
allowNodeModulesSuffixMatch?: boolean;
}

export interface IncludeExcludeOptions {
Expand Down
Loading
Loading