Skip to content

Commit

Permalink
chore: merge main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
danpeen committed Feb 26, 2025
2 parents 48ed2ae + 3081511 commit 949d8e7
Show file tree
Hide file tree
Showing 81 changed files with 761 additions and 396 deletions.
5 changes: 0 additions & 5 deletions .changeset/dry-geese-drum.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/strong-ravens-push.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/e2e-modern-ssr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
run: |
lsof -ti tcp:3050,3051,3052,3053,3054,3055,3056 | xargs -r kill &&
pnpm run app:modern:dev &
sleep 1 &&
sleep 30 &&
npx wait-on http://127.0.0.1:3050/ &&
npx wait-on http://127.0.0.1:3051/ &&
npx wait-on http://127.0.0.1:3052/ &&
Expand Down
6 changes: 6 additions & 0 deletions apps/modernjs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @module-federation/modernjsapp

## 0.1.85

### Patch Changes

- @module-federation/enhanced@0.9.1

## 0.1.84

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion 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.84",
"version": "0.1.85",
"scripts": {
"reset": "npx rimraf ./**/node_modules",
"dev": "modern dev",
Expand Down
6 changes: 6 additions & 0 deletions apps/website-new/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# website-new

## 1.0.27

### Patch Changes

- @module-federation/error-codes@0.9.1

## 1.0.26

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions apps/website-new/docs/en/configure/dts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ When configuring `generateTypes` to `true`, the following configuration will be
{
"generateAPITypes": true,
"abortOnError": false,
"extractThirdParty": true,
"extractRemoteTypes": true,
"extractThirdParty": false,
"extractRemoteTypes": false,
"compileInChildProcess": true
}
```
Expand Down
4 changes: 2 additions & 2 deletions apps/website-new/docs/zh/configure/dts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ interface DtsRemoteOptions {
{
"generateAPITypes": true,
"abortOnError": false,
"extractThirdParty": true,
"extractRemoteTypes": true,
"extractThirdParty": false,
"extractRemoteTypes": false,
"compileInChildProcess": true
}
```
Expand Down
2 changes: 1 addition & 1 deletion apps/website-new/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "website-new",
"version": "1.0.26",
"version": "1.0.27",
"private": true,
"scripts": {
"dev": "rspress dev",
Expand Down
9 changes: 9 additions & 0 deletions packages/bridge/bridge-react-webpack-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @module-federation/bridge-react-webpack-plugin

## 0.9.1

### Patch Changes

- Updated dependencies [35d925b]
- Updated dependencies [35d925b]
- Updated dependencies [8acd217]
- @module-federation/sdk@0.9.1

## 0.9.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge/bridge-react-webpack-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@module-federation/bridge-react-webpack-plugin",
"version": "0.9.0",
"version": "0.9.1",
"publishConfig": {
"access": "public"
},
Expand Down
10 changes: 10 additions & 0 deletions packages/bridge/bridge-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @module-federation/bridge-react

## 0.9.1

### Patch Changes

- Updated dependencies [35d925b]
- Updated dependencies [35d925b]
- Updated dependencies [8acd217]
- @module-federation/sdk@0.9.1
- @module-federation/bridge-shared@0.9.1

## 0.9.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge/bridge-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@module-federation/bridge-react",
"version": "0.9.0",
"version": "0.9.1",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/bridge/bridge-shared/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @module-federation/bridge-shared

## 0.9.1

## 0.9.0

## 0.8.12
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge/bridge-shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@module-federation/bridge-shared",
"version": "0.9.0",
"version": "0.9.1",
"publishConfig": {
"access": "public"
},
Expand Down
11 changes: 11 additions & 0 deletions packages/bridge/vue3-bridge/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @module-federation/bridge-vue3

## 0.9.1

### Patch Changes

- Updated dependencies [35d925b]
- Updated dependencies [35d925b]
- Updated dependencies [8acd217]
- @module-federation/sdk@0.9.1
- @module-federation/runtime@0.9.1
- @module-federation/bridge-shared@0.9.1

## 0.9.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge/vue3-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/module-federation/core",
"directory": "packages/vue3-bridge"
},
"version": "0.9.0",
"version": "0.9.1",
"publishConfig": {
"access": "public"
},
Expand Down
9 changes: 9 additions & 0 deletions packages/chrome-devtools/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @module-federation/devtools

## 0.9.1

### Patch Changes

- Updated dependencies [35d925b]
- Updated dependencies [35d925b]
- Updated dependencies [8acd217]
- @module-federation/sdk@0.9.1

## 0.9.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/chrome-devtools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@module-federation/devtools",
"version": "0.9.0",
"version": "0.9.1",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
10 changes: 10 additions & 0 deletions packages/data-prefetch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @module-federation/data-prefetch

## 0.9.1

### Patch Changes

- Updated dependencies [35d925b]
- Updated dependencies [35d925b]
- Updated dependencies [8acd217]
- @module-federation/sdk@0.9.1
- @module-federation/runtime@0.9.1

## 0.9.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/data-prefetch/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@module-federation/data-prefetch",
"description": "Module Federation Data Prefetch",
"version": "0.9.0",
"version": "0.9.1",
"author": "nieyan <[email protected]>",
"homepage": "https://github.com/module-federation/core",
"license": "MIT",
Expand Down
15 changes: 15 additions & 0 deletions packages/dts-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# @module-federation/dts-plugin

## 0.9.1

### Patch Changes

- 35d925b: feat(dts-plugin): support remoteTypeUrls option which allow user to specify the remote types url
- 35d925b: fix(dts-plugin): support parse @scope@manifest-url.json entry
- 7a37360: fix(dts-plugin): consume api types if adding new one
- Updated dependencies [35d925b]
- Updated dependencies [35d925b]
- Updated dependencies [8acd217]
- @module-federation/sdk@0.9.1
- @module-federation/managers@0.9.1
- @module-federation/third-party-dts-extractor@0.9.1
- @module-federation/error-codes@0.9.1

## 0.9.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/dts-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@module-federation/dts-plugin",
"version": "0.9.0",
"version": "0.9.1",
"author": "hanric <[email protected]>",
"main": "./dist/index.js",
"module": "./dist/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ describe('hostPlugin', () => {
abortOnError: true,
consumeAPITypes: false,
runtimePkgs: [],
remoteTypeUrls: {},
});

