@loopback/build 5.2.0 → 5.4.1
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.md +43 -0
- package/README.md +2 -2
- package/bin/compile-package.js +5 -3
- package/package.json +8 -13
- package/src/fail-on-console-logs.js +4 -0
- package/test/integration/scripts.integration.js +2 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,49 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [5.4.1](https://github.com/strongloop/loopback-next/compare/@loopback/build@5.4.0...@loopback/build@5.4.1) (2020-05-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @loopback/build
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [5.4.0](https://github.com/strongloop/loopback-next/compare/@loopback/build@5.3.1...@loopback/build@5.4.0) (2020-05-19)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **build:** recognize `lb-tsc` bool options with a value ([015df04](https://github.com/strongloop/loopback-next/commit/015df04cf2df3455b5eb8582e6097406ee00e58a))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* upgrade to TypeScript 3.9.x ([3300e45](https://github.com/strongloop/loopback-next/commit/3300e4569ab8410bb1285f7a54d326e9d976476d))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## [5.3.1](https://github.com/strongloop/loopback-next/compare/@loopback/build@5.3.0...@loopback/build@5.3.1) (2020-05-07)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @loopback/build
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# [5.3.0](https://github.com/strongloop/loopback-next/compare/@loopback/build@5.2.0...@loopback/build@5.3.0) (2020-04-29)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Features
|
|
42
|
+
|
|
43
|
+
* **build:** don't flag console logs when tests failed ([048e87e](https://github.com/strongloop/loopback-next/commit/048e87ec6bc705f73418adfed425b4db03c38aa8))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
6
49
|
# [5.2.0](https://github.com/strongloop/loopback-next/compare/@loopback/build@5.1.0...@loopback/build@5.2.0) (2020-04-23)
|
|
7
50
|
|
|
8
51
|
|
package/README.md
CHANGED
|
@@ -126,8 +126,8 @@ npm run build
|
|
|
126
126
|
"precoverage": "npm test",
|
|
127
127
|
"coverage": "open coverage/index.html",
|
|
128
128
|
"coverage:ci": "lb-nyc report --reporter=text-lcov | coveralls",
|
|
129
|
-
"test": "lb-nyc npm run mocha
|
|
130
|
-
"test:ci": "lb-nyc npm run mocha
|
|
129
|
+
"test": "lb-nyc npm run mocha",
|
|
130
|
+
"test:ci": "lb-nyc npm run mocha"
|
|
131
131
|
```
|
|
132
132
|
|
|
133
133
|
`converage:ci` sets up integration with [Coveralls](https://coveralls.io/).
|
package/bin/compile-package.js
CHANGED
|
@@ -164,8 +164,10 @@ function validArgsForBuild(args) {
|
|
|
164
164
|
});
|
|
165
165
|
let validArgs = args;
|
|
166
166
|
if (args.includes('-b') || args.includes('--build')) {
|
|
167
|
-
validArgs = filterArgs(args, arg => {
|
|
168
|
-
if (validBooleanOptions.includes(arg))
|
|
167
|
+
validArgs = filterArgs(args, (arg, next) => {
|
|
168
|
+
if (validBooleanOptions.includes(arg)) {
|
|
169
|
+
return next === 'false' || next === 'true' ? 2 : 1;
|
|
170
|
+
}
|
|
169
171
|
if (validValueOptions.includes(arg)) return 2;
|
|
170
172
|
return 0;
|
|
171
173
|
});
|
|
@@ -185,7 +187,7 @@ function filterArgs(args, filter) {
|
|
|
185
187
|
const validArgs = [];
|
|
186
188
|
let i = 0;
|
|
187
189
|
while (i < args.length) {
|
|
188
|
-
const length = filter(args[i]);
|
|
190
|
+
const length = filter(args[i], args[i + 1]);
|
|
189
191
|
if (length === 0) {
|
|
190
192
|
i++;
|
|
191
193
|
} else if (length === 1) {
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/strongloop/loopback-next.git",
|
|
7
7
|
"directory": "packages/build"
|
|
8
8
|
},
|
|
9
|
-
"version": "5.
|
|
9
|
+
"version": "5.4.1",
|
|
10
10
|
"engines": {
|
|
11
11
|
"node": ">=10"
|
|
12
12
|
},
|
|
@@ -15,25 +15,20 @@
|
|
|
15
15
|
"copyright.owner": "IBM Corp.",
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@loopback/eslint-config": "^
|
|
18
|
+
"@loopback/eslint-config": "^7.0.1",
|
|
19
19
|
"@types/mocha": "^7.0.2",
|
|
20
|
-
"@types/node": "^10.17.
|
|
21
|
-
"@typescript-eslint/eslint-plugin": "^2.29.0",
|
|
22
|
-
"@typescript-eslint/parser": "^2.29.0",
|
|
20
|
+
"@types/node": "^10.17.24",
|
|
23
21
|
"cross-spawn": "^7.0.2",
|
|
24
22
|
"debug": "^4.1.1",
|
|
25
|
-
"eslint": "^
|
|
26
|
-
"eslint-config-prettier": "^6.11.0",
|
|
27
|
-
"eslint-plugin-eslint-plugin": "^2.2.1",
|
|
28
|
-
"eslint-plugin-mocha": "^6.3.0",
|
|
23
|
+
"eslint": "^7.0.0",
|
|
29
24
|
"fs-extra": "^9.0.0",
|
|
30
25
|
"glob": "^7.1.6",
|
|
31
|
-
"mocha": "^7.1.
|
|
26
|
+
"mocha": "^7.1.2",
|
|
32
27
|
"nyc": "^15.0.1",
|
|
33
28
|
"prettier": "^2.0.5",
|
|
34
29
|
"rimraf": "^3.0.2",
|
|
35
|
-
"source-map-support": "^0.5.
|
|
36
|
-
"typescript": "~3.
|
|
30
|
+
"source-map-support": "^0.5.19",
|
|
31
|
+
"typescript": "~3.9.3"
|
|
37
32
|
},
|
|
38
33
|
"bin": {
|
|
39
34
|
"lb-tsc": "./bin/compile-package.js",
|
|
@@ -47,5 +42,5 @@
|
|
|
47
42
|
"test": "npm run mocha",
|
|
48
43
|
"mocha": "node bin/run-mocha --timeout 30000 \"test/integration/*.js\" \"test/unit/*.js\""
|
|
49
44
|
},
|
|
50
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "62aea854bf85c5a5995b59e6908fe5409f7eea96"
|
|
51
46
|
}
|
|
@@ -46,6 +46,10 @@ process.on('warning', warning => {
|
|
|
46
46
|
});
|
|
47
47
|
|
|
48
48
|
process.on('exit', code => {
|
|
49
|
+
// Don't complain about console logs when some of the tests have failed.
|
|
50
|
+
// It's a common practice to add temporary console logs while troubleshooting.
|
|
51
|
+
if (code) return;
|
|
52
|
+
|
|
49
53
|
if (!warnings.length) {
|
|
50
54
|
for (const w of warnings) {
|
|
51
55
|
originalConsole.warn(w);
|
|
@@ -10,8 +10,7 @@ const path = require('path');
|
|
|
10
10
|
const fs = require('fs-extra');
|
|
11
11
|
const utils = require('../../bin/utils');
|
|
12
12
|
|
|
13
|
-
describe('build', function () {
|
|
14
|
-
// eslint-disable-next-line no-invalid-this
|
|
13
|
+
describe('build', /** @this {Mocha.Suite} */ function () {
|
|
15
14
|
this.timeout(30000);
|
|
16
15
|
const cwd = process.cwd();
|
|
17
16
|
const projectDir = path.resolve(__dirname, './fixtures');
|
|
@@ -243,8 +242,7 @@ describe('build', function () {
|
|
|
243
242
|
});
|
|
244
243
|
});
|
|
245
244
|
|
|
246
|
-
describe('mocha', function () {
|
|
247
|
-
// eslint-disable-next-line no-invalid-this
|
|
245
|
+
describe('mocha', /** @this {Mocha.Suite} */ function () {
|
|
248
246
|
this.timeout(30000);
|
|
249
247
|
const cwd = process.cwd();
|
|
250
248
|
const projectDir = path.resolve(__dirname, './fixtures');
|