Skip to content

Commit

Permalink
Merge branch 'main' into feat/search_package_json_for_dual_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
barabaiiika authored Oct 21, 2024
2 parents 9ca1e7c + b29c403 commit 4db7c35
Show file tree
Hide file tree
Showing 104 changed files with 3,293 additions and 957 deletions.
8 changes: 0 additions & 8 deletions .changeset/ai-quick-eagle.md

This file was deleted.

3 changes: 2 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"@module-federation/bridge-react-webpack-plugin",
"@module-federation/modern-js",
"@module-federation/retry-plugin",
"@module-federation/data-prefetch"
"@module-federation/data-prefetch",
"@module-federation/rsbuild-plugin"
]
],
"ignorePatterns": ["^alpha|^beta"],
Expand Down
5 changes: 0 additions & 5 deletions .changeset/fuzzy-brooms-dance.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/happy-chefs-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@module-federation/rsbuild-plugin': patch
---

fix: configure the default assetPrefix for MF apps correctly
5 changes: 0 additions & 5 deletions .changeset/hip-pandas-care.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/mean-geckos-help.md

This file was deleted.

39 changes: 20 additions & 19 deletions ai-lint-fix.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const { OpenAI } = require('openai');
const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');
const glob = require('glob');

// Initialize OpenAI client
const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
Expand Down Expand Up @@ -68,21 +69,6 @@ async function processFile(filePath) {
const lintedContent = await lintFileContent(fileContent);
fs.writeFileSync(filePath, lintedContent, 'utf8');
console.log(`File has been linted and updated successfully: ${filePath}`);
const tsConfigPath = findTsConfig(filePath);
try {
const tscOutput = execFileSync(
'tsc',
['--noEmit', '--project', tsConfigPath],
{
stdio: 'pipe',
},
).toString();
console.log(`TypeScript check passed for ${filePath}:\n${tscOutput}`);
} catch (error) {
console.error(
`TypeScript check failed for ${filePath}:\n${error.stdout.toString()}`,
);
}
} catch (error) {
console.error(`Error performing linting on ${filePath}:`, error.message);
process.exit(1);
Expand All @@ -101,17 +87,32 @@ function findTsConfig(filePath) {
throw new Error('tsconfig.json not found');
}

async function processFilesWithConcurrencyLimit(files, limit) {
const results = [];
const executing = [];

for (const file of files) {
const p = processFile(file).then(() => {
executing.splice(executing.indexOf(p), 1);
});
results.push(p);
executing.push(p);
if (executing.length >= limit) {
await Promise.race(executing);
}
}

return Promise.all(results);
}

async function main() {
if (argv.path) {
await processFile(argv.path);
} else if (argv.pattern) {
console.log('pattern', argv.pattern);
try {
const files = await glob.glob(argv.pattern);

for (const filePath of files) {
await processFile(filePath);
}
await processFilesWithConcurrencyLimit(files, 3); // Process files with concurrency limit of 3
} catch (err) {
console.error('Error finding files:', err.message);
process.exit(1);
Expand Down
2 changes: 1 addition & 1 deletion apps/3000-home/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"antd": "5.19.1",
"@ant-design/cssinjs": "^1.21.0",
"lodash": "4.17.21",
"next": "14.2.14",
"next": "14.2.15",
"react": "18.3.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion apps/3001-shop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"antd": "5.19.1",
"@ant-design/cssinjs": "^1.21.0",
"lodash": "4.17.21",
"next": "14.2.14",
"next": "14.2.15",
"react": "18.3.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion apps/3002-checkout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"antd": "5.19.1",
"@ant-design/cssinjs": "^1.21.0",
"lodash": "4.17.21",
"next": "14.2.14",
"next": "14.2.15",
"react": "18.3.1"
},
"devDependencies": {
Expand Down
6 changes: 6 additions & 0 deletions apps/modernjs-ssr/dynamic-nested-remote/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# modernjs-ssr-dynamic-nested-remote

## 0.1.31

### Patch Changes

- @module-federation/modern-js@0.6.11

## 0.1.30

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions apps/modernjs-ssr/dynamic-nested-remote/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "modernjs-ssr-dynamic-nested-remote",
"private": true,
"version": "0.1.30",
"version": "0.1.31",
"scripts": {
"reset": "npx rimraf ./**/node_modules",
"dev": "modern dev",
Expand All @@ -26,17 +26,17 @@
],
"dependencies": {
"@babel/runtime": "7.25.7",
"@modern-js/runtime": "2.60.2",
"@modern-js/runtime": "2.60.3",
"@module-federation/modern-js": "workspace:*",
"antd": "4.24.15",
"react": "~18.3.1",
"react-dom": "~18.3.1"
},
"devDependencies": {
"@modern-js-app/eslint-config": "2.59.0",
"@modern-js/app-tools": "2.60.2",
"@modern-js/app-tools": "2.60.3",
"@modern-js/eslint-config": "2.59.0",
"@modern-js/tsconfig": "2.60.2",
"@modern-js/tsconfig": "2.60.3",
"@types/jest": "~29.5.0",
"@types/node": "~16.11.7",
"@types/react": "~18.2.0",
Expand Down
6 changes: 6 additions & 0 deletions apps/modernjs-ssr/dynamic-remote-new-version/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# modernjs-ssr-dynamic-remote-new-version

## 0.1.31

### Patch Changes

- @module-federation/modern-js@0.6.11

## 0.1.30

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions apps/modernjs-ssr/dynamic-remote-new-version/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "modernjs-ssr-dynamic-remote-new-version",
"private": true,
"version": "0.1.30",
"version": "0.1.31",
"scripts": {
"reset": "npx rimraf ./**/node_modules",
"dev": "modern dev",
Expand All @@ -26,17 +26,17 @@
],
"dependencies": {
"@babel/runtime": "7.24.4",
"@modern-js/runtime": "2.60.2",
"@modern-js/runtime": "2.60.3",
"@module-federation/modern-js": "workspace:*",
"antd": "4.24.15",
"react": "~18.3.1",
"react-dom": "~18.3.1"
},
"devDependencies": {
"@modern-js-app/eslint-config": "2.59.0",
"@modern-js/app-tools": "2.60.2",
"@modern-js/app-tools": "2.60.3",
"@modern-js/eslint-config": "2.59.0",
"@modern-js/tsconfig": "2.60.2",
"@modern-js/tsconfig": "2.60.3",
"@types/jest": "~29.5.0",
"@types/node": "~16.11.7",
"@types/react": "~18.2.0",
Expand Down
6 changes: 6 additions & 0 deletions apps/modernjs-ssr/dynamic-remote/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# modernjs-ssr-dynamic-remote

## 0.1.31

### Patch Changes

- @module-federation/modern-js@0.6.11

## 0.1.30

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions apps/modernjs-ssr/dynamic-remote/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "modernjs-ssr-dynamic-remote",
"private": true,
"version": "0.1.30",
"version": "0.1.31",
"scripts": {
"reset": "npx rimraf ./**/node_modules",
"dev": "modern dev",
Expand All @@ -26,17 +26,17 @@
],
"dependencies": {
"@babel/runtime": "7.24.4",
"@modern-js/runtime": "2.60.2",
"@modern-js/runtime": "2.60.3",
"@module-federation/modern-js": "workspace:*",
"antd": "4.24.15",
"react": "~18.3.1",
"react-dom": "~18.3.1"
},
"devDependencies": {
"@modern-js-app/eslint-config": "2.59.0",
"@modern-js/app-tools": "2.60.2",
"@modern-js/app-tools": "2.60.3",
"@modern-js/eslint-config": "2.59.0",
"@modern-js/tsconfig": "2.60.2",
"@modern-js/tsconfig": "2.60.3",
"@types/jest": "~29.5.0",
"@types/node": "~16.11.7",
"@types/react": "~18.2.0",
Expand Down
6 changes: 6 additions & 0 deletions apps/modernjs-ssr/host/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# modernjs-ssr-host

## 0.1.31

### Patch Changes

- @module-federation/modern-js@0.6.11

## 0.1.30

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions apps/modernjs-ssr/host/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "modernjs-ssr-host",
"private": true,
"version": "0.1.30",
"version": "0.1.31",
"scripts": {
"reset": "npx rimraf ./**/node_modules",
"dev": "modern dev",
Expand All @@ -26,17 +26,17 @@
],
"dependencies": {
"@babel/runtime": "7.24.4",
"@modern-js/runtime": "2.60.2",
"@modern-js/runtime": "2.60.3",
"@module-federation/modern-js": "workspace:*",
"antd": "4.24.15",
"react": "~18.3.1",
"react-dom": "~18.3.1"
},
"devDependencies": {
"@modern-js-app/eslint-config": "2.59.0",
"@modern-js/app-tools": "2.60.2",
"@modern-js/app-tools": "2.60.3",
"@modern-js/eslint-config": "2.59.0",
"@modern-js/tsconfig": "2.60.2",
"@modern-js/tsconfig": "2.60.3",
"@types/jest": "~29.5.0",
"@types/node": "~16.11.7",
"@types/react": "~18.2.0",
Expand Down
6 changes: 6 additions & 0 deletions apps/modernjs-ssr/nested-remote/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# modernjs-ssr-nested-remote

## 0.1.31

### Patch Changes

- @module-federation/modern-js@0.6.11

## 0.1.30

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions apps/modernjs-ssr/nested-remote/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "modernjs-ssr-nested-remote",
"private": true,
"version": "0.1.30",
"version": "0.1.31",
"scripts": {
"reset": "npx rimraf ./**/node_modules",
"dev": "modern dev",
Expand All @@ -26,17 +26,17 @@
],
"dependencies": {
"@babel/runtime": "7.24.4",
"@modern-js/runtime": "2.60.2",
"@modern-js/runtime": "2.60.3",
"@module-federation/modern-js": "workspace:*",
"antd": "4.24.15",
"react": "~18.3.1",
"react-dom": "~18.3.1"
},
"devDependencies": {
"@modern-js-app/eslint-config": "2.59.0",
"@modern-js/app-tools": "2.60.2",
"@modern-js/app-tools": "2.60.3",
"@modern-js/eslint-config": "2.59.0",
"@modern-js/tsconfig": "2.60.2",
"@modern-js/tsconfig": "2.60.3",
"@types/jest": "~29.5.0",
"@types/node": "~16.11.7",
"@types/react": "~18.2.0",
Expand Down
6 changes: 6 additions & 0 deletions apps/modernjs-ssr/remote-new-version/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# modernjs-ssr-remote-new-version

## 0.1.33

### Patch Changes

- @module-federation/modern-js@0.6.11

## 0.1.32

### Patch Changes
Expand Down
8 changes: 4 additions & 4 deletions apps/modernjs-ssr/remote-new-version/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "modernjs-ssr-remote-new-version",
"private": true,
"version": "0.1.32",
"version": "0.1.33",
"scripts": {
"reset": "npx rimraf ./**/node_modules",
"dev": "modern dev",
Expand All @@ -26,17 +26,17 @@
],
"dependencies": {
"@babel/runtime": "7.24.4",
"@modern-js/runtime": "2.60.2",
"@modern-js/runtime": "2.60.3",
"@module-federation/modern-js": "workspace:*",
"antd": "4.24.15",
"react": "~18.3.1",
"react-dom": "~18.3.1"
},
"devDependencies": {
"@modern-js-app/eslint-config": "2.59.0",
"@modern-js/app-tools": "2.60.2",
"@modern-js/app-tools": "2.60.3",
"@modern-js/eslint-config": "2.59.0",
"@modern-js/tsconfig": "2.60.2",
"@modern-js/tsconfig": "2.60.3",
"@types/jest": "~29.5.0",
"@types/node": "~16.11.7",
"@types/react": "~18.2.0",
Expand Down
Loading

0 comments on commit 4db7c35

Please sign in to comment.