node-power-user 0.0.13 → 0.0.15
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/dist/cli.js +7 -2
- package/package.json +3 -3
- package/src/cli.js +7 -2
package/dist/cli.js
CHANGED
|
@@ -21,7 +21,12 @@ Main.prototype.process = async function (args) {
|
|
|
21
21
|
args = args || process.argv
|
|
22
22
|
self.options = {};
|
|
23
23
|
self.argv = argv;
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
self.npu_packageJSON = require('../package.json');
|
|
27
|
+
} catch (error) {
|
|
28
|
+
throw new Error('This project does not contain a valid package.json file!')
|
|
29
|
+
}
|
|
25
30
|
|
|
26
31
|
try {
|
|
27
32
|
self.proj_path = process.cwd();
|
|
@@ -96,7 +101,7 @@ function bump(self) {
|
|
|
96
101
|
let newVersion = [semver.major(version), semver.minor(version), semver.patch(version)];
|
|
97
102
|
let newVersionPost = version.split('-')[1];
|
|
98
103
|
let newVersionString = '';
|
|
99
|
-
|
|
104
|
+
|
|
100
105
|
if (self.options.break || self.options.breaking || self.options.major || self.options['3']) {
|
|
101
106
|
level = 'breaking';
|
|
102
107
|
newVersion[0]++;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-power-user",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"description": "Easy tools for every Node.js developer!",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
12
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
13
|
-
"start": "node -e 'new (require(`./
|
|
13
|
+
"start": "node -e 'new (require(`./dist/cli.js`))().process()'",
|
|
14
14
|
"prepare": "node -e 'require(`prepare-package`)'"
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|
|
@@ -45,4 +45,4 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"prepare-package": "^0.0.12"
|
|
47
47
|
}
|
|
48
|
-
}
|
|
48
|
+
}
|
package/src/cli.js
CHANGED
|
@@ -21,7 +21,12 @@ Main.prototype.process = async function (args) {
|
|
|
21
21
|
args = args || process.argv
|
|
22
22
|
self.options = {};
|
|
23
23
|
self.argv = argv;
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
self.npu_packageJSON = require('../package.json');
|
|
27
|
+
} catch (error) {
|
|
28
|
+
throw new Error('This project does not contain a valid package.json file!')
|
|
29
|
+
}
|
|
25
30
|
|
|
26
31
|
try {
|
|
27
32
|
self.proj_path = process.cwd();
|
|
@@ -96,7 +101,7 @@ function bump(self) {
|
|
|
96
101
|
let newVersion = [semver.major(version), semver.minor(version), semver.patch(version)];
|
|
97
102
|
let newVersionPost = version.split('-')[1];
|
|
98
103
|
let newVersionString = '';
|
|
99
|
-
|
|
104
|
+
|
|
100
105
|
if (self.options.break || self.options.breaking || self.options.major || self.options['3']) {
|
|
101
106
|
level = 'breaking';
|
|
102
107
|
newVersion[0]++;
|