@modern-js/generator-utils 3.0.8 → 3.0.10
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 +29 -0
- package/README.md +2 -2
- package/dist/cjs/index.js +6 -6
- package/dist/cjs/utils/{fs-exist.js → fsExist.js} +3 -3
- package/dist/cjs/utils/index.js +1 -1
- package/dist/cjs/utils/{strip-ansi.js → stripAnsi.js} +3 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/utils/index.js +1 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/package.json +9 -9
- /package/dist/esm/utils/{fs-exist.js → fsExist.js} +0 -0
- /package/dist/esm/utils/{strip-ansi.js → stripAnsi.js} +0 -0
- /package/dist/types/utils/{fs-exist.d.ts → fsExist.d.ts} +0 -0
- /package/dist/types/utils/{strip-ansi.d.ts → stripAnsi.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @modern-js/generator-utils
|
|
2
2
|
|
|
3
|
+
## 3.0.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [1104a9f18b]
|
|
8
|
+
- Updated dependencies [2a3f7af59e]
|
|
9
|
+
- Updated dependencies [1f6ca2c7fb]
|
|
10
|
+
- @modern-js/utils@2.8.0
|
|
11
|
+
- @modern-js/generator-common@3.0.10
|
|
12
|
+
- @modern-js/plugin-i18n@2.8.0
|
|
13
|
+
|
|
14
|
+
## 3.0.9
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 7fff9020e1: chore: make file naming consistent
|
|
19
|
+
|
|
20
|
+
chore: 统一文件命名为小驼峰格式
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [0f15fc597c]
|
|
23
|
+
- Updated dependencies [dcad887024]
|
|
24
|
+
- Updated dependencies [a4672f7c16]
|
|
25
|
+
- Updated dependencies [7fff9020e1]
|
|
26
|
+
- Updated dependencies [1eea234fdd]
|
|
27
|
+
- Updated dependencies [84bfb439b8]
|
|
28
|
+
- @modern-js/utils@2.7.0
|
|
29
|
+
- @modern-js/plugin-i18n@2.7.0
|
|
30
|
+
- @modern-js/generator-common@3.0.9
|
|
31
|
+
|
|
3
32
|
## 3.0.8
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -19,8 +19,8 @@ Please follow [Quick Start](https://modernjs.dev/en/guides/get-started/quick-sta
|
|
|
19
19
|
|
|
20
20
|
## Contributing
|
|
21
21
|
|
|
22
|
-
Please read the [Contributing Guide](https://github.com/
|
|
22
|
+
Please read the [Contributing Guide](https://github.com/web-infra-dev/modern.js/blob/main/CONTRIBUTING.md).
|
|
23
23
|
|
|
24
24
|
## License
|
|
25
25
|
|
|
26
|
-
Modern.js is [MIT licensed](https://github.com/
|
|
26
|
+
Modern.js is [MIT licensed](https://github.com/web-infra-dev/modern.js/blob/main/LICENSE).
|
package/dist/cjs/index.js
CHANGED
|
@@ -57,10 +57,10 @@ module.exports = __toCommonJS(src_exports);
|
|
|
57
57
|
var import_path = __toESM(require("path"));
|
|
58
58
|
var import_utils = require("@modern-js/utils");
|
|
59
59
|
var import_generator_common = require("@modern-js/generator-common");
|
|
60
|
-
var
|
|
60
|
+
var import_stripAnsi = require("./utils/stripAnsi");
|
|
61
61
|
var import_locale = require("./locale");
|
|
62
62
|
var import_package = require("./utils/package");
|
|
63
|
-
var
|
|
63
|
+
var import_fsExist = require("./utils/fsExist");
|
|
64
64
|
__reExport(src_exports, require("./utils"), module.exports);
|
|
65
65
|
var import_utils2 = require("@modern-js/utils");
|
|
66
66
|
var import_locale2 = require("./locale");
|
|
@@ -76,7 +76,7 @@ async function getPackageVersion(packageName, registry) {
|
|
|
76
76
|
}
|
|
77
77
|
const result = await (0, import_utils.execa)("pnpm", args);
|
|
78
78
|
spinner.stop();
|
|
79
|
-
return (0,
|
|
79
|
+
return (0, import_stripAnsi.stripAnsi)(result.stdout);
|
|
80
80
|
}
|
|
81
81
|
if (await (0, import_utils.canUseNpm)()) {
|
|
82
82
|
const args = ["view", packageName, "version"];
|
|
@@ -85,7 +85,7 @@ async function getPackageVersion(packageName, registry) {
|
|
|
85
85
|
}
|
|
86
86
|
const result = await (0, import_utils.execa)("npm", args);
|
|
87
87
|
spinner.stop();
|
|
88
|
-
return (0,
|
|
88
|
+
return (0, import_stripAnsi.stripAnsi)(result.stdout);
|
|
89
89
|
}
|
|
90
90
|
spinner.stop();
|
|
91
91
|
throw new Error("not found npm, please install npm before");
|
|
@@ -181,11 +181,11 @@ function getMWAProjectPath(packagePath, isMonorepoSubProject, isTest = false) {
|
|
|
181
181
|
return "";
|
|
182
182
|
}
|
|
183
183
|
async function getModernConfigFile(appDir) {
|
|
184
|
-
let exist = await (0,
|
|
184
|
+
let exist = await (0, import_fsExist.fileExist)(import_path.default.join(appDir, "modern.config.ts"));
|
|
185
185
|
if (exist) {
|
|
186
186
|
return "modern.config.ts";
|
|
187
187
|
}
|
|
188
|
-
exist = await (0,
|
|
188
|
+
exist = await (0, import_fsExist.fileExist)(import_path.default.join(appDir, "modern.config.js"));
|
|
189
189
|
if (exist) {
|
|
190
190
|
return "modern.config.js";
|
|
191
191
|
}
|
|
@@ -15,11 +15,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var
|
|
19
|
-
__export(
|
|
18
|
+
var fsExist_exports = {};
|
|
19
|
+
__export(fsExist_exports, {
|
|
20
20
|
fileExist: () => fileExist
|
|
21
21
|
});
|
|
22
|
-
module.exports = __toCommonJS(
|
|
22
|
+
module.exports = __toCommonJS(fsExist_exports);
|
|
23
23
|
var import_utils = require("@modern-js/utils");
|
|
24
24
|
async function fileExist(filePath) {
|
|
25
25
|
try {
|
package/dist/cjs/utils/index.js
CHANGED
|
@@ -14,5 +14,5 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
|
|
|
14
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
15
|
var utils_exports = {};
|
|
16
16
|
module.exports = __toCommonJS(utils_exports);
|
|
17
|
-
__reExport(utils_exports, require("./
|
|
17
|
+
__reExport(utils_exports, require("./stripAnsi"), module.exports);
|
|
18
18
|
__reExport(utils_exports, require("./package"), module.exports);
|
|
@@ -15,11 +15,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
return to;
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var
|
|
19
|
-
__export(
|
|
18
|
+
var stripAnsi_exports = {};
|
|
19
|
+
__export(stripAnsi_exports, {
|
|
20
20
|
stripAnsi: () => stripAnsi
|
|
21
21
|
});
|
|
22
|
-
module.exports = __toCommonJS(
|
|
22
|
+
module.exports = __toCommonJS(stripAnsi_exports);
|
|
23
23
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
24
24
|
const pattern = [
|
|
25
25
|
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
package/dist/esm/index.js
CHANGED
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
canUsePnpm
|
|
9
9
|
} from "@modern-js/utils";
|
|
10
10
|
import { SolutionToolsMap } from "@modern-js/generator-common";
|
|
11
|
-
import { stripAnsi } from "./utils/
|
|
11
|
+
import { stripAnsi } from "./utils/stripAnsi";
|
|
12
12
|
import { i18n, localeKeys } from "./locale";
|
|
13
13
|
import { getAvailableVersion } from "./utils/package";
|
|
14
|
-
import { fileExist } from "./utils/
|
|
14
|
+
import { fileExist } from "./utils/fsExist";
|
|
15
15
|
export * from "./utils";
|
|
16
16
|
import {
|
|
17
17
|
ora as ora2,
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./stripAnsi";
|
|
2
2
|
export * from "./package";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './stripAnsi';
|
|
2
2
|
export * from './package';
|
package/package.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"name": "@modern-js/generator-utils",
|
|
3
3
|
"description": "A Progressive React Framework for modern web development.",
|
|
4
4
|
"homepage": "https://modernjs.dev",
|
|
5
|
-
"bugs": "https://github.com/
|
|
6
|
-
"repository": "
|
|
5
|
+
"bugs": "https://github.com/web-infra-dev/modern.js/issues",
|
|
6
|
+
"repository": "web-infra-dev/modern.js",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"react",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "3.0.
|
|
14
|
+
"version": "3.0.10",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/cjs/index.js",
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/runtime": "^7.18.0",
|
|
30
|
-
"@modern-js/plugin-i18n": "2.
|
|
31
|
-
"@modern-js/generator-common": "3.0.
|
|
32
|
-
"@modern-js/utils": "2.
|
|
30
|
+
"@modern-js/plugin-i18n": "2.8.0",
|
|
31
|
+
"@modern-js/generator-common": "3.0.10",
|
|
32
|
+
"@modern-js/utils": "2.8.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@modern-js/codesmith": "2.0.
|
|
35
|
+
"@modern-js/codesmith": "2.0.5",
|
|
36
36
|
"@types/jest": "^27",
|
|
37
37
|
"@types/node": "^14",
|
|
38
38
|
"jest": "^27",
|
|
39
39
|
"typescript": "^4",
|
|
40
|
-
"@scripts/build": "2.
|
|
41
|
-
"@scripts/jest-config": "2.
|
|
40
|
+
"@scripts/build": "2.8.0",
|
|
41
|
+
"@scripts/jest-config": "2.8.0"
|
|
42
42
|
},
|
|
43
43
|
"sideEffects": false,
|
|
44
44
|
"modernConfig": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|