expect(mapRemotesToDownload).toStrictEqual({
Expand All @@ -66,6 +67,7 @@ describe('hostPlugin', () => {
abortOnError: true,
consumeAPITypes: false,
runtimePkgs: [],
remoteTypeUrls: {},
};

const { hostOptions, mapRemotesToDownload } =
Expand Down
22 changes: 18 additions & 4 deletions packages/dts-plugin/src/core/configurations/hostPlugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
MANIFEST_EXT,
parseEntry,
ENCODE_NAME_PREFIX,
decodeName,
Expand All @@ -18,6 +17,7 @@ const defaultOptions = {
abortOnError: true,
consumeAPITypes: false,
runtimePkgs: [],
remoteTypeUrls: {},
} satisfies Partial<HostOptions>;

const buildZipUrl = (hostOptions: Required<HostOptions>, url: string) => {
Expand Down Expand Up @@ -45,6 +45,7 @@ export const retrieveRemoteInfo = (options: {
remote: string;
}): RemoteInfo => {
const { hostOptions, remoteAlias, remote } = options;
const { remoteTypeUrls } = hostOptions;
let decodedRemote = remote;
if (decodedRemote.startsWith(ENCODE_NAME_PREFIX)) {
decodedRemote = decodeName(decodedRemote, ENCODE_NAME_PREFIX);
Expand All @@ -59,13 +60,26 @@ export const retrieveRemoteInfo = (options: {
? decodedRemote
: '';

const zipUrl = url ? buildZipUrl(hostOptions, url) : '';
let zipUrl = '';
let apiTypeUrl = '';
const name = parsedInfo.name || remoteAlias;
if (typeof remoteTypeUrls === 'object' && remoteTypeUrls[name]) {
zipUrl = remoteTypeUrls[name].zip;
apiTypeUrl = remoteTypeUrls[name].api;
}
if (!zipUrl && url) {
zipUrl = buildZipUrl(hostOptions, url);
}

if (!apiTypeUrl && zipUrl) {
apiTypeUrl = buildApiTypeUrl(zipUrl);
}

return {
name: parsedInfo.name || remoteAlias,
name,
url: url,
zipUrl,
apiTypeUrl: buildApiTypeUrl(zipUrl),
apiTypeUrl,
alias: remoteAlias,
};
};
Expand Down
Loading

0 comments on commit 949d8e7

Please sign in to comment.