easy-soft-develop 2.1.196 → 2.1.201

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/bin/cli.js CHANGED
@@ -5,7 +5,9 @@ const { Command } = require('commander');
5
5
  const { getArgCollection } = require('../src/tools/meta');
6
6
  const createAssistScripts = require('../src/cliCollection/create-assist-scripts.cli');
7
7
  const checkAllPackageVersion = require('../src/cliCollection/check-all-package-version');
8
+ const checkEveryPackageVersion = require('../src/cliCollection/check-every-package-version');
8
9
  const updateAllPackageVersion = require('../src/cliCollection/update-all-package-version');
10
+ const updateEveryPackageVersion = require('../src/cliCollection/update-every-package-version');
9
11
  const sleep = require('../src/cliCollection/sleep');
10
12
  const publishToNpm = require('../src/cliCollection/publish-to-npm');
11
13
  const commitRefresh = require('../src/cliCollection/commit-refresh');
@@ -41,6 +43,13 @@ program
41
43
  checkAllPackageVersion.run();
42
44
  });
43
45
 
46
+ program
47
+ .command('check-every-package-version')
48
+ .description('check all package version for your project')
49
+ .action(() => {
50
+ checkEveryPackageVersion.run();
51
+ });
52
+
44
53
  program
45
54
  .command('update-all-package-version')
46
55
  .description('update all package version for your project')
@@ -48,6 +57,13 @@ program
48
57
  updateAllPackageVersion.run();
49
58
  });
50
59
 
60
+ program
61
+ .command('update-every-package-version')
62
+ .description('update all package version for your project')
63
+ .action(() => {
64
+ updateEveryPackageVersion.run();
65
+ });
66
+
51
67
  program
52
68
  .command('sleep')
53
69
  .description('sleep A few seconds with you want')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-soft-develop",
3
- "version": "2.1.196",
3
+ "version": "2.1.201",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/kityandhero/easy-soft-develop#readme",
6
6
  "bugs": {
@@ -70,7 +70,7 @@
70
70
  "postz:publish:patch:npm": "npm run z:change:npm:registry:local && npm publish",
71
71
  "z:reinstall": "rimraf ./node_modules && npm run z:install",
72
72
  "z:tsc:build": "echo show tsc version and create declaration file && tsc -v && tsc -p ./tsconfig.types.json && echo declaration file generate complete",
73
- "z:update:all-package-version": "npx npm-check-updates --configFilePath ./.ncurc.js -u --registry https://registry.npmjs.org"
73
+ "z:update:all-package-version": "npx npm-check-updates --configFilePath ./.ncurc.js --registry https://registry.npmjs.org -u"
74
74
  },
75
75
  "dependencies": {
76
76
  "commander": "^12.1.0",
@@ -0,0 +1,5 @@
1
+ const { checkEveryPackageVersion } = require('../tools/package.update');
2
+
3
+ exports.run = function () {
4
+ checkEveryPackageVersion();
5
+ };
@@ -0,0 +1,5 @@
1
+ const { updateEveryPackageVersion } = require('../tools/package.update');
2
+
3
+ exports.run = function () {
4
+ updateEveryPackageVersion();
5
+ };
@@ -25,12 +25,6 @@ function adjustChildrenPackageJsonByCommand(cmd) {
25
25
  });
26
26
  }
27
27
 
28
- // function checkEasySoftDevelopVersion() {
29
- // promptInfo('check easy-soft-develop global version');
30
-
31
- // exec('npm-check-updates -g easy-soft-develop');
32
- // }
33
-
34
28
  /**
35
29
  * update special package version
36
30
  * @param {Array} packageList
@@ -48,17 +42,29 @@ function updateSpecialPackageVersion(packageList) {
48
42
 
49
43
  adjustChildrenPackageJsonByCommand(ncuCommand);
50
44
 
51
- // checkEasySoftDevelopVersion();
52
-
53
45
  promptSuccess('check success');
54
46
  }
55
47
 
56
48
  function updateAllPackageVersion() {
57
49
  exec('npm run z:initial:environment');
58
50
 
51
+ const ncuCommand = `npx npm-check-updates --configFilePath ./.ncurc.js --packageFile package.json --registry https://registry.npmjs.org --workspaces --root -u`;
52
+
53
+ promptInfo(`all packages version will update with command: ${ncuCommand}`);
54
+
55
+ adjustMainPackageJsonByCommand(ncuCommand);
56
+
57
+ promptSuccess('update success, exec install with z:install');
58
+
59
+ exec('npm run z:install');
60
+ }
61
+
62
+ function updateEveryPackageVersion() {
63
+ exec('npm run z:initial:environment');
64
+
59
65
  const ncuCommand = `npx npm-check-updates --configFilePath ./.ncurc.js --packageFile package.json --registry https://registry.npmjs.org -u`;
60
66
 
61
- promptInfo(`all packages version will update`);
67
+ promptInfo(`all packages version will update with command: ${ncuCommand}`);
62
68
 
63
69
  adjustMainPackageJsonByCommand(ncuCommand);
64
70
 
@@ -67,16 +73,32 @@ function updateAllPackageVersion() {
67
73
  promptSuccess('update success, exec install with z:install');
68
74
 
69
75
  exec('npm run z:install');
70
-
71
- // checkEasySoftDevelopVersion();
72
76
  }
73
77
 
74
78
  function checkAllPackageVersion() {
79
+ const ncuCommand = `npx npm-check-updates --configFilePath ./.ncurc.js --packageFile package.json --registry https://registry.npmjs.org --workspaces --root`;
80
+
81
+ promptEmptyLine();
82
+
83
+ promptInfo(
84
+ `all packages version will check update with command: ${ncuCommand}`,
85
+ );
86
+
87
+ adjustMainPackageJsonByCommand(ncuCommand);
88
+
89
+ promptSuccess('update success, exec install with z:install');
90
+
91
+ exec('npm run z:install');
92
+ }
93
+
94
+ function checkEveryPackageVersion() {
75
95
  const ncuCommand = `npx npm-check-updates --configFilePath ./.ncurc.js --packageFile package.json --registry https://registry.npmjs.org`;
76
96
 
77
97
  promptEmptyLine();
78
98
 
79
- promptInfo(`all packages version will check update`);
99
+ promptInfo(
100
+ `all packages version will check update with command: ${ncuCommand}`,
101
+ );
80
102
 
81
103
  adjustMainPackageJsonByCommand(ncuCommand);
82
104
 
@@ -85,12 +107,12 @@ function checkAllPackageVersion() {
85
107
  promptSuccess('update success, exec install with z:install');
86
108
 
87
109
  exec('npm run z:install');
88
-
89
- // checkEasySoftDevelopVersion();
90
110
  }
91
111
 
92
112
  module.exports = {
93
113
  checkAllPackageVersion,
94
- updateSpecialPackageVersion,
114
+ checkEveryPackageVersion,
95
115
  updateAllPackageVersion,
116
+ updateEveryPackageVersion,
117
+ updateSpecialPackageVersion,
96
118
  };
@@ -0,0 +1 @@
1
+ export function run(): void;
@@ -0,0 +1 @@
1
+ export function run(): void;
@@ -1,7 +1,9 @@
1
1
  export function checkAllPackageVersion(): void;
2
+ export function checkEveryPackageVersion(): void;
3
+ export function updateAllPackageVersion(): void;
4
+ export function updateEveryPackageVersion(): void;
2
5
  /**
3
6
  * update special package version
4
7
  * @param {Array} packageList
5
8
  */
6
9
  export function updateSpecialPackageVersion(packageList: any[]): void;
7
- export function updateAllPackageVersion(): void;