Skip to content

Commit

Permalink
Merge branch 'main' into feat-no-ssr-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
targeral committed Sep 24, 2024
2 parents 827ab0e + 85b4535 commit 05a64f6
Show file tree
Hide file tree
Showing 35 changed files with 1,292 additions and 1,760 deletions.
8 changes: 8 additions & 0 deletions .changeset/chilly-coins-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@modern-js/module-generator': patch
'@modern-js/mwa-generator': patch
---

feat: add timing log for mwa and module generator to get solution version

feat: 增加 mwa 和 module 生成器获取工程方案版本的耗时日志
5 changes: 5 additions & 0 deletions .changeset/rotten-keys-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@scripts/build': patch
---

chore: use module-tools from npm to speed up building
16 changes: 13 additions & 3 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended", "schedule:weekly"],
"ignorePaths": ["**/tests/**", "**/node_modules/**"],
// ensure pnpmfile can be run
"allowScripts": true,
"packageRules": [
// Use chore as semantic commit type for commit messages
{
Expand All @@ -22,6 +20,16 @@
"packagePatterns": ["rspress"],
"groupSlug": "rspress"
},
{
"groupName": "codesmith",
"packagePatterns": ["modern-js/codesmith"],
"groupSlug": "codesmith"
},
{
"groupName": "reduck",
"packagePatterns": ["modern-js-reduck"],
"groupSlug": "reduck"
},
{
"groupName": "types",
"packagePatterns": ["^@types/"],
Expand Down Expand Up @@ -52,6 +60,8 @@
"strip-ansi",
// align Node.js version minimum requirements
"@types/node",
"node"
"node",
// server core hono dependency can not bump
"hono"
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"test:ut:update": "pnpm run test:jest -u && pnpm run test:vitest -u",
"test:e2e": "cd tests && npm run test",
"lint:package-json": "cd ./scripts/lint-package-json && pnpm start",
"prepare-build": "cross-env NX_DAEMON=false NX_REJECT_UNKNOWN_LOCAL_CACHE=0 nx run-many -t build -p @modern-js/* --maxParallel=4",
"prepare-build": "cross-env NX_DAEMON=false NX_REJECT_UNKNOWN_LOCAL_CACHE=0 nx run-many -t build -p @modern-js/* --exclude=@modern-js/main-doc,@modern-js/module-tools-docs --maxParallel=4",
"prepare": "npm run prepare-build && husky install",
"build:required": "cross-env NX_DAEMON=false nx run-many -t build -p @modern-js/uni-builder",
"lint": "biome check",
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"clipboardy": "^4.0.0",
"cookie-es": "^1.0.0",
"flatted": "^3.2.9",
"hono": "4.5.1",
"hono": "4.5.8",
"hookable": "^5.5.3",
"open": "^10.1.0",
"p-defer": "^3.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/generator/generator-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
"test": "jest --passWithNoTests"
},
"dependencies": {
"@modern-js/codesmith-formily": "2.5.0",
"@modern-js/codesmith-formily": "2.5.1",
"@modern-js/plugin-i18n": "workspace:*",
"@swc/helpers": "0.5.13"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/utils": "workspace:*",
"@scripts/build": "workspace:*",
"@scripts/jest-config": "workspace:*",
Expand Down
10 changes: 5 additions & 5 deletions packages/generator/generator-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"test": "jest"
},
"dependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-git": "2.5.0",
"@modern-js/codesmith-api-json": "2.5.0",
"@modern-js/codesmith-api-npm": "2.5.0",
"@modern-js/codesmith-formily": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-git": "2.5.1",
"@modern-js/codesmith-api-json": "2.5.1",
"@modern-js/codesmith-api-npm": "2.5.1",
"@modern-js/codesmith-formily": "2.5.1",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
"@modern-js/new-action": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/generator/generator-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@swc/helpers": "0.5.13"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@scripts/build": "workspace:*",
"@scripts/jest-config": "workspace:*",
"@types/jest": "^29",
Expand Down
4 changes: 2 additions & 2 deletions packages/generator/generators/base-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"@modern-js/utils": "workspace:*"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
"@scripts/build": "workspace:*",
Expand Down
6 changes: 3 additions & 3 deletions packages/generator/generators/bff-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"@modern-js/utils": "workspace:*"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith-api-json": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/codesmith-api-json": "2.5.1",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
"@modern-js/plugin-i18n": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"@modern-js/utils": "workspace:*"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/generator-common": "workspace:*",
"@scripts/build": "workspace:*",
"@scripts/jest-config": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"@modern-js/utils": "workspace:*"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith-api-json": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/codesmith-api-json": "2.5.1",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
"@modern-js/plugin-i18n": "workspace:*",
Expand Down
6 changes: 3 additions & 3 deletions packages/generator/generators/entry-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"@modern-js/utils": "workspace:*"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith-api-handlebars": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/codesmith-api-handlebars": "2.5.1",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
"@modern-js/plugin-i18n": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"@modern-js/utils": "workspace:*"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith-api-json": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/codesmith-api-json": "2.5.1",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
"@modern-js/module-generator": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"@modern-js/utils": "workspace:*"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith-api-json": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/codesmith-api-json": "2.5.1",
"@modern-js/dependence-generator": "workspace:*",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/generator/generators/module-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"devDependencies": {
"@modern-js/base-generator": "workspace:*",
"@modern-js/changeset-generator": "workspace:*",
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/dependence-generator": "workspace:*",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
Expand Down
2 changes: 2 additions & 0 deletions packages/generator/generators/module-generator/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,13 @@ export const handleTemplateFile = async (
);
}

generator.logger?.timing(`🕐 Get Modern.js module-tools version`);
const modernVersion = await getModernVersion(
Solution.Module,
context.config.registry,
context.config.distTag,
);
generator.logger?.timing(`🕐 Get Modern.js module-tools version`, true);

generator.logger.debug(`💡 [Input Answer]: ${JSON.stringify(ans)}`);

Expand Down
4 changes: 2 additions & 2 deletions packages/generator/generators/mwa-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
},
"devDependencies": {
"@modern-js/base-generator": "workspace:*",
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/dependence-generator": "workspace:*",
"@modern-js/entry-generator": "workspace:*",
"@modern-js/generator-common": "workspace:*",
Expand Down
2 changes: 2 additions & 0 deletions packages/generator/generators/mwa-generator/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ export const handleTemplateFile = async (
);
}

