@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 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
@@ -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.pacakgePath.exit, {
102
+ error: i18n.t(localeKeys.packagePath.exit, {
104
103
  value
105
104
  })
106
105
  };
@@ -2,7 +2,7 @@ export const EN_LOCALE = {
2
2
  packageName: {
3
3
  exit: 'package name `{value}` is already exists'
4
4
  },
5
- pacakgePath: {
5
+ packagePath: {
6
6
  exit: 'package path {value} is already exists'
7
7
  }
8
8
  };
@@ -2,7 +2,7 @@ export const ZH_LOCALE = {
2
2
  packageName: {
3
3
  exit: '项目名称 {value} 已存在'
4
4
  },
5
- pacakgePath: {
5
+ packagePath: {
6
6
  exit: '目录 {value} 已存在'
7
7
  }
8
8
  };
@@ -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, _ora.default)('Loading...').start();
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.pacakgePath.exit, {
200
+ error: _locale.i18n.t(_locale.localeKeys.packagePath.exit, {
203
201
  value
204
202
  })
205
203
  };
@@ -8,7 +8,7 @@ const EN_LOCALE = {
8
8
  packageName: {
9
9
  exit: 'package name `{value}` is already exists'
10
10
  },
11
- pacakgePath: {
11
+ packagePath: {
12
12
  exit: 'package path {value} is already exists'
13
13
  }
14
14
  };
@@ -8,7 +8,7 @@ const ZH_LOCALE = {
8
8
  packageName: {
9
9
  exit: '项目名称 {value} 已存在'
10
10
  },
11
- pacakgePath: {
11
+ packagePath: {
12
12
  exit: '目录 {value} 已存在'
13
13
  }
14
14
  };
@@ -2,7 +2,7 @@ export declare const EN_LOCALE: {
2
2
  packageName: {
3
3
  exit: string;
4
4
  };
5
- pacakgePath: {
5
+ packagePath: {
6
6
  exit: string;
7
7
  };
8
8
  };
@@ -4,14 +4,14 @@ declare const localeKeys: {
4
4
  packageName: {
5
5
  exit: string;
6
6
  };
7
- pacakgePath: {
7
+ packagePath: {
8
8
  exit: string;
9
9
  };
10
10
  } | {
11
11
  packageName: {
12
12
  exit: string;
13
13
  };
14
- pacakgePath: {
14
+ packagePath: {
15
15
  exit: string;
16
16
  };
17
17
  };
@@ -2,7 +2,7 @@ export declare const ZH_LOCALE: {
2
2
  packageName: {
3
3
  exit: string;
4
4
  };
5
- pacakgePath: {
5
+ packagePath: {
6
6
  exit: string;
7
7
  };
8
8
  };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.2.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.4",
33
- "@modern-js/utils": "^1.5.0",
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.8",
38
- "@types/jest": "^26",
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": "modern build",
58
- "test": "jest --passWithNoTests"
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
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: ['@modern-js'],
4
- parserOptions: {
5
- tsconfigRootDir: __dirname,
6
- project: ['./tsconfig.json'],
7
- },
8
- };
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
@@ -1,2 +0,0 @@
1
- /** @type {import('@modern-js/module-tools').UserConfig} */
2
- module.exports = {};
package/tsconfig.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "@modern-js/tsconfig/base",
3
- "compilerOptions": {
4
- "declaration": false,
5
- "jsx": "preserve",
6
- "baseUrl": "./",
7
- "paths": {}
8
- },
9
- "include": ["src"]
10
- }