Skip to content

Commit

Permalink
chore!: upgrade deps; drop node 8 (#125)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
AviVahl authored Aug 17, 2020
1 parent 5b3eb1f commit 5c5bd35
Show file tree
Hide file tree
Showing 6 changed files with 4,847 additions and 7,516 deletions.
18 changes: 9 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,10 @@ jobs:
command: npm install
- run:
name: Run unit tests.
command: npm run ci:coverage
- run:
name: Submit coverage data to codecov.
command: bash <(curl -s https://codecov.io/bash)
when: on_success
node-v8-latest:
command: npm run ci:test
node-v12-latest:
docker:
- image: rollupcabal/circleci-node-v8:latest
- image: rollupcabal/circleci-node-v12:latest
steps:
- checkout
- restore_cache:
Expand All @@ -43,7 +39,11 @@ jobs:
command: npm install
- run:
name: Run unit tests.
command: npm run ci:test
command: npm run ci:coverage
- run:
name: Submit coverage data to codecov.
command: bash <(curl -s https://codecov.io/bash)
when: on_success
analysis:
docker:
- image: rollupcabal/circleci-node-base:latest
Expand Down Expand Up @@ -80,7 +80,7 @@ workflows:
filters:
tags:
only: /.*/
- node-v8-latest:
- node-v12-latest:
requires:
- analysis
filters:
Expand Down
4 changes: 1 addition & 3 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* eslint-disable */
const Configuration = {
extends: ['@commitlint/config-conventional'],

rules: {
'body-leading-blank': [1, 'always'],
'footer-leading-blank': [1, 'always'],
Expand Down Expand Up @@ -29,4 +27,4 @@ const Configuration = {
},
};

module.exports = Configuration;
module.exports = Configuration;
18 changes: 8 additions & 10 deletions lib/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,19 @@
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of this Source Code Form.
*/
const Joi = require('@hapi/joi');

const { string, boolean, object, validate } = Joi.bind();
const Joi = require('joi');

module.exports = {
validate(options) {
const keys = {
compiler: [object().allow(null)],
config: [object().allow(null)],
configPath: [string().allow(null)],
devMiddleware: [object()],
hotClient: [boolean(), object().allow(null)]
compiler: [Joi.object().allow(null)],
config: [Joi.object().allow(null)],
configPath: [Joi.string().allow(null)],
devMiddleware: [Joi.object()],
hotClient: [Joi.boolean(), Joi.object().allow(null)]
};
const schema = object().keys(keys);
const results = validate(options, schema);
const schema = Joi.object().keys(keys);
const results = schema.validate(options);

return results;
}
Expand Down
Loading

0 comments on commit 5c5bd35

Please sign in to comment.