@modern-js/upgrade-generator 3.3.24 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -34
- package/package.json +7 -7
- package/src/index.ts +0 -17
package/dist/index.js
CHANGED
|
@@ -63486,7 +63486,6 @@ var ZH_LOCALE2 = {
|
|
|
63486
63486
|
self: "请选择你想创建的工程类型",
|
|
63487
63487
|
mwa: "Web 应用",
|
|
63488
63488
|
module: "Npm 模块",
|
|
63489
|
-
monorepo: "Monorepo",
|
|
63490
63489
|
custom: "自定义",
|
|
63491
63490
|
default: "默认"
|
|
63492
63491
|
},
|
|
@@ -63507,8 +63506,6 @@ var ZH_LOCALE2 = {
|
|
|
63507
63506
|
bff: "启用「BFF」功能",
|
|
63508
63507
|
micro_frontend: "启用「微前端」模式",
|
|
63509
63508
|
i18n: "启用「国际化(i18n)」功能",
|
|
63510
|
-
test: "启用「单元测试 / 集成测试」功能",
|
|
63511
|
-
e2e_test: "启用「E2E 测试」功能",
|
|
63512
63509
|
storybookV7: "启用「Storybook」V7",
|
|
63513
63510
|
runtime_api: "启用「Runtime API」",
|
|
63514
63511
|
ssg: "启用「SSG」功能",
|
|
@@ -63581,7 +63578,6 @@ var EN_LOCALE2 = {
|
|
|
63581
63578
|
self: "Please select the type of project you want to create:",
|
|
63582
63579
|
mwa: "Web App",
|
|
63583
63580
|
module: "Npm Module",
|
|
63584
|
-
monorepo: "Monorepo",
|
|
63585
63581
|
custom: "Custom Solution",
|
|
63586
63582
|
default: "Default"
|
|
63587
63583
|
},
|
|
@@ -63591,8 +63587,7 @@ var EN_LOCALE2 = {
|
|
|
63591
63587
|
sub_solution: {
|
|
63592
63588
|
self: "Please select the type of project you want to create:",
|
|
63593
63589
|
mwa: "Web App",
|
|
63594
|
-
module: "Npm Module"
|
|
63595
|
-
monorepo: "Monorepo"
|
|
63590
|
+
module: "Npm Module"
|
|
63596
63591
|
},
|
|
63597
63592
|
action: {
|
|
63598
63593
|
self: "Please select the operation you want:",
|
|
@@ -63603,8 +63598,6 @@ var EN_LOCALE2 = {
|
|
|
63603
63598
|
bff: "Enable BFF",
|
|
63604
63599
|
micro_frontend: "Enable Micro Frontend",
|
|
63605
63600
|
i18n: "Enable Internationalization (i18n)",
|
|
63606
|
-
test: "Enable Unit Test / Integration Test",
|
|
63607
|
-
e2e_test: "Enable E2E Test",
|
|
63608
63601
|
storybookV7: "Enable Storybook V7",
|
|
63609
63602
|
runtime_api: "Enable Runtime API",
|
|
63610
63603
|
ssg: "Enable SSG",
|
|
@@ -63680,25 +63673,17 @@ var localeKeys2 = i18n2.init("en", {
|
|
|
63680
63673
|
|
|
63681
63674
|
// ../../generator-common/dist/esm-node/common/solution.js
|
|
63682
63675
|
var Solution;
|
|
63683
|
-
(function(
|
|
63684
|
-
|
|
63685
|
-
|
|
63686
|
-
Solution2["Monorepo"] = "monorepo";
|
|
63676
|
+
(function(Solution22) {
|
|
63677
|
+
Solution22["MWA"] = "mwa";
|
|
63678
|
+
Solution22["Module"] = "module";
|
|
63687
63679
|
})(Solution || (Solution = {}));
|
|
63688
|
-
var SubSolution;
|
|
63689
|
-
(function(SubSolution2) {
|
|
63690
|
-
SubSolution2["MWA"] = "mwa";
|
|
63691
|
-
SubSolution2["Module"] = "module";
|
|
63692
|
-
})(SubSolution || (SubSolution = {}));
|
|
63693
63680
|
var SolutionText = {
|
|
63694
63681
|
["mwa"]: () => i18n2.t(localeKeys2.solution.mwa),
|
|
63695
|
-
["module"]: () => i18n2.t(localeKeys2.solution.module)
|
|
63696
|
-
["monorepo"]: () => i18n2.t(localeKeys2.solution.monorepo)
|
|
63682
|
+
["module"]: () => i18n2.t(localeKeys2.solution.module)
|
|
63697
63683
|
};
|
|
63698
63684
|
var SolutionToolsMap = {
|
|
63699
63685
|
["mwa"]: "@modern-js/app-tools",
|
|
63700
|
-
["module"]: "@modern-js/module-tools"
|
|
63701
|
-
["monorepo"]: "@modern-js/monorepo-tools"
|
|
63686
|
+
["module"]: "@modern-js/module-tools"
|
|
63702
63687
|
};
|
|
63703
63688
|
|
|
63704
63689
|
// ../../generator-common/dist/esm-node/common/packageManager.js
|
|
@@ -63855,7 +63840,7 @@ var ZH_LOCALE3 = {
|
|
|
63855
63840
|
no_solution: `当前项目不包含 Modern.js 工程方案依赖,请先安装相关工程方案依赖。
|
|
63856
63841
|
- 应用项目(@modern-js/app-tools)
|
|
63857
63842
|
- 模块项目(@modern-js/module-tools)
|
|
63858
|
-
|
|
63843
|
+
`,
|
|
63859
63844
|
more_solution: "项目中不允许同时包含多种工程方案相关依赖,请先移除不相关的工程方案依赖。"
|
|
63860
63845
|
},
|
|
63861
63846
|
success: "已更新 Modern.js 依赖至最新版本",
|
|
@@ -63949,18 +63934,6 @@ var handleTemplateFile = async (context, generator, appApi) => {
|
|
|
63949
63934
|
import_utils18.fs.writeFileSync(npmrcPath, "strict-peer-dependencies=false");
|
|
63950
63935
|
}
|
|
63951
63936
|
}
|
|
63952
|
-
if (solutions[0] === Solution.Monorepo && packageManager === PackageManager.Pnpm) {
|
|
63953
|
-
await (0, import_utils18.execa)(
|
|
63954
|
-
"pnpm",
|
|
63955
|
-
["update", "@modern-js/*", "@modern-js-app/*", "--recursive", "--latest"],
|
|
63956
|
-
{
|
|
63957
|
-
stdin: "inherit",
|
|
63958
|
-
stdout: "inherit",
|
|
63959
|
-
stderr: "inherit"
|
|
63960
|
-
}
|
|
63961
|
-
);
|
|
63962
|
-
return;
|
|
63963
|
-
}
|
|
63964
63937
|
const modernDeps = Object.keys(pkgInfo.dependencies || {}).filter(
|
|
63965
63938
|
(dep) => dep.startsWith("@modern-js") || dep.startsWith("@modern-js-app")
|
|
63966
63939
|
);
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.
|
|
18
|
+
"version": "3.4.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"files": [
|
|
@@ -26,18 +26,18 @@
|
|
|
26
26
|
"@modern-js/codesmith": "2.3.5",
|
|
27
27
|
"@modern-js/codesmith-api-app": "2.3.5",
|
|
28
28
|
"@modern-js/codesmith-api-json": "2.3.5",
|
|
29
|
-
"@modern-js/utils": "2.
|
|
30
|
-
"@modern-js/generator-common": "3.
|
|
31
|
-
"@modern-js/
|
|
32
|
-
"@modern-js/
|
|
29
|
+
"@modern-js/utils": "2.53.0",
|
|
30
|
+
"@modern-js/generator-common": "3.4.0",
|
|
31
|
+
"@modern-js/generator-utils": "3.4.0",
|
|
32
|
+
"@modern-js/plugin-i18n": "2.53.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/jest": "^29",
|
|
36
36
|
"@types/node": "^14",
|
|
37
37
|
"jest": "^29",
|
|
38
38
|
"typescript": "^5",
|
|
39
|
-
"@scripts/build": "2.
|
|
40
|
-
"@scripts/jest-config": "2.
|
|
39
|
+
"@scripts/build": "2.53.0",
|
|
40
|
+
"@scripts/jest-config": "2.53.0"
|
|
41
41
|
},
|
|
42
42
|
"sideEffects": false,
|
|
43
43
|
"publishConfig": {
|
package/src/index.ts
CHANGED
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
getModernVersion,
|
|
9
9
|
getPackageManager,
|
|
10
10
|
getPackageObj,
|
|
11
|
-
execa,
|
|
12
11
|
semver,
|
|
13
12
|
fs,
|
|
14
13
|
isPackageExist,
|
|
@@ -118,22 +117,6 @@ export const handleTemplateFile = async (
|
|
|
118
117
|
}
|
|
119
118
|
}
|
|
120
119
|
|
|
121
|
-
if (
|
|
122
|
-
solutions[0] === Solution.Monorepo &&
|
|
123
|
-
packageManager === PackageManager.Pnpm
|
|
124
|
-
) {
|
|
125
|
-
await execa(
|
|
126
|
-
'pnpm',
|
|
127
|
-
['update', '@modern-js/*', '@modern-js-app/*', '--recursive', '--latest'],
|
|
128
|
-
{
|
|
129
|
-
stdin: 'inherit',
|
|
130
|
-
stdout: 'inherit',
|
|
131
|
-
stderr: 'inherit',
|
|
132
|
-
},
|
|
133
|
-
);
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
120
|
const modernDeps = Object.keys(pkgInfo.dependencies || {}).filter(
|
|
138
121
|
dep => dep.startsWith('@modern-js') || dep.startsWith('@modern-js-app'),
|
|
139
122
|
);
|