@modern-js/generator-utils 3.1.19 → 3.1.21
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 +26 -0
- package/dist/cjs/index.js +75 -25
- package/dist/cjs/locale/en.js +3 -1
- package/dist/cjs/locale/index.js +6 -2
- package/dist/cjs/locale/zh.js +3 -1
- package/dist/cjs/utils/fsExist.js +3 -1
- package/dist/cjs/utils/package.js +12 -4
- package/dist/cjs/utils/stripAnsi.js +3 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @modern-js/generator-utils
|
|
2
2
|
|
|
3
|
+
## 3.1.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [e2848a2]
|
|
8
|
+
- Updated dependencies [d4045ed]
|
|
9
|
+
- @modern-js/utils@2.22.1
|
|
10
|
+
- @modern-js/plugin-i18n@2.22.1
|
|
11
|
+
- @modern-js/generator-common@3.1.21
|
|
12
|
+
|
|
13
|
+
## 3.1.20
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- b647c68: chore(generator): update codesmith version
|
|
18
|
+
|
|
19
|
+
chore(generator): 更新 codesmith 版本
|
|
20
|
+
|
|
21
|
+
- Updated dependencies [3d48836]
|
|
22
|
+
- Updated dependencies [5050e8e]
|
|
23
|
+
- Updated dependencies [b647c68]
|
|
24
|
+
- Updated dependencies [3c3d1e2]
|
|
25
|
+
- @modern-js/utils@2.22.0
|
|
26
|
+
- @modern-js/generator-common@3.1.20
|
|
27
|
+
- @modern-js/plugin-i18n@2.22.0
|
|
28
|
+
|
|
3
29
|
## 3.1.19
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -10,31 +10,81 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
ora: ()
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
13
|
+
ora: function() {
|
|
14
|
+
return _utils.ora;
|
|
15
|
+
},
|
|
16
|
+
fs: function() {
|
|
17
|
+
return _utils.fs;
|
|
18
|
+
},
|
|
19
|
+
semver: function() {
|
|
20
|
+
return _utils.semver;
|
|
21
|
+
},
|
|
22
|
+
execa: function() {
|
|
23
|
+
return _utils.execa;
|
|
24
|
+
},
|
|
25
|
+
chalk: function() {
|
|
26
|
+
return _utils.chalk;
|
|
27
|
+
},
|
|
28
|
+
readTsConfigByFile: function() {
|
|
29
|
+
return _utils.readTsConfigByFile;
|
|
30
|
+
},
|
|
31
|
+
getPackageManager: function() {
|
|
32
|
+
return _utils.getPackageManager;
|
|
33
|
+
},
|
|
34
|
+
canUseNpm: function() {
|
|
35
|
+
return _utils.canUseNpm;
|
|
36
|
+
},
|
|
37
|
+
canUsePnpm: function() {
|
|
38
|
+
return _utils.canUsePnpm;
|
|
39
|
+
},
|
|
40
|
+
canUseYarn: function() {
|
|
41
|
+
return _utils.canUseYarn;
|
|
42
|
+
},
|
|
43
|
+
isReact18: function() {
|
|
44
|
+
return _utils.isReact18;
|
|
45
|
+
},
|
|
46
|
+
i18n: function() {
|
|
47
|
+
return _locale.i18n;
|
|
48
|
+
},
|
|
49
|
+
getPackageVersion: function() {
|
|
50
|
+
return getPackageVersion;
|
|
51
|
+
},
|
|
52
|
+
getModernVersion: function() {
|
|
53
|
+
return getModernVersion;
|
|
54
|
+
},
|
|
55
|
+
getModernPluginVersion: function() {
|
|
56
|
+
return getModernPluginVersion;
|
|
57
|
+
},
|
|
58
|
+
getPackageManagerText: function() {
|
|
59
|
+
return getPackageManagerText;
|
|
60
|
+
},
|
|
61
|
+
isTsProject: function() {
|
|
62
|
+
return isTsProject;
|
|
63
|
+
},
|
|
64
|
+
getPackageObj: function() {
|
|
65
|
+
return getPackageObj;
|
|
66
|
+
},
|
|
67
|
+
getAllPackages: function() {
|
|
68
|
+
return getAllPackages;
|
|
69
|
+
},
|
|
70
|
+
validatePackageName: function() {
|
|
71
|
+
return validatePackageName;
|
|
72
|
+
},
|
|
73
|
+
validatePackagePath: function() {
|
|
74
|
+
return validatePackagePath;
|
|
75
|
+
},
|
|
76
|
+
getModuleProjectPath: function() {
|
|
77
|
+
return getModuleProjectPath;
|
|
78
|
+
},
|
|
79
|
+
getMWAProjectPath: function() {
|
|
80
|
+
return getMWAProjectPath;
|
|
81
|
+
},
|
|
82
|
+
getDocProjectPath: function() {
|
|
83
|
+
return getDocProjectPath;
|
|
84
|
+
},
|
|
85
|
+
getModernConfigFile: function() {
|
|
86
|
+
return getModernConfigFile;
|
|
87
|
+
}
|
|
38
88
|
});
|
|
39
89
|
const _export_star = require("@swc/helpers/_/_export_star");
|
|
40
90
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
package/dist/cjs/locale/en.js
CHANGED
package/dist/cjs/locale/index.js
CHANGED
|
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
i18n: ()
|
|
14
|
-
|
|
13
|
+
i18n: function() {
|
|
14
|
+
return i18n;
|
|
15
|
+
},
|
|
16
|
+
localeKeys: function() {
|
|
17
|
+
return localeKeys;
|
|
18
|
+
}
|
|
15
19
|
});
|
|
16
20
|
const _plugini18n = require("@modern-js/plugin-i18n");
|
|
17
21
|
const _zh = require("./zh");
|
package/dist/cjs/locale/zh.js
CHANGED
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "fileExist", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return fileExist;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _utils = require("@modern-js/utils");
|
|
10
12
|
async function fileExist(filePath) {
|
|
@@ -10,10 +10,18 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
isPackageExist: ()
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
isPackageExist: function() {
|
|
14
|
+
return isPackageExist;
|
|
15
|
+
},
|
|
16
|
+
isPackageDeprecated: function() {
|
|
17
|
+
return isPackageDeprecated;
|
|
18
|
+
},
|
|
19
|
+
semverDecrease: function() {
|
|
20
|
+
return semverDecrease;
|
|
21
|
+
},
|
|
22
|
+
getAvailableVersion: function() {
|
|
23
|
+
return getAvailableVersion;
|
|
24
|
+
}
|
|
17
25
|
});
|
|
18
26
|
const _utils = require("@modern-js/utils");
|
|
19
27
|
async function isPackageExist(packageName, registry) {
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "stripAnsi", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return stripAnsi;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
10
12
|
const pattern = [
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.1.
|
|
18
|
+
"version": "3.1.21",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@swc/helpers": "0.5.1",
|
|
34
|
-
"@modern-js/plugin-i18n": "2.
|
|
35
|
-
"@modern-js/generator-common": "3.1.
|
|
36
|
-
"@modern-js/utils": "2.
|
|
34
|
+
"@modern-js/plugin-i18n": "2.22.1",
|
|
35
|
+
"@modern-js/generator-common": "3.1.21",
|
|
36
|
+
"@modern-js/utils": "2.22.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@modern-js/codesmith": "2.2.
|
|
39
|
+
"@modern-js/codesmith": "2.2.5",
|
|
40
40
|
"@types/jest": "^29",
|
|
41
41
|
"@types/node": "^14",
|
|
42
42
|
"jest": "^29",
|
|
43
43
|
"typescript": "^5",
|
|
44
|
-
"@scripts/build": "2.
|
|
45
|
-
"@scripts/jest-config": "2.
|
|
44
|
+
"@scripts/build": "2.22.1",
|
|
45
|
+
"@scripts/jest-config": "2.22.1"
|
|
46
46
|
},
|
|
47
47
|
"sideEffects": false,
|
|
48
48
|
"modernConfig": {
|