@modern-js/generator-utils 1.2.2 → 1.2.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 +40 -0
- package/dist/js/modern/index.js +2 -3
- package/dist/js/modern/locale/en.js +1 -1
- package/dist/js/modern/locale/zh.js +1 -1
- package/dist/js/node/index.js +2 -4
- package/dist/js/node/locale/en.js +1 -1
- package/dist/js/node/locale/zh.js +1 -1
- package/dist/types/locale/en.d.ts +1 -1
- package/dist/types/locale/index.d.ts +2 -2
- package/dist/types/locale/zh.d.ts +1 -1
- package/package.json +29 -8
- package/.eslintrc.js +0 -8
- package/jest.config.js +0 -11
- package/modern.config.js +0 -2
- package/tsconfig.json +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# @modern-js/generator-utils
|
|
2
2
|
|
|
3
|
+
## 1.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d32f35134: chore: add modern/jest/eslint/ts config files to .npmignore
|
|
8
|
+
- Updated dependencies [d32f35134]
|
|
9
|
+
- Updated dependencies [6ae4a34ae]
|
|
10
|
+
- Updated dependencies [b80229c79]
|
|
11
|
+
- Updated dependencies [948cc4436]
|
|
12
|
+
- @modern-js/plugin-i18n@1.2.6
|
|
13
|
+
- @modern-js/utils@1.7.3
|
|
14
|
+
|
|
15
|
+
## 1.2.4
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 6b0bb5e3b: feat: bump codesmith version
|
|
20
|
+
- 69a728375: fix: remove exports.jsnext:source after publish
|
|
21
|
+
- Updated dependencies [cd7346b0d]
|
|
22
|
+
- Updated dependencies [69a728375]
|
|
23
|
+
- @modern-js/utils@1.7.2
|
|
24
|
+
- @modern-js/plugin-i18n@1.2.5
|
|
25
|
+
|
|
26
|
+
## 1.2.3
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- 592edabc: feat: prebundle url-join,mime-types,json5,fast-glob,globby,ora,inquirer
|
|
31
|
+
- Updated dependencies [2d155c4c]
|
|
32
|
+
- Updated dependencies [123e432d]
|
|
33
|
+
- Updated dependencies [e5a9b26d]
|
|
34
|
+
- Updated dependencies [0b26b93b]
|
|
35
|
+
- Updated dependencies [123e432d]
|
|
36
|
+
- Updated dependencies [f9f66ef9]
|
|
37
|
+
- Updated dependencies [592edabc]
|
|
38
|
+
- Updated dependencies [895fa0ff]
|
|
39
|
+
- Updated dependencies [3578913e]
|
|
40
|
+
- Updated dependencies [1c3beab3]
|
|
41
|
+
- @modern-js/utils@1.6.0
|
|
42
|
+
|
|
3
43
|
## 1.2.2
|
|
4
44
|
|
|
5
45
|
### Patch Changes
|
package/dist/js/modern/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
import { fs, execa, getMonorepoPackages, canUseNpm, canUsePnpm, canUseYarn } from '@modern-js/utils';
|
|
3
|
-
import ora from 'ora';
|
|
2
|
+
import { fs, ora, execa, getMonorepoPackages, canUseNpm, canUsePnpm, canUseYarn } from '@modern-js/utils';
|
|
4
3
|
import { stripAnsi } from "./utils/strip-ansi";
|
|
5
4
|
import { i18n, localeKeys } from "./locale";
|
|
6
5
|
export * from "./utils";
|
|
@@ -100,7 +99,7 @@ export function validatePackagePath(value, projectDir, options) {
|
|
|
100
99
|
if (fs.existsSync(packageDir)) {
|
|
101
100
|
return {
|
|
102
101
|
success: false,
|
|
103
|
-
error: i18n.t(localeKeys.
|
|
102
|
+
error: i18n.t(localeKeys.packagePath.exit, {
|
|
104
103
|
value
|
|
105
104
|
})
|
|
106
105
|
};
|
package/dist/js/node/index.js
CHANGED
|
@@ -77,8 +77,6 @@ var _path = _interopRequireDefault(require("path"));
|
|
|
77
77
|
|
|
78
78
|
var _utils = require("@modern-js/utils");
|
|
79
79
|
|
|
80
|
-
var _ora = _interopRequireDefault(require("ora"));
|
|
81
|
-
|
|
82
80
|
var _stripAnsi = require("./utils/strip-ansi");
|
|
83
81
|
|
|
84
82
|
var _locale = require("./locale");
|
|
@@ -100,7 +98,7 @@ Object.keys(_utils2).forEach(function (key) {
|
|
|
100
98
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
101
99
|
|
|
102
100
|
async function getPackageVersion(packageName, registry) {
|
|
103
|
-
const spinner = (0,
|
|
101
|
+
const spinner = (0, _utils.ora)('Loading...').start();
|
|
104
102
|
spinner.color = 'yellow';
|
|
105
103
|
|
|
106
104
|
if (await (0, _utils.canUsePnpm)()) {
|
|
@@ -199,7 +197,7 @@ function validatePackagePath(value, projectDir, options) {
|
|
|
199
197
|
if (_utils.fs.existsSync(packageDir)) {
|
|
200
198
|
return {
|
|
201
199
|
success: false,
|
|
202
|
-
error: _locale.i18n.t(_locale.localeKeys.
|
|
200
|
+
error: _locale.i18n.t(_locale.localeKeys.packagePath.exit, {
|
|
203
201
|
value
|
|
204
202
|
})
|
|
205
203
|
};
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.2.
|
|
14
|
+
"version": "1.2.5",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -29,13 +29,12 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7",
|
|
32
|
-
"@modern-js/plugin-i18n": "^1.2.
|
|
33
|
-
"@modern-js/utils": "^1.
|
|
34
|
-
"ora": "^5.4.1"
|
|
32
|
+
"@modern-js/plugin-i18n": "^1.2.6",
|
|
33
|
+
"@modern-js/utils": "^1.7.3"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
|
-
"@modern-js/codesmith": "^1.0.
|
|
38
|
-
"@types/jest": "^
|
|
36
|
+
"@modern-js/codesmith": "^1.0.10",
|
|
37
|
+
"@types/jest": "^27",
|
|
39
38
|
"@types/node": "^14",
|
|
40
39
|
"typescript": "^4",
|
|
41
40
|
"@scripts/build": "0.0.0",
|
|
@@ -52,10 +51,32 @@
|
|
|
52
51
|
"registry": "https://registry.npmjs.org/",
|
|
53
52
|
"access": "public"
|
|
54
53
|
},
|
|
54
|
+
"wireit": {
|
|
55
|
+
"build": {
|
|
56
|
+
"command": "modern build",
|
|
57
|
+
"files": [
|
|
58
|
+
"src/**/*",
|
|
59
|
+
"tsconfig.json",
|
|
60
|
+
"package.json"
|
|
61
|
+
],
|
|
62
|
+
"output": [
|
|
63
|
+
"dist/**/*"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"test": {
|
|
67
|
+
"command": "jest --passWithNoTests",
|
|
68
|
+
"files": [
|
|
69
|
+
"src/**/*",
|
|
70
|
+
"tsconfig.json",
|
|
71
|
+
"package.json"
|
|
72
|
+
],
|
|
73
|
+
"output": []
|
|
74
|
+
}
|
|
75
|
+
},
|
|
55
76
|
"scripts": {
|
|
56
77
|
"new": "modern new",
|
|
57
|
-
"build": "
|
|
58
|
-
"test": "
|
|
78
|
+
"build": "wireit",
|
|
79
|
+
"test": "wireit"
|
|
59
80
|
},
|
|
60
81
|
"readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
|
|
61
82
|
}
|
package/.eslintrc.js
DELETED
package/jest.config.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const sharedConfig = require('@scripts/jest-config');
|
|
2
|
-
|
|
3
|
-
/** @type {import('@jest/types').Config.InitialOptions} */
|
|
4
|
-
module.exports = {
|
|
5
|
-
...sharedConfig,
|
|
6
|
-
rootDir: __dirname,
|
|
7
|
-
modulePathIgnorePatterns: [
|
|
8
|
-
// TODO: 很容易超时导致失败,暂时先绕过
|
|
9
|
-
'tests/index.test.ts',
|
|
10
|
-
],
|
|
11
|
-
};
|
package/modern.config.js
DELETED