@modern-js/generator-utils 2.4.14 → 2.4.16

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/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @modern-js/generator-utils
2
2
 
3
+ ## 2.4.16
4
+
5
+ ### Patch Changes
6
+
7
+ - @modern-js/plugin-i18n@1.22.5
8
+ - @modern-js/utils@1.22.5
9
+ - @modern-js/generator-common@2.4.16
10
+
11
+ ## 2.4.15
12
+
13
+ ### Patch Changes
14
+
15
+ - 08e3aab: fix: module solution new command install plugin version
16
+
17
+ fix: 修复模块工程方案 new 命令安装插件版本
18
+
19
+ - @modern-js/generator-common@2.4.15
20
+ - @modern-js/plugin-i18n@1.22.4
21
+ - @modern-js/utils@1.22.4
22
+
3
23
  ## 2.4.14
4
24
 
5
25
  ### Patch Changes
@@ -64,8 +64,8 @@ export async function getModernPluginVersion(solution, packageName, options = {
64
64
  distTag
65
65
  } = options;
66
66
 
67
- const getLatetPluginVersion = async () => {
68
- const version = await getPackageVersion(`${packageName}@${distTag || 'latest'}`, registry);
67
+ const getLatetPluginVersion = async pluginVersion => {
68
+ const version = await getPackageVersion(`${packageName}@${pluginVersion || 'latest'}`, registry);
69
69
  return version;
70
70
  };
71
71
 
@@ -83,17 +83,17 @@ export async function getModernPluginVersion(solution, packageName, options = {
83
83
  const modernVersion = pkgInfo.version;
84
84
 
85
85
  if (typeof modernVersion !== 'string') {
86
- return getLatetPluginVersion();
86
+ return getLatetPluginVersion(distTag);
87
87
  }
88
88
 
89
89
  if (semver.lt(modernVersion, '1.15.0')) {
90
- return getLatetPluginVersion();
90
+ return getLatetPluginVersion(distTag);
91
91
  }
92
92
 
93
93
  return getAvailableVersion(packageName, modernVersion, registry);
94
94
  }
95
95
 
96
- return getLatetPluginVersion();
96
+ return getLatetPluginVersion(distTag);
97
97
  }
98
98
  export function getPackageManagerText(packageManager) {
99
99
  return packageManager === 'yarn' ? 'yarn' : `${packageManager} run`;
@@ -192,8 +192,8 @@ async function getModernPluginVersion(solution, packageName, options = {
192
192
  distTag
193
193
  } = options;
194
194
 
195
- const getLatetPluginVersion = async () => {
196
- const version = await getPackageVersion(`${packageName}@${distTag || 'latest'}`, registry);
195
+ const getLatetPluginVersion = async pluginVersion => {
196
+ const version = await getPackageVersion(`${packageName}@${pluginVersion || 'latest'}`, registry);
197
197
  return version;
198
198
  };
199
199
 
@@ -212,17 +212,17 @@ async function getModernPluginVersion(solution, packageName, options = {
212
212
  const modernVersion = pkgInfo.version;
213
213
 
214
214
  if (typeof modernVersion !== 'string') {
215
- return getLatetPluginVersion();
215
+ return getLatetPluginVersion(distTag);
216
216
  }
217
217
 
218
218
  if (_utils.semver.lt(modernVersion, '1.15.0')) {
219
- return getLatetPluginVersion();
219
+ return getLatetPluginVersion(distTag);
220
220
  }
221
221
 
222
222
  return (0, _package.getAvailableVersion)(packageName, modernVersion, registry);
223
223
  }
224
224
 
225
- return getLatetPluginVersion();
225
+ return getLatetPluginVersion(distTag);
226
226
  }
227
227
 
228
228
  function getPackageManagerText(packageManager) {
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.4.14",
14
+ "version": "2.4.16",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -28,9 +28,9 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@babel/runtime": "^7.18.0",
31
- "@modern-js/plugin-i18n": "1.22.3",
32
- "@modern-js/utils": "1.22.3",
33
- "@modern-js/generator-common": "2.4.14"
31
+ "@modern-js/plugin-i18n": "1.22.5",
32
+ "@modern-js/generator-common": "2.4.16",
33
+ "@modern-js/utils": "1.22.5"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@modern-js/codesmith": "1.6.3",
@@ -38,8 +38,8 @@
38
38
  "@types/node": "^14",
39
39
  "jest": "^27",
40
40
  "typescript": "^4",
41
- "@scripts/build": "1.22.3",
42
- "@scripts/jest-config": "1.22.3"
41
+ "@scripts/build": "1.22.5",
42
+ "@scripts/jest-config": "1.22.5"
43
43
  },
44
44
  "sideEffects": false,
45
45
  "modernConfig": {