easy-soft-develop 2.1.126 → 2.1.130

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-soft-develop",
3
- "version": "2.1.126",
3
+ "version": "2.1.130",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/kityandhero/easy-soft-develop#readme",
6
6
  "bugs": {
@@ -13,6 +13,10 @@ const {
13
13
  promptEmptyLine,
14
14
  } = require('../tools/meta');
15
15
 
16
+ const {
17
+ getDevelopSubPathVersionNcuConfig,
18
+ } = require('../config/develop.subPath.version.ncu');
19
+
16
20
  function publishToNpm(packages, o, useOtp, otp) {
17
21
  if (checkStringIsEmpty(packages)) {
18
22
  exit();
@@ -22,7 +26,12 @@ function publishToNpm(packages, o, useOtp, otp) {
22
26
 
23
27
  promptInfo('publish public packages to npm');
24
28
 
25
- loopPackage(({ name, absolutePath }) => {
29
+ const { paths = [] } = {
30
+ paths: [],
31
+ ...getDevelopSubPathVersionNcuConfig(),
32
+ };
33
+
34
+ loopPackage(paths, ({ name, absolutePath }) => {
26
35
  if (checkInCollection(packageList, name)) {
27
36
  cd(absolutePath);
28
37
 
@@ -25,7 +25,7 @@ function buildConfig(api) {
25
25
  ? ''
26
26
  : `, ${paths
27
27
  .map((o) => {
28
- return `${o}/*`;
28
+ return `'${o}/*'`;
29
29
  })
30
30
  .join(',')}`
31
31
  }],
@@ -303,7 +303,7 @@ const items = {
303
303
  ? ''
304
304
  : `, ${paths
305
305
  .map((o) => {
306
- return `./${o}/*/tsconfig.json`;
306
+ return `'./${o}/*/tsconfig.json'`;
307
307
  })
308
308
  .join(',')}`
309
309
  }],
@@ -7,6 +7,10 @@ const {
7
7
  } = require('./meta');
8
8
  const { loopPackage } = require('./package.tools');
9
9
 
10
+ const {
11
+ getDevelopSubPathVersionNcuConfig,
12
+ } = require('../config/develop.subPath.version.ncu');
13
+
10
14
  /**
11
15
  * try clean
12
16
  * @param {*} cmd cmd
@@ -42,7 +46,12 @@ function adjustMainPackageJson(command) {
42
46
  }
43
47
 
44
48
  function adjustChildrenPackageJson(command) {
45
- loopPackage(({ name, relativePath }) => {
49
+ const { paths = [] } = {
50
+ paths: [],
51
+ ...getDevelopSubPathVersionNcuConfig(),
52
+ };
53
+
54
+ loopPackage(paths, ({ name, relativePath }) => {
46
55
  const cmd = `cd ${relativePath} && ${command}`;
47
56
 
48
57
  promptInfo(`clean package ${name}: ${cmd}`);
@@ -16,6 +16,10 @@ const { globalScript } = require('./package.script');
16
16
  const { loopPackage } = require('./package.tools');
17
17
  const { prettierAllPackageJson } = require('./prettier.package.json');
18
18
 
19
+ const {
20
+ getDevelopSubPathVersionNcuConfig,
21
+ } = require('../config/develop.subPath.version.ncu');
22
+
19
23
  function createMainFile(fileWithContentCollection) {
20
24
  if (!Array.isArray(fileWithContentCollection)) {
21
25
  return;
@@ -39,7 +43,12 @@ function createMainFile(fileWithContentCollection) {
39
43
  }
40
44
 
41
45
  function createPackageFile(fileWithContentCollection) {
42
- loopPackage(({ absolutePath }) => {
46
+ const { paths = [] } = {
47
+ paths: [],
48
+ ...getDevelopSubPathVersionNcuConfig(),
49
+ };
50
+
51
+ loopPackage(paths, ({ absolutePath }) => {
43
52
  const itemPath = absolutePath;
44
53
 
45
54
  if (!Array.isArray(fileWithContentCollection)) {
@@ -103,7 +112,12 @@ function adjustMainPackageJsonScript({ scripts }) {
103
112
  const testScript = {};
104
113
  const testAllProjects = [];
105
114
 
106
- loopPackage(({ name, path }) => {
115
+ const { paths = [] } = {
116
+ paths: [],
117
+ ...getDevelopSubPathVersionNcuConfig(),
118
+ };
119
+
120
+ loopPackage(paths, ({ name, path }) => {
107
121
  publishPackageNameList.push(name);
108
122
 
109
123
  autoAdjustFileScript[`z:auto:adjust:file:${name}`] =
@@ -146,7 +160,12 @@ function adjustMainPackageJsonScript({ scripts }) {
146
160
  }
147
161
 
148
162
  function adjustChildrenPackageJsonScript({ scripts }) {
149
- loopPackage(({ name, absolutePath }) => {
163
+ const { paths = [] } = {
164
+ paths: [],
165
+ ...getDevelopSubPathVersionNcuConfig(),
166
+ };
167
+
168
+ loopPackage(paths, ({ name, absolutePath }) => {
150
169
  const itemPath = absolutePath;
151
170
 
152
171
  const childPackageJsonPath = `${itemPath}/package.json`;
@@ -12,6 +12,9 @@ const { getGlobalDevelopPackages } = require('./package.dependence');
12
12
  const { loopPackage } = require('./package.tools');
13
13
  const { updateSpecialPackageVersion } = require('./package.update');
14
14
  const { prettierAllPackageJson } = require('./prettier.package.json');
15
+ const {
16
+ getDevelopSubPathVersionNcuConfig,
17
+ } = require('../config/develop.subPath.version.ncu');
15
18
 
16
19
  function buildPackageObject(packageList) {
17
20
  if (!isArray(packageList) || packageList.length <= 0) {
@@ -61,7 +64,12 @@ function adjustChildrenPackageJson(packageList, specialPackageList) {
61
64
 
62
65
  const o = buildPackageObject(packageList);
63
66
 
64
- loopPackage(({ name, relativePath }) => {
67
+ const { paths = [] } = {
68
+ paths: [],
69
+ ...getDevelopSubPathVersionNcuConfig(),
70
+ };
71
+
72
+ loopPackage(paths, ({ name, relativePath }) => {
65
73
  const packageJson = readJsonFileSync(`${relativePath}/package.json`);
66
74
 
67
75
  let specials = {};
@@ -1,24 +1,15 @@
1
1
  const fs = require('fs');
2
2
 
3
3
  const { resolvePath, existDirectorySync, isArray } = require('./meta');
4
- const {
5
- getDevelopSubPathVersionNcuConfig,
6
- } = require('../config/develop.subPath.version.ncu');
7
4
 
8
5
  /**
9
6
  * loop all package
10
7
  */
11
8
  function loopPackage(
9
+ paths = [],
12
10
  // eslint-disable-next-line no-unused-vars
13
11
  callback = ({ name, path, absolutePath, relativePath }) => {},
14
12
  ) {
15
- const developSubPathVersionNcuConfig = getDevelopSubPathVersionNcuConfig();
16
-
17
- const { paths = [] } = {
18
- paths: [],
19
- ...developSubPathVersionNcuConfig,
20
- };
21
-
22
13
  if (!isArray(paths)) {
23
14
  return;
24
15
  }
@@ -1,5 +1,8 @@
1
1
  const { promptInfo, promptSuccess, exec, promptEmptyLine } = require('./meta');
2
2
  const { loopPackage } = require('./package.tools');
3
+ const {
4
+ getDevelopSubPathVersionNcuConfig,
5
+ } = require('../config/develop.subPath.version.ncu');
3
6
 
4
7
  function adjustMainPackageJsonByCommand(cmd) {
5
8
  promptInfo(`update main command: ${cmd}`);
@@ -8,7 +11,12 @@ function adjustMainPackageJsonByCommand(cmd) {
8
11
  }
9
12
 
10
13
  function adjustChildrenPackageJsonByCommand(cmd) {
11
- loopPackage(({ name, path }) => {
14
+ const { paths = [] } = {
15
+ paths: [],
16
+ ...getDevelopSubPathVersionNcuConfig(),
17
+ };
18
+
19
+ loopPackage(paths, ({ name, path }) => {
12
20
  const commandString = `cd ./${path}/${name} && ${cmd}`;
13
21
 
14
22
  promptInfo(`update child command: ${commandString}`);
@@ -2,6 +2,7 @@
2
2
  * loop all package
3
3
  */
4
4
  export function loopPackage(
5
+ paths?: any[],
5
6
  callback?: ({
6
7
  name,
7
8
  path,