wisdom 12.1.0 → 12.2.0

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 CHANGED
@@ -1,3 +1,16 @@
1
+ 2022.05.24, v12.2.0
2
+
3
+ feature:
4
+ - wisdom: build
5
+ - wisdom: improve messages
6
+
7
+
8
+ 2022.05.18, v12.1.1
9
+
10
+ feature:
11
+ - wisdom: improve messages
12
+
13
+
1
14
  2022.05.18, v12.1.0
2
15
 
3
16
  feature:
@@ -187,7 +200,7 @@ fix:
187
200
  2020.04.28, v10.3.3
188
201
 
189
202
  feature:
190
- - (wisdom) vesion-io v4.0.0
203
+ - (wisdom) version-io v4.0.0
191
204
  - (package) version-io v4.0.0
192
205
 
193
206
 
@@ -584,7 +597,7 @@ fix:
584
597
  2017.05.30, v5.1.1
585
598
 
586
599
  feature:
587
- - (wisdom) rm tag: has no sence, becouse of private
600
+ - (wisdom) rm tag: has no sense, because of private
588
601
  - (travis) node_js: 7 -> 8
589
602
 
590
603
 
package/README.md CHANGED
@@ -22,7 +22,7 @@ One command do next things:
22
22
  - publish to npm;
23
23
  - run command from `scripts.wisdom:done` of `package.json` (if exist);
24
24
 
25
- `package.json` should contan next properties,
25
+ `package.json` should contain next properties,
26
26
 
27
27
  **when publish enabled:**
28
28
 
@@ -94,8 +94,9 @@ When you need configure `wisdom` you could declare them in `package.json` (**wit
94
94
  "private": false,
95
95
  "branch": "master",
96
96
  "scripts": {
97
- "wisdom": "echo 'do something before publish'",
98
- "wisdom:type": "echo 'do something before publish and add --patch, --minor or --major argument'",
97
+ "wisdom": "echo 'do something before starting'",
98
+ "wisdom:type": "echo 'do something before starting and add --patch, --minor or --major argument'",
99
+ "wisdom:build": "echo 'do something before publish'",
99
100
  "wisdom:done": "echo 'do something after publish'"
100
101
  }
101
102
  }
package/lib/release.js CHANGED
@@ -15,7 +15,7 @@ export async function release({version, info, chlog, emitter, count}) {
15
15
  const tag = 'v' + version;
16
16
 
17
17
  if (!info.repository) {
18
- emitter.emit('data', `Error releasing on github: no repository field found in 'package.json'\n`);
18
+ emitter.emit('data', `Error releasing on github: no 'repository' field found in 'package.json'\n`);
19
19
  return;
20
20
  }
21
21
 
@@ -74,9 +74,6 @@ function getUser(json) {
74
74
  const FROM_USER = 3;
75
75
  const WITHOUT_REPO = -1;
76
76
 
77
- if (!json.repository)
78
- return '<no user found>';
79
-
80
77
  return json.repository.url
81
78
  .split('/')
82
79
  .slice(FROM_USER, WITHOUT_REPO)
@@ -3,13 +3,13 @@ import checkAccess from './check-access.js';
3
3
 
4
4
  export const validatePackage = ({info, version, emitter}) => {
5
5
  if (!jessy('repository.url', info))
6
- return emitter.emit('data', '"repository.url" should be defined"');
6
+ return emitter.emit('data', `'repository.url' should be defined`);
7
7
 
8
8
  if (info.name.includes('@') && checkAccess(info))
9
9
  return emitter.emit(
10
10
  'data',
11
- `looks like ${info.name} has no access property\n` +
12
- `packages should have "access" property set to "public" or "restricted" inside "publishConfig"\n`,
11
+ `looks like '${info.name}' has no 'access' property\n` +
12
+ `packages should have 'access' property set to 'public' or 'restricted' inside 'publishConfig'\n`,
13
13
  );
14
14
 
15
15
  if (!version)
package/lib/wisdom.js CHANGED
@@ -97,7 +97,7 @@ function publish(version, info, emitter) {
97
97
  });
98
98
 
99
99
  series([
100
- async function beforePublish() {
100
+ async function beforeStart() {
101
101
  const cmd = jessy('scripts.wisdom', info);
102
102
 
103
103
  if (!cmd)
@@ -106,7 +106,7 @@ function publish(version, info, emitter) {
106
106
  await runWisdom('wisdom', '', version, info, emitter);
107
107
  },
108
108
 
109
- async function beforePublishType() {
109
+ async function beforeStartType() {
110
110
  const cmd = jessy('scripts.wisdom:type', info);
111
111
 
112
112
  if (!cmd)
@@ -165,6 +165,15 @@ function publish(version, info, emitter) {
165
165
  });
166
166
  },
167
167
 
168
+ async function build() {
169
+ const cmd = jessy('scripts.wisdom:build', info);
170
+
171
+ if (!cmd)
172
+ return;
173
+
174
+ await runWisdom('wisdom:build', '', version, info, emitter);
175
+ },
176
+
168
177
  function npmPublish(callback) {
169
178
  if (info.private)
170
179
  return callback();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wisdom",
3
- "version": "12.1.0",
3
+ "version": "12.2.0",
4
4
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
5
5
  "description": "configurable publish releases to github and npm",
6
6
  "homepage": "http://github.com/coderaiser/wisdom",