@modern-js/generator-utils 3.0.4 → 3.0.5
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 +16 -0
- package/dist/js/modern/index.js +3 -13
- package/dist/js/node/index.js +0 -9
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @modern-js/generator-utils
|
|
2
2
|
|
|
3
|
+
## 3.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 70fb3d5: fix: use yarn not get right package version
|
|
8
|
+
|
|
9
|
+
fix: 修复使用 yarn 获取包版本失败问题
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [fd5a3ed]
|
|
12
|
+
- Updated dependencies [61c1ce5]
|
|
13
|
+
- Updated dependencies [6ca1c0b]
|
|
14
|
+
- Updated dependencies [89b6739]
|
|
15
|
+
- @modern-js/utils@2.3.0
|
|
16
|
+
- @modern-js/generator-common@3.0.5
|
|
17
|
+
- @modern-js/plugin-i18n@2.3.0
|
|
18
|
+
|
|
3
19
|
## 3.0.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/js/modern/index.js
CHANGED
|
@@ -25,8 +25,7 @@ import {
|
|
|
25
25
|
execa,
|
|
26
26
|
getMonorepoPackages,
|
|
27
27
|
canUseNpm,
|
|
28
|
-
canUsePnpm
|
|
29
|
-
canUseYarn
|
|
28
|
+
canUsePnpm
|
|
30
29
|
} from "@modern-js/utils";
|
|
31
30
|
import { SolutionToolsMap } from "@modern-js/generator-common";
|
|
32
31
|
import { stripAnsi } from "./utils/strip-ansi";
|
|
@@ -43,7 +42,7 @@ import {
|
|
|
43
42
|
getPackageManager,
|
|
44
43
|
canUseNpm as canUseNpm2,
|
|
45
44
|
canUsePnpm as canUsePnpm2,
|
|
46
|
-
canUseYarn
|
|
45
|
+
canUseYarn,
|
|
47
46
|
isReact18
|
|
48
47
|
} from "@modern-js/utils";
|
|
49
48
|
import { i18n as i18n2 } from "./locale";
|
|
@@ -62,15 +61,6 @@ function getPackageVersion(packageName, registry) {
|
|
|
62
61
|
spinner.stop();
|
|
63
62
|
return stripAnsi(result.stdout);
|
|
64
63
|
}
|
|
65
|
-
if (yield canUseYarn()) {
|
|
66
|
-
const args = ["info", packageName, "version", "--silent"];
|
|
67
|
-
if (registry) {
|
|
68
|
-
args.push(`--registry=${registry}`);
|
|
69
|
-
}
|
|
70
|
-
const result = yield execa("yarn", args);
|
|
71
|
-
spinner.stop();
|
|
72
|
-
return stripAnsi(result.stdout);
|
|
73
|
-
}
|
|
74
64
|
if (yield canUseNpm()) {
|
|
75
65
|
const args = ["view", packageName, "version"];
|
|
76
66
|
if (registry) {
|
|
@@ -196,7 +186,7 @@ function getModernConfigFile(appDir) {
|
|
|
196
186
|
export {
|
|
197
187
|
canUseNpm2 as canUseNpm,
|
|
198
188
|
canUsePnpm2 as canUsePnpm,
|
|
199
|
-
|
|
189
|
+
canUseYarn,
|
|
200
190
|
execa2 as execa,
|
|
201
191
|
fs2 as fs,
|
|
202
192
|
getAllPackages,
|
package/dist/js/node/index.js
CHANGED
|
@@ -94,15 +94,6 @@ function getPackageVersion(packageName, registry) {
|
|
|
94
94
|
spinner.stop();
|
|
95
95
|
return (0, import_strip_ansi.stripAnsi)(result.stdout);
|
|
96
96
|
}
|
|
97
|
-
if (yield (0, import_utils.canUseYarn)()) {
|
|
98
|
-
const args = ["info", packageName, "version", "--silent"];
|
|
99
|
-
if (registry) {
|
|
100
|
-
args.push(`--registry=${registry}`);
|
|
101
|
-
}
|
|
102
|
-
const result = yield (0, import_utils.execa)("yarn", args);
|
|
103
|
-
spinner.stop();
|
|
104
|
-
return (0, import_strip_ansi.stripAnsi)(result.stdout);
|
|
105
|
-
}
|
|
106
97
|
if (yield (0, import_utils.canUseNpm)()) {
|
|
107
98
|
const args = ["view", packageName, "version"];
|
|
108
99
|
if (registry) {
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "3.0.
|
|
14
|
+
"version": "3.0.5",
|
|
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": "2.
|
|
32
|
-
"@modern-js/generator-common": "3.0.
|
|
33
|
-
"@modern-js/utils": "2.
|
|
31
|
+
"@modern-js/plugin-i18n": "2.3.0",
|
|
32
|
+
"@modern-js/generator-common": "3.0.5",
|
|
33
|
+
"@modern-js/utils": "2.3.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@modern-js/codesmith": "2.0.3",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@types/node": "^14",
|
|
39
39
|
"jest": "^27",
|
|
40
40
|
"typescript": "^4",
|
|
41
|
-
"@scripts/
|
|
42
|
-
"@scripts/
|
|
41
|
+
"@scripts/jest-config": "2.3.0",
|
|
42
|
+
"@scripts/build": "2.3.0"
|
|
43
43
|
},
|
|
44
44
|
"sideEffects": false,
|
|
45
45
|
"modernConfig": {
|