Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into feat/esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
ScriptedAlchemy committed Jun 26, 2024
2 parents 95c6969 + 1776c74 commit 4cc202e
Show file tree
Hide file tree
Showing 60 changed files with 234 additions and 39 deletions.
6 changes: 0 additions & 6 deletions .changeset/dry-shoes-kick.md

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
run: npx nx format:check

- name: Update NX Build Cache
run: npx nx run-many --targets=build --exclude='*,!tag:type:pkg'
run: npx nx run-many --targets=build --projects=tag:type:pkg

- name: Run Build for All
run: npx nx run-many --targets=build --exclude='*,!tag:type:pkg' --skip-nx-cache
run: npx nx run-many --targets=build --projects=tag:type:pkg --skip-nx-cache

- name: Run Affected Lint
run: npx nx affected -t lint --parallel=7 --exclude='*,!tag:type:pkg'
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/modernjs

## 0.1.29

### Patch Changes

- @module-federation/enhanced@0.2.2

## 0.1.28

### 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/modernjs",
"private": true,
"version": "0.1.28",
"version": "0.1.29",
"scripts": {
"reset": "npx rimraf ./**/node_modules",
"dev": "modern dev",
Expand Down
7 changes: 7 additions & 0 deletions apps/router-demo/router-host-2000/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# host

## 1.0.3

### Patch Changes

- @module-federation/enhanced@0.2.2
- @module-federation/bridge-react@0.2.2

## 1.0.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/router-demo/router-host-2000/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "host",
"private": true,
"version": "1.0.2",
"version": "1.0.3",
"scripts": {
"dev": "FEDERATION_DEBUG=true rsbuild dev --open",
"build": "rsbuild build",
Expand Down
7 changes: 7 additions & 0 deletions apps/router-demo/router-host-v5-2200/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# host-v5

## 1.0.3

### Patch Changes

- @module-federation/enhanced@0.2.2
- @module-federation/bridge-react@0.2.2

## 1.0.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/router-demo/router-host-v5-2200/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "host-v5",
"private": true,
"version": "1.0.2",
"version": "1.0.3",
"scripts": {
"dev": "FEDERATION_DEBUG=true rsbuild dev",
"build": "rsbuild build",
Expand Down
7 changes: 7 additions & 0 deletions apps/router-demo/router-host-vue3-2100/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# host-vue3

## 1.0.3

### Patch Changes

- @module-federation/enhanced@0.2.2
- @module-federation/bridge-vue3@0.2.2

## 1.0.2

### Patch Changes
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
@@ -1,7 +1,7 @@
{
"name": "host-vue3",
"private": true,
"version": "1.0.2",
"version": "1.0.3",
"scripts": {
"dev": "rsbuild dev",
"build": "rsbuild build",
Expand Down
7 changes: 7 additions & 0 deletions apps/router-demo/router-remote1-2001/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# remote1

## 1.0.3

### Patch Changes

- @module-federation/enhanced@0.2.2
- @module-federation/bridge-react@0.2.2

## 1.0.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/router-demo/router-remote1-2001/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "remote1",
"private": true,
"version": "1.0.2",
"version": "1.0.3",
"scripts": {
"dev": "rsbuild dev",
"build": "DEBUG=true rsbuild build",
Expand Down
7 changes: 7 additions & 0 deletions apps/router-demo/router-remote2-2002/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# remote2

## 1.0.3

### Patch Changes

- @module-federation/enhanced@0.2.2
- @module-federation/bridge-react@0.2.2

## 1.0.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/router-demo/router-remote2-2002/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "remote2",
"private": true,
"version": "1.0.2",
"version": "1.0.3",
"scripts": {
"dev": "rsbuild dev",
"build": "rsbuild build",
Expand Down
7 changes: 7 additions & 0 deletions apps/router-demo/router-remote3-2003/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# remote3

## 1.0.3

### Patch Changes

- @module-federation/enhanced@0.2.2
- @module-federation/bridge-vue3@0.2.2

## 1.0.2

### Patch Changes
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
@@ -1,7 +1,7 @@
{
"name": "remote3",
"private": true,
"version": "1.0.2",
"version": "1.0.3",
"scripts": {
"dev": "rsbuild dev",
"build": "rsbuild build",
Expand Down
6 changes: 6 additions & 0 deletions apps/runtime-demo/3008-runtime-remote/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# 3008-runtime-remote

## 1.0.13

### Patch Changes

- @module-federation/enhanced@0.2.2

## 1.0.12

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion apps/runtime-demo/3008-runtime-remote/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "3008-runtime-remote",
"private": true,
"version": "1.0.12",
"version": "1.0.13",
"scripts": {
"dev": "rsbuild dev",
"build": "rsbuild build",
Expand Down
6 changes: 6 additions & 0 deletions packages/bridge/bridge-react-webpack-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @module-federation/bridge-react-webpack-plugin

## 0.2.2

### Patch Changes

- @module-federation/sdk@0.2.2

## 0.2.1

### 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.2.1",
"version": "0.2.2",
"publishConfig": {
"access": "public"
},
Expand Down
6 changes: 6 additions & 0 deletions packages/bridge/bridge-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @module-federation/bridge-react

## 0.2.2

### Patch Changes

- @module-federation/bridge-shared@0.2.2

## 0.2.1

### 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.2.1",
"version": "0.2.2",
"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.2.2

## 0.2.1

## 0.2.0
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.2.1",
"version": "0.2.2",
"publishConfig": {
"access": "public"
},
Expand Down
6 changes: 6 additions & 0 deletions packages/bridge/vue3-bridge/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @module-federation/bridge-vue3

## 0.2.2

### Patch Changes

- @module-federation/bridge-shared@0.2.2

## 0.2.1

### 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
@@ -1,7 +1,7 @@
{
"name": "@module-federation/bridge-vue3",
"author": "zhouxiao <codingzx@gmail.com>",
"version": "0.2.1",
"version": "0.2.2",
"publishConfig": {
"access": "public"
},
Expand Down
6 changes: 6 additions & 0 deletions packages/chrome-devtools/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @module-federation/devtools

## 0.2.2

### Patch Changes

- @module-federation/sdk@0.2.2

## 0.2.1

### 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.2.1",
"version": "0.2.2",
"scripts": {
"build:storybook": "storybook build",
"storybook": "storybook dev -p 6006",
Expand Down
9 changes: 9 additions & 0 deletions packages/dts-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @module-federation/dts-plugin

## 0.2.2

### Patch Changes

- 7d09ed8: Emit DTS relative to remote entry location
- @module-federation/sdk@0.2.2
- @module-federation/managers@0.2.2
- @module-federation/third-party-dts-extractor@0.2.2

## 0.2.1

### Patch 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.2.1",
"version": "0.2.2",
"author": "hanric <hanric.zhang@gmail.com>",
"main": "./dist/index.js",
"module": "./dist/index.js",
Expand Down
15 changes: 13 additions & 2 deletions packages/dts-plugin/src/plugins/GenerateTypesPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
generateTypesInChildProcess,
retrieveTypesAssetsInfo,
} from '../core/index';
import path from 'path';

export class GenerateTypesPlugin implements WebpackPluginInstance {
pluginOptions: moduleFederationPlugin.ModuleFederationPluginOptions;
Expand Down Expand Up @@ -88,10 +89,20 @@ export class GenerateTypesPlugin implements WebpackPluginInstance {
return;
}
await generateTypesFn(finalOptions);
const config = finalOptions.remote.moduleFederationConfig;
let zipPrefix = '';
const isManifestObject = typeof config.manifest === 'object';
if (isManifestObject && config.manifest.filePath) {
zipPrefix = config.manifest.filePath;
} else if (isManifestObject && config.manifest.fileName) {
zipPrefix = path.dirname(config.manifest.fileName);
} else if (config.filename) {
zipPrefix = path.dirname(config.filename);
}

if (zipTypesPath) {
compilation.emitAsset(
zipName,
path.join(zipPrefix, zipName),
new compiler.webpack.sources.RawSource(
fs.readFileSync(zipTypesPath),
false,
Expand All @@ -101,7 +112,7 @@ export class GenerateTypesPlugin implements WebpackPluginInstance {

if (apiTypesPath) {
compilation.emitAsset(
apiFileName,
path.join(zipPrefix, apiFileName),
new compiler.webpack.sources.RawSource(
fs.readFileSync(apiTypesPath),
false,
Expand Down
13 changes: 13 additions & 0 deletions packages/enhanced/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# [0.2.0-canary.5](https://github.com/module-federation/core/compare/enhanced-0.2.0-canary.4...enhanced-0.2.0-canary.5) (2023-11-20)

## 0.2.2

### Patch Changes

- Updated dependencies [7d09ed8]
- @module-federation/dts-plugin@0.2.2
- @module-federation/manifest@0.2.2
- @module-federation/rspack@0.2.2
- @module-federation/sdk@0.2.2
- @module-federation/runtime-tools@0.2.2
- @module-federation/managers@0.2.2
- @module-federation/bridge-react-webpack-plugin@0.2.2

## 0.2.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/enhanced/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@module-federation/enhanced",
"version": "0.2.1",
"version": "0.2.2",
"main": "./dist/src/index.js",
"types": "./dist/src/index.d.ts",
"repository": "https://github.com/module-federation/core/tree/main/packages/enhanced",
Expand Down
6 changes: 6 additions & 0 deletions packages/managers/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @module-federation/managers

## 0.2.2

### Patch Changes

- @module-federation/sdk@0.2.2

## 0.2.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/managers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@module-federation/managers",
"version": "0.2.1",
"version": "0.2.2",
"license": "MIT",
"description": "Provide managers for helping handle mf data .",
"keywords": [
Expand Down
Loading

0 comments on commit 4cc202e

Please sign in to comment.