Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 4 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 生成器获取工程方案版本的耗时日志
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
Loading