Skip to content

Commit 5c5bd35

Browse files
author
Avi Vahl
authored
chore!: upgrade deps; drop node 8 (#125)
* chore: upgrade deps; drop node 8 fixes all `npm audit` failures by upgrading several devDeps as well. regenerate lock file from scratch. * refactor: switch from deprecated @hapi/joi to joi * ci: test on node 10; coverage on node 12 added node 12 to matrix (replaced v8) * ci: ensure node-v12 waits for analysis * chore: remove unused dependencies * chore(deps-dev): upgrade lint-staged and nyc and regenerate lock file also ran lint which reformatted test.js a bit * chore(deps-dev): additional updates still outdated: - eslint@7 (need a matching eslint-config-shellscape version) - prettier@2 (requires lint adjustments as well) * chore: another round of upgrades * chore(deps): remove deps with audit failures - conventional-github-releaser - @commitlint/config-conventional
1 parent 5b3eb1f commit 5c5bd35

File tree

6 files changed

+4847
-7516
lines changed

6 files changed

+4847
-7516
lines changed

.circleci/config.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,10 @@ jobs:
2626
command: npm install
2727
- run:
2828
name: Run unit tests.
29-
command: npm run ci:coverage
30-
- run:
31-
name: Submit coverage data to codecov.
32-
command: bash <(curl -s https://codecov.io/bash)
33-
when: on_success
34-
node-v8-latest:
29+
command: npm run ci:test
30+
node-v12-latest:
3531
docker:
36-
- image: rollupcabal/circleci-node-v8:latest
32+
- image: rollupcabal/circleci-node-v12:latest
3733
steps:
3834
- checkout
3935
- restore_cache:
@@ -43,7 +39,11 @@ jobs:
4339
command: npm install
4440
- run:
4541
name: Run unit tests.
46-
command: npm run ci:test
42+
command: npm run ci:coverage
43+
- run:
44+
name: Submit coverage data to codecov.
45+
command: bash <(curl -s https://codecov.io/bash)
46+
when: on_success
4747
analysis:
4848
docker:
4949
- image: rollupcabal/circleci-node-base:latest
@@ -80,7 +80,7 @@ workflows:
8080
filters:
8181
tags:
8282
only: /.*/
83-
- node-v8-latest:
83+
- node-v12-latest:
8484
requires:
8585
- analysis
8686
filters:

commitlint.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/* eslint-disable */
22
const Configuration = {
3-
extends: ['@commitlint/config-conventional'],
4-
53
rules: {
64
'body-leading-blank': [1, 'always'],
75
'footer-leading-blank': [1, 'always'],
@@ -29,4 +27,4 @@ const Configuration = {
2927
},
3028
};
3129

32-
module.exports = Configuration;
30+
module.exports = Configuration;

lib/validate.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,19 @@
88
The above copyright notice and this permission notice shall be
99
included in all copies or substantial portions of this Source Code Form.
1010
*/
11-
const Joi = require('@hapi/joi');
12-
13-
const { string, boolean, object, validate } = Joi.bind();
11+
const Joi = require('joi');
1412

1513
module.exports = {
1614
validate(options) {
1715
const keys = {
18-
compiler: [object().allow(null)],
19-
config: [object().allow(null)],
20-
configPath: [string().allow(null)],
21-
devMiddleware: [object()],
22-
hotClient: [boolean(), object().allow(null)]
16+
compiler: [Joi.object().allow(null)],
17+
config: [Joi.object().allow(null)],
18+
configPath: [Joi.string().allow(null)],
19+
devMiddleware: [Joi.object()],
20+
hotClient: [Joi.boolean(), Joi.object().allow(null)]
2321
};
24-
const schema = object().keys(keys);
25-
const results = validate(options, schema);
22+
const schema = Joi.object().keys(keys);
23+
const results = schema.validate(options);
2624

2725
return results;
2826
}

0 commit comments

Comments
 (0)