@signageos/lib 15.5.2 → 15.5.3-master.2946
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 +3 -7
- package/tools/detect-semver-level.js +1 -1
- package/tools/es6-mocha.js +19 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@signageos/lib",
|
|
3
|
-
"version": "15.5.
|
|
3
|
+
"version": "15.5.3-master.2946",
|
|
4
4
|
"main": "./dist",
|
|
5
5
|
"files": [
|
|
6
6
|
"tools",
|
|
@@ -18,9 +18,7 @@
|
|
|
18
18
|
"build": "npm run build-es5 && npm run build-es6",
|
|
19
19
|
"build-es5": "tsc --target es5 --outDir dist && npm run escheck:5",
|
|
20
20
|
"build-es6": "tsc --target es6 --outDir es6 && npm run escheck:6",
|
|
21
|
-
"lint": "
|
|
22
|
-
"lint:prettier": "prettier \"**/*.+(ts|tsx|json|js)\" --check",
|
|
23
|
-
"lint:prettier:fix": "prettier \"**/*.+(ts|tsx|json|js)\" --write",
|
|
21
|
+
"lint": "eslint --ext .ts,.tsx,.js ./src/ ./config ./tests ./tools",
|
|
24
22
|
"prebuild": "rm -rf dist/*",
|
|
25
23
|
"prepare": "npm run prebuild && npm run build",
|
|
26
24
|
"test": "NODE_ENV=test mocha",
|
|
@@ -66,7 +64,7 @@
|
|
|
66
64
|
"@faker-js/faker": "8.3.1",
|
|
67
65
|
"@influxdata/influxdb-client": "1.16.0",
|
|
68
66
|
"@istanbuljs/nyc-config-typescript": "1.0.2",
|
|
69
|
-
"@signageos/codestyle": "0.
|
|
67
|
+
"@signageos/codestyle": "0.3.0",
|
|
70
68
|
"@types/amqplib": "0.5.13",
|
|
71
69
|
"@types/async-lock": "1.4.2",
|
|
72
70
|
"@types/auth0": "3.3.2",
|
|
@@ -111,7 +109,6 @@
|
|
|
111
109
|
"path-browserify": "1.0.1",
|
|
112
110
|
"pg": "7.12.1",
|
|
113
111
|
"pg-promise": "10.11.0",
|
|
114
|
-
"prettier": "2.5.1",
|
|
115
112
|
"redis": "3.1.2",
|
|
116
113
|
"should": "11.2.1",
|
|
117
114
|
"should-sinon": "0.0.6",
|
|
@@ -120,7 +117,6 @@
|
|
|
120
117
|
"socket.io-client": "4.7.2",
|
|
121
118
|
"supertest": "3.4.2",
|
|
122
119
|
"ts-node": "10.9.2",
|
|
123
|
-
"tslint": "6.1.2",
|
|
124
120
|
"typescript": "4.9.4",
|
|
125
121
|
"util": "0.12.5",
|
|
126
122
|
"verdaccio": "5.29.0",
|
|
@@ -5,7 +5,7 @@ const allChangeTypes = ['Changed', 'Removed', 'Added', 'Fixed', 'Security', 'Dep
|
|
|
5
5
|
(async function () {
|
|
6
6
|
const changeLog = await getPipedInput();
|
|
7
7
|
const groupedLog = getGroupedChangeLog(changeLog);
|
|
8
|
-
const changedTypes = Object.keys(groupedLog
|
|
8
|
+
const changedTypes = Object.keys(groupedLog.Unreleased || {});
|
|
9
9
|
switch (true) {
|
|
10
10
|
case changedTypes.indexOf('Changed') !== -1:
|
|
11
11
|
case changedTypes.indexOf('Removed') !== -1:
|
package/tools/es6-mocha.js
CHANGED
|
@@ -7,7 +7,9 @@ module.exports = exports = function (Mocha, co) {
|
|
|
7
7
|
let finished;
|
|
8
8
|
let emitted;
|
|
9
9
|
|
|
10
|
-
if (ctx)
|
|
10
|
+
if (ctx) {
|
|
11
|
+
ctx.runnable(this);
|
|
12
|
+
}
|
|
11
13
|
|
|
12
14
|
// timeout
|
|
13
15
|
if (this.async) {
|
|
@@ -21,15 +23,21 @@ module.exports = exports = function (Mocha, co) {
|
|
|
21
23
|
|
|
22
24
|
// called multiple times
|
|
23
25
|
function multiple(err) {
|
|
24
|
-
if (emitted)
|
|
26
|
+
if (emitted) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
25
29
|
emitted = true;
|
|
26
30
|
self.emit('error', err || new Error('done() called multiple times'));
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
// finished
|
|
30
34
|
function done(err) {
|
|
31
|
-
if (self.timedOut)
|
|
32
|
-
|
|
35
|
+
if (self.timedOut) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (finished) {
|
|
39
|
+
return multiple(err);
|
|
40
|
+
}
|
|
33
41
|
self.clearTimeout();
|
|
34
42
|
self.duration = new Date().valueOf() - start;
|
|
35
43
|
finished = true;
|
|
@@ -43,8 +51,12 @@ module.exports = exports = function (Mocha, co) {
|
|
|
43
51
|
if (this.async) {
|
|
44
52
|
try {
|
|
45
53
|
this.fn.call(ctx, function (err) {
|
|
46
|
-
if (err instanceof Error || toString.call(err) === '[object Error]')
|
|
47
|
-
|
|
54
|
+
if (err instanceof Error || toString.call(err) === '[object Error]') {
|
|
55
|
+
return done(err);
|
|
56
|
+
}
|
|
57
|
+
if (null != err) {
|
|
58
|
+
return done(new Error('done() invoked with non-Error: ' + err));
|
|
59
|
+
}
|
|
48
60
|
done();
|
|
49
61
|
});
|
|
50
62
|
} catch (err) {
|
|
@@ -59,7 +71,7 @@ module.exports = exports = function (Mocha, co) {
|
|
|
59
71
|
|
|
60
72
|
try {
|
|
61
73
|
if (!this.pending) {
|
|
62
|
-
|
|
74
|
+
let result = this.fn.call(ctx);
|
|
63
75
|
// This is where we determine if the result is a generator
|
|
64
76
|
if (result && typeof result.next == 'function' && typeof result.throw == 'function') {
|
|
65
77
|
// Mocha timeout for async function
|