Skip to content

Commit 3d7f827

Browse files
authored
Merge branch 'main' into feat/zephyr
2 parents 6dce2c5 + 3fd26a7 commit 3d7f827

File tree

107 files changed

+1507
-436
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+1507
-436
lines changed

.changeset/beige-meals-wash.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/great-pandas-knock.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/enhanced': patch
3+
---
4+
5+
fix(enhanced): Populate `buildMeta` and `buildInfo` on `ConsumeSharedPlugin` using fallbacks

.github/workflows/preview.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ on:
44
inputs:
55
version:
66
type: choice
7-
description: 'Release Version (next, beta, alpha, latest)'
7+
description: 'Release Version'
88
required: true
99
default: 'next'
1010
options:
11-
- next
12-
- beta
13-
- alpha
1411
- latest
12+
- next
1513
branch:
1614
description: 'Release Branch (confirm release branch)'
1715
required: true
@@ -31,6 +29,14 @@ jobs:
3129
uses: actions/checkout@v4
3230
with:
3331
fetch-depth: 25
32+
ref: ${{ github.event.inputs.branch }}
33+
34+
# Use corepack to install pnpm
35+
- name: Setup Pnpm
36+
run: |
37+
npm install -g corepack@latest --force
38+
corepack prepare [email protected] --activate
39+
corepack enable
3440
3541
- name: Setup Node.js
3642
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
@@ -39,36 +45,32 @@ jobs:
3945
cache: 'pnpm'
4046

4147
# Update npm to the latest version to enable OIDC
42-
# Use corepack to install pnpm
43-
- name: Setup Package Managers
48+
- name: Update npm
4449
run: |
4550
npm install -g npm@latest
4651
npm --version
47-
npm install -g corepack@latest --force
48-
corepack prepare [email protected] --activate
49-
corepack enable
5052
5153
- name: Install deps
5254
run: pnpm install
5355

56+
- name: Generate preview version
57+
if: github.event.inputs.version == 'next'
58+
run: |
59+
npx changeset version --snapshot next
60+
5461
- name: Build and test Packages
5562
run: |
5663
git fetch origin main
5764
npx nx run-many --targets=build --projects=tag:type:pkg --skip-nx-cache
5865
npx nx run-many --targets=build --projects=tag:type:metro
5966
ls -l packages/*/dist packages/*/package.json
6067
61-
- uses: actions/github-script@v7
62-
id: version_to_release
63-
with:
64-
result-encoding: string
65-
script: |
66-
const fs = require('fs');
67-
const packageJson = JSON.parse(fs.readFileSync('./packages/runtime/package.json', 'utf8'));
68-
return 'v' + packageJson.version;
68+
- name: Publish latest version
69+
if: github.event.inputs.version == 'latest'
70+
run: |
71+
pnpm -r publish --tag ${{ github.event.inputs.version }} --publish-branch ${{ github.event.inputs.branch }}
6972
70-
- name: Publish to npm
73+
- name: Publish preview version
74+
if: github.event.inputs.version == 'next'
7175
run: |
72-
git tag ${{ steps.version_to_release.outputs.result }}
73-
git push origin ${{ steps.version_to_release.outputs.result }}
74-
pnpm -r publish --tag ${{ github.event.inputs.npm_tag }} --publish-branch ${{ github.event.inputs.branch }}
76+
pnpm -r publish --tag next --no-git-checks

.vscode/launch.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"type": "node",
9191
"request": "launch",
9292
"preLaunchTask": "pnpm-build-enhanced",
93-
"runtimeExecutable": "/Users/bytedance/.nvm/versions/node/v18.20.8/bin/node",
9493
"runtimeArgs": [
9594
"${workspaceFolder}/node_modules/jest/bin/jest.js",
9695
"test/ConfigTestCases.basictest.js",

CONTRIBUTING.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,25 @@ feat(plugin-swc): Add `xxx` config
128128
```
129129

130130

131-
## Release
131+
## Releasing
132132

133-
Module Federation uses GitHub Actions for automated versioning and publishing:
133+
Repository maintainers can publish a new version of changed packages to npm.
134134

135-
## Release test version
135+
1. Checkout a new release branch, for example `release-v0.19.0`.
136+
2. Run `pnpm changeset version` in the package directory to update the version of each package.
137+
3. Create a pull request, the title should be `release v0.19.1`.
138+
4. Run the [release action](https://github.com/module-federation/core/actions/workflows/release.yml) to publish packages to npm.
139+
5. Select `latest` as the release version.
140+
6. Wait reviewers to approve.
141+
7. Merge the release pull request to `main`.
142+
7. Generate the [release notes](https://github.com/module-federation/core/releases) via GitHub, see [Automatically generated release notes](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes)
136143

137-
1. Make sure your branch has added changeset files before releasing the test version
138-
2. Make sure that both "use workflow from" and "release branch" are split for the test version you want to release
139-
3. Use the "next" TAB to release the test version
140-
141-
![image](https://github.com/module-federation/core/assets/27547179/f84fd796-d1d9-42f6-8bb2-95b07c6d7749)
144+
## Release preview version
142145

146+
1. Make sure your branch has added changeset files before releasing the preview version.
147+
2. Run the [release action](https://github.com/module-federation/core/actions/workflows/release.yml) to publish packages to npm.
148+
3. Select `next` as the release version.
149+
4. Wait reviewers to approve.
143150

144151

145152
## Release the official version

apps/modernjs/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @module-federation/modernjsapp
22

3+
## 0.1.109
4+
5+
### Patch Changes
6+
7+
- @module-federation/enhanced@0.19.1
8+
9+
## 0.1.108
10+
11+
### Patch Changes
12+
13+
- @module-federation/enhanced@0.19.0
14+
315
## 0.1.107
416

517
### Patch Changes

apps/modernjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@module-federation/modernjsapp",
33
"private": true,
4-
"version": "0.1.107",
4+
"version": "0.1.109",
55
"scripts": {
66
"reset": "npx rimraf ./**/node_modules",
77
"dev": "modern dev",

apps/router-demo/router-host-2000/src/runtime-plugin/retry.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,19 @@ const retryPlugin = () =>
1313
onError: (params) => {
1414
console.log('onError', params);
1515
},
16-
manifestDomains: ['https://m1.example.com', 'https://m2.example.com'],
16+
manifestDomains: [
17+
'https://m1.example.com',
18+
'https://m2.example.com',
19+
'https://m3.example.com',
20+
],
1721
domains: [
1822
'http://localhost:2011',
1923
'http://localhost:2021',
2024
'http://localhost:2031',
2125
],
22-
addQuery: true,
26+
addQuery: ({ times, originalQuery }) => {
27+
return `${originalQuery}&retry=${times}&retryTimeStamp=${new Date().valueOf()}`;
28+
},
2329
fetchOptions: {
2430
method: 'GET',
2531
},

apps/router-demo/router-remote5-2005/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# remote5
22

3+
## 1.1.16
4+
5+
### Patch Changes
6+
7+
- @module-federation/bridge-react@0.19.1
8+
- @module-federation/rsbuild-plugin@0.19.1
9+
10+
## 1.1.15
11+
12+
### Patch Changes
13+
14+
- @module-federation/bridge-react@0.19.0
15+
- @module-federation/rsbuild-plugin@0.19.0
16+
317
## 1.1.14
418

519
### Patch Changes

0 commit comments

Comments
 (0)