Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ScriptedAlchemy authored Nov 26, 2024
2 parents 04a9e54 + e9f1b38 commit 2419e35
Show file tree
Hide file tree
Showing 188 changed files with 8,080 additions and 4,691 deletions.
3 changes: 2 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"host-v5",
"host-vue3",
"3008-runtime-remote",
"modernjs-ssr-*"
"modernjs-ssr-*",
"@changesets/assemble-release-plan"
]
}
5 changes: 5 additions & 0 deletions .changeset/dirty-bikes-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/runtime': patch
---

fix(runtime): add define constant to help downgrade non-esm project
5 changes: 5 additions & 0 deletions .changeset/honest-yaks-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/dts-plugin': patch
---

ensure when dev is false that type generation only runs once
5 changes: 5 additions & 0 deletions .changeset/modern-experts-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/runtime': patch
---

add @vite-ignore for dynamic import in loadEsmEntry
5 changes: 5 additions & 0 deletions .changeset/small-bats-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/bridge-react': patch
---

feat: mount bridge api to module instance
5 changes: 5 additions & 0 deletions .changeset/tasty-guests-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/modern-js': patch
---

fix(modern-js-plugin): only export esm mfRuntimePlugin
3 changes: 3 additions & 0 deletions .github/workflows/e2e-next-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
- name: Set SKIP_DEVTOOLS_POSTINSTALL environment variable
run: echo "SKIP_DEVTOOLS_POSTINSTALL=true" >> $GITHUB_ENV

- name: Set local webpack
run: echo "NEXT_PRIVATE_LOCAL_WEBPACK=true" >> $GITHUB_ENV

- name: Install Dependencies
run: pnpm install

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ jobs:
node-version: '18'
cache: 'pnpm'

- name: Set Nx SHA
uses: nrwl/nx-set-shas@v3

- name: Install Dependencies
run: pnpm install --ignore-scripts
# assemble-release-plan is forked, so need to build it before execute pnpm changeset version
- name: Build Internal Changesets Dependencies
run: npx nx build assemble-release-plan

- name: Create Release Pull Request
uses: module-federation/actions@v2
Expand Down
1 change: 1 addition & 0 deletions .nxignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.md
./assemble-release-plan
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ pnpm-lock.yaml
apps/website-new/docs