generator.logger?.timing(`🕐 Get Modern.js app-tools version`);
const modernVersion = await getModernVersion(
Solution.MWA,
context.config.registry,
context.config.distTag,
);
generator.logger?.timing(`🕐 Get Modern.js app-tools version`, true);

generator.logger.debug(`💡 [Input Answer]: ${JSON.stringify(ans)}`);

Expand Down
6 changes: 3 additions & 3 deletions packages/generator/generators/packages-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"@modern-js/utils": "workspace:*"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith-api-json": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/codesmith-api-json": "2.5.1",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
"@scripts/build": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/generator/generators/repo-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
},
"devDependencies": {
"@modern-js/base-generator": "workspace:*",
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-plugin": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"@modern-js/utils": "workspace:*"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/dependence-generator": "workspace:*",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
Expand Down
6 changes: 3 additions & 3 deletions packages/generator/generators/server-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"@modern-js/utils": "workspace:*"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith-api-json": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/codesmith-api-json": "2.5.1",
"@modern-js/dependence-generator": "workspace:*",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/generator/generators/ssg-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"@modern-js/utils": "workspace:*"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/dependence-generator": "workspace:*",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"test": "jest --passWithNoTests"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith-api-json": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/codesmith-api-json": "2.5.1",
"@modern-js/dependence-generator": "workspace:*",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"@modern-js/utils": "workspace:*"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith-api-json": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/codesmith-api-json": "2.5.1",
"@modern-js/dependence-generator": "workspace:*",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
Expand Down
6 changes: 3 additions & 3 deletions packages/generator/generators/upgrade-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"test": "jest --passWithNoTests"
},
"dependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-api-app": "2.5.0",
"@modern-js/codesmith-api-json": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-api-app": "2.5.1",
"@modern-js/codesmith-api-json": "2.5.1",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
"@modern-js/plugin-i18n": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/generator/new-action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"test": "jest --passWithNoTests"
},
"dependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith-formily": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/codesmith-formily": "2.5.1",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
"@modern-js/utils": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/generator/sandpack-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"devDependencies": {
"@modern-js/base-generator": "workspace:*",
"@modern-js/codesmith-api-handlebars": "2.5.0",
"@modern-js/codesmith-api-handlebars": "2.5.1",
"@modern-js/entry-generator": "workspace:*",
"@modern-js/generator-common": "workspace:*",
"@modern-js/generator-utils": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/create/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"test": "jest --passWithNoTests"
},
"devDependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/generator-plugin-plugin": "workspace:*",
"@modern-js/plugin-i18n": "workspace:*",
"@modern-js/repo-generator": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/upgrade/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"test": "jest --passWithNoTests"
},
"dependencies": {
"@modern-js/codesmith": "2.5.0",
"@modern-js/codesmith": "2.5.1",
"@modern-js/plugin-i18n": "workspace:*",
"@modern-js/utils": "workspace:*",
"@swc/helpers": "0.5.13"
Expand Down
Loading

0 comments on commit 05a64f6

Please sign in to comment.