/.nx/workspace-data
/.nx/cache
/.nx/cache
2 changes: 1 addition & 1 deletion apps/modernjs-ssr/dynamic-nested-remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dist/"
],
"dependencies": {
"@babel/runtime": "7.25.7",
"@babel/runtime": "7.26.0",
"@modern-js/runtime": "2.60.6",
"@module-federation/modern-js": "workspace:*",
"antd": "4.24.15",
Expand Down
2 changes: 1 addition & 1 deletion apps/modernjs-ssr/dynamic-remote-new-version/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dist/"
],
"dependencies": {
"@babel/runtime": "7.24.4",
"@babel/runtime": "7.26.0",
"@modern-js/runtime": "2.60.6",
"@module-federation/modern-js": "workspace:*",
"antd": "4.24.15",
Expand Down
2 changes: 1 addition & 1 deletion apps/modernjs-ssr/dynamic-remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dist/"
],
"dependencies": {
"@babel/runtime": "7.24.4",
"@babel/runtime": "7.26.0",
"@modern-js/runtime": "2.60.6",
"@module-federation/modern-js": "workspace:*",
"antd": "4.24.15",
Expand Down
2 changes: 1 addition & 1 deletion apps/modernjs-ssr/host/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dist/"
],
"dependencies": {
"@babel/runtime": "7.24.4",
"@babel/runtime": "7.26.0",
"@modern-js/runtime": "2.60.6",
"@module-federation/modern-js": "workspace:*",
"antd": "4.24.15",
Expand Down
2 changes: 1 addition & 1 deletion apps/modernjs-ssr/nested-remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dist/"
],
"dependencies": {
"@babel/runtime": "7.24.4",
"@babel/runtime": "7.26.0",
"@modern-js/runtime": "2.60.6",
"@module-federation/modern-js": "workspace:*",
"antd": "4.24.15",
Expand Down
2 changes: 1 addition & 1 deletion apps/modernjs-ssr/remote-new-version/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dist/"
],
"dependencies": {
"@babel/runtime": "7.24.4",
"@babel/runtime": "7.26.0",
"@modern-js/runtime": "2.60.6",
"@module-federation/modern-js": "workspace:*",
"antd": "4.24.15",
Expand Down
2 changes: 1 addition & 1 deletion apps/modernjs-ssr/remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dist/"
],
"dependencies": {
"@babel/runtime": "7.24.4",
"@babel/runtime": "7.26.0",
"@modern-js/runtime": "2.60.6",
"@module-federation/modern-js": "workspace:*",
"antd": "4.24.15",
Expand Down
38 changes: 38 additions & 0 deletions apps/modernjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# @module-federation/modernjsapp

## 0.1.69

### Patch Changes

- @module-federation/enhanced@0.7.6

## 0.1.68

### Patch Changes

- Updated dependencies [5613265]
- @module-federation/enhanced@0.7.5

## 0.1.67

### Patch Changes

- @module-federation/enhanced@0.7.4

## 0.1.66

### Patch Changes

- @module-federation/enhanced@0.7.3

## 0.1.65

### Patch Changes

- @module-federation/enhanced@0.7.2

## 0.1.64

### Patch Changes

- Updated dependencies [47fdbc2]
- @module-federation/enhanced@0.7.1

## 0.1.63

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions apps/modernjs/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@module-federation/modernjsapp",
"private": true,
"version": "0.1.63",
"version": "0.1.69",
"scripts": {
"reset": "npx rimraf ./**/node_modules",
"dev": "modern dev",
Expand All @@ -25,7 +25,7 @@
"dist/"
],
"dependencies": {
"@babel/runtime": "7.24.5",
"@babel/runtime": "7.26.0",
"@modern-js/runtime": "2.60.6",
"@module-federation/enhanced": "workspace:*",
"react": "18.3.1",
Expand Down
2 changes: 2 additions & 0 deletions apps/router-demo/router-host-2000/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ import Navigation from './navigation';
import Detail from './pages/Detail';
import Home from './pages/Home';
import './App.css';
import BridgeReactPlugin from '@module-federation/bridge-react/plugin';

init({
name: 'federation_consumer',
remotes: [],
plugins: [
BridgeReactPlugin(),
RetryPlugin({
fetch: {
url: 'http://localhost:2008/not-exist-mf-manifest.json',
Expand Down
2 changes: 1 addition & 1 deletion apps/router-demo/router-host-vue3-2100/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@module-federation/bridge-vue3": "workspace:*",
"@module-federation/enhanced": "workspace:*",
"vue": "^3.4.19",
"vue-router": "^4.3.2"
"vue-router": "^4.4.5"
},
"devDependencies": {
"@module-federation/rsbuild-plugin": "workspace:*",
Expand Down
11 changes: 7 additions & 4 deletions apps/router-demo/router-remote1-2001/rsbuild.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export default defineConfig({
react: path.resolve(__dirname, 'node_modules/react'),
'react-dom': path.resolve(__dirname, 'node_modules/react-dom'),
// set `react-router-dom/` to reference react-router-dom v5 which shoule be find in node_modules/react-router-dom, otherwise it will cause app.tsx fail to work which in react-router-dom v5 mode.
'react-router-dom': path.resolve(
__dirname,
'node_modules/react-router-dom',
),
// 'react-router-dom': path.resolve(
// __dirname,
// 'node_modules/react-router-dom',
// ),
},
},
server: {
Expand All @@ -33,6 +33,9 @@ export default defineConfig({
pluginReact(),
pluginModuleFederation({
name: 'remote1',
runtimePlugins: [
require.resolve('@module-federation/bridge-react/plugin'),
],
exposes: {
'./button': './src/button.tsx',
'./export-app': './src/export-App.tsx',
Expand Down
2 changes: 1 addition & 1 deletion apps/router-demo/router-remote3-2003/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@module-federation/bridge-vue3": "workspace:*",
"@module-federation/rsbuild-plugin": "workspace:*",
"vue": "^3.4.19",
"vue-router": "^4.3.2"
"vue-router": "^4.4.5"
},
"devDependencies": {
"@rsbuild/core": "^1.0.19",
Expand Down
11 changes: 9 additions & 2 deletions apps/rslib-module/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,21 @@ const config: StorybookConfig = {
options: {},
},
addons: [
{
name: getAbsolutePath('storybook-addon-rslib'),
options: {
rslib: {
include: ['**/stories/**'],
},
},
},
{
name: '@module-federation/storybook-addon/preset',
options: {
remotes: {
'rslib-module':
'rslib-module@http://localhost:3000/mf/mf-manifest.json',
'rslib-module@http://localhost:3001/mf/mf-manifest.json',
},
shareStrategy: 'loaded-first',
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion apps/rslib-module/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Dev package
1.

```
nx serve rslib-module
nx dev rslib-module
```

2.
Expand Down
8 changes: 5 additions & 3 deletions apps/rslib-module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,23 @@
"types": "./dist/cjs/index.d.ts",
"scripts": {
"build": "rslib build",
"serve": "pnpm build && http-server -p 3000 ./dist/ --cors",
"dev": "rslib mf dev",
"serve": "pnpm build && http-server -p 3001 ./dist/ --cors",
"storybook": "storybook dev -p 6006"
},
"devDependencies": {
"@module-federation/enhanced": "workspace:*",
"@module-federation/rsbuild-plugin": "workspace:*",
"@module-federation/storybook-addon": "workspace:*",
"@rsbuild/plugin-react": "^1.0.6",
"@rslib/core": "^0.0.14",
"@rslib/core": "^0.0.18",
"@types/react": "^18.3.11",
"http-server": "^14.1.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"storybook": "^8.3.6",
"storybook-react-rsbuild": "^0.1.1"
"storybook-react-rsbuild": "^0.1.5",
"storybook-addon-rslib": "^0.1.4"
},
"peerDependencies": {
"react": "*"
Expand Down
12 changes: 12 additions & 0 deletions apps/rslib-module/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@
}
]
},
"dev": {
"executor": "nx:run-commands",
"options": {
"commands": ["npm run dev --prefix apps/rslib-module"]
},
"dependsOn": [
{
"target": "build",
"dependencies": true
}
]
},
"storybook": {
"executor": "nx:run-commands",
"options": {
Expand Down
7 changes: 7 additions & 0 deletions apps/rslib-module/rslib.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ export default defineConfig({
assetPrefix: 'http://localhost:3000/mf',
minify: true,
},
dev: {
assetPrefix: 'http://localhost:3001/mf',
},
// just for dev
server: {
port: 3001,
},
plugins: [
pluginModuleFederation({
name: 'rslib_provider',
Expand Down
37 changes: 37 additions & 0 deletions apps/website-new/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# website-new

## 1.0.11

### Patch Changes

- @module-federation/error-codes@0.7.6

## 1.0.10

### Patch Changes

- @module-federation/error-codes@0.7.5

## 1.0.9

### Patch Changes

- @module-federation/error-codes@0.7.4

## 1.0.8

### Patch Changes

- Updated dependencies [4ab9295]
- @module-federation/error-codes@0.7.3

## 1.0.7

### Patch Changes

- @module-federation/error-codes@0.7.2

## 1.0.6

### Patch Changes

- @module-federation/error-codes@0.7.1

## 1.0.5

### Patch Changes
Expand Down
Loading

0 comments on commit 2419e35

Please sign in to comment.