Skip to content

Commit ac2a3f7

Browse files
authored
fix: clean deps and more (#677)
- remove error-handler, our yargs fail handler is better - remove rimraf - remove pify - update all the deps except webpack Considerable amount of dependencies were updated there a small chance of something breaking!! BREAKING CHANGE: Update all the deps except webpack.
1 parent f332803 commit ac2a3f7

13 files changed

+44
-70
lines changed

cmds/lint.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ module.exports = {
1313
},
1414
handler (argv) {
1515
const lint = require('../src/lint')
16-
const onError = require('../src/error-handler')
17-
lint(argv).catch(onError)
16+
return lint(argv)
1817
}
1918
}

cmds/publish-rc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ module.exports = {
3737
},
3838
handler (argv) {
3939
const cmd = require('../src/publish-rc')
40-
const onError = require('../src/error-handler')
41-
cmd(argv).catch(onError)
40+
return cmd(argv)
4241
}
4342
}

cmds/release.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ module.exports = {
104104
},
105105
handler (argv) {
106106
const release = require('../src/release')
107-
const onError = require('../src/error-handler')
108-
release(argv).catch(onError)
107+
return release(argv)
109108
}
110109
}

cmds/test-dependant.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ module.exports = {
3737
},
3838
handler (argv) {
3939
const cmd = require('../src/test-dependant')
40-
const onError = require('../src/error-handler')
41-
cmd(argv).catch(onError)
40+
return cmd(argv)
4241
}
4342
}

cmds/update-last-successful-build.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ module.exports = {
2222
},
2323
handler (argv) {
2424
const cmd = require('../src/update-last-successful-build')
25-
const onError = require('../src/error-handler')
26-
cmd(argv).catch(onError)
25+
return cmd(argv)
2726
}
2827
}

cmds/update-rc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ module.exports = {
2727
},
2828
handler (argv) {
2929
const cmd = require('../src/update-rc')
30-
const onError = require('../src/error-handler')
31-
cmd(argv).catch(onError)
30+
return cmd(argv)
3231
}
3332
}

cmds/update-release-branch-lockfiles.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ module.exports = {
2121
},
2222
handler (argv) {
2323
const cmd = require('../src/update-release-branch-lockfiles')
24-
const onError = require('../src/error-handler')
25-
cmd(argv).catch(onError)
24+
return cmd(argv)
2625
}
2726
}

package.json

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@
4242
},
4343
"dependencies": {
4444
"@achingbrain/dependency-check": "^4.1.0",
45-
"@babel/cli": "^7.10.1",
46-
"@babel/core": "^7.10.2",
47-
"@babel/plugin-transform-regenerator": "^7.10.1",
48-
"@babel/plugin-transform-runtime": "^7.10.1",
49-
"@babel/preset-env": "^7.10.2",
50-
"@babel/preset-typescript": "^7.10.1",
51-
"@babel/register": "^7.10.1",
52-
"@babel/runtime": "^7.10.2",
45+
"@babel/cli": "^7.12.1",
46+
"@babel/core": "^7.12.3",
47+
"@babel/plugin-transform-regenerator": "^7.12.1",
48+
"@babel/plugin-transform-runtime": "^7.12.1",
49+
"@babel/preset-env": "^7.12.1",
50+
"@babel/preset-typescript": "^7.12.1",
51+
"@babel/register": "^7.12.1",
52+
"@babel/runtime": "^7.12.5",
5353
"@commitlint/cli": "^11.0.0",
5454
"@commitlint/config-conventional": "^11.0.0",
5555
"@commitlint/lint": "^11.0.0",
@@ -59,62 +59,58 @@
5959
"@electron/get": "^1.10.0",
6060
"@polka/send-type": "^0.5.2",
6161
"@types/mocha": "^8.0.4",
62-
"@types/node": "^14.14.7",
62+
"@types/node": "^14.14.8",
6363
"aegir-typedoc-theme": "^0.1.0",
64-
"babel-loader": "^8.0.5",
65-
"buffer": "^5.6.0",
64+
"babel-loader": "^8.2.1",
65+
"buffer": "^6.0.2",
6666
"bytes": "^3.1.0",
67-
"camelcase": "^6.0.0",
67+
"camelcase": "^6.2.0",
6868
"chai": "^4.2.0",
6969
"chai-as-promised": "^7.1.1",
7070
"chai-subset": "^1.6.0",
7171
"chalk": "^4.1.0",
72-
"codecov": "^3.6.3",
73-
"conventional-changelog": "^3.1.18",
74-
"conventional-github-releaser": "^3.1.3",
72+
"conventional-changelog": "^3.1.24",
73+
"conventional-github-releaser": "^3.1.5",
7574
"cors": "^2.8.5",
7675
"cosmiconfig": "^7.0.0",
7776
"dirty-chai": "^2.0.1",
78-
"documentation": "^13.0.1",
79-
"electron-mocha": "^8.2.0",
77+
"electron-mocha": "^9.3.2",
8078
"eslint": "^7.11.0",
8179
"eslint-config-ipfs": "^0.1.0",
82-
"execa": "^4.0.0",
80+
"execa": "^4.1.0",
8381
"extract-zip": "^2.0.1",
8482
"findup-sync": "^4.0.0",
8583
"fs-extra": "^9.0.1",
86-
"gh-pages": "^3.0.0",
87-
"git-authors-cli": "^1.0.27",
84+
"gh-pages": "^3.1.0",
85+
"git-authors-cli": "^1.0.31",
8886
"git-validate": "^2.2.4",
8987
"globby": "^11.0.1",
90-
"ipfs-utils": "^4.0.0",
91-
"it-glob": "~0.0.8",
88+
"ipfs-utils": "^5.0.0",
89+
"it-glob": "~0.0.10",
9290
"json-loader": "~0.5.7",
93-
"karma": "^5.1.0",
91+
"karma": "^5.2.3",
9492
"karma-chrome-launcher": "^3.1.0",
9593
"karma-cli": "^2.0.0",
96-
"karma-firefox-launcher": "^1.3.0",
94+
"karma-firefox-launcher": "^2.1.0",
9795
"karma-mocha": "^2.0.1",
9896
"karma-mocha-reporter": "^2.2.5",
9997
"karma-mocha-webworker": "^1.3.0",
100-
"karma-sourcemap-loader": "~0.3.7",
98+
"karma-sourcemap-loader": "~0.3.8",
10199
"karma-webpack": "4.0.2",
102100
"listr": "~0.14.2",
103101
"merge-options": "^3.0.3",
104-
"mocha": "^8.0.1",
102+
"mocha": "^8.2.1",
105103
"npm-package-json-lint": "^5.1.0",
106104
"nyc": "^15.1.0",
107105
"ora": "^5.1.0",
108106
"p-map": "^4.0.0",
109107
"pascalcase": "^1.0.0",
110-
"pify": "^5.0.0",
111108
"polka": "^0.5.2",
112109
"premove": "^3.0.1",
113110
"prompt-promise": "^1.0.3",
114111
"read-pkg-up": "^7.0.1",
115-
"rimraf": "^3.0.1",
116112
"semver": "^7.3.2",
117-
"simple-git": "^2.7.0",
113+
"simple-git": "^2.22.0",
118114
"strip-bom": "^4.0.0",
119115
"strip-json-comments": "^3.1.1",
120116
"terser-webpack-plugin": "^3.0.5",
@@ -125,14 +121,14 @@
125121
"webpack-bundle-analyzer": "^3.7.0",
126122
"webpack-cli": "^3.3.10",
127123
"webpack-merge": "^4.2.2",
128-
"yargs": "^16.1.0",
124+
"yargs": "^16.1.1",
129125
"yargs-parser": "^20.2.3"
130126
},
131127
"devDependencies": {
132-
"electron": "^9.0.4",
133-
"iso-url": "^0.4.7",
128+
"electron": "^11.0.1",
129+
"iso-url": "^1.0.0",
134130
"mock-require": "^3.0.2",
135-
"sinon": "^9.0.2"
131+
"sinon": "^9.2.1"
136132
},
137133
"engines": {
138134
"node": ">=10.0.0",

src/build/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const path = require('path')
55
const fs = require('fs')
66
const bytes = require('bytes')
77
const execa = require('execa')
8-
const rimraf = require('rimraf')
8+
const { premove: del } = require('premove')
99
const { fromAegir, gzipSize, pkg, hasTsconfig } = require('./../utils')
1010
const userConfig = require('../config/user')
1111
const tsCmd = require('../ts')
@@ -22,7 +22,7 @@ module.exports = async (argv) => {
2222
: []
2323

2424
// Clean dist
25-
rimraf.sync(path.join(process.cwd(), 'dist'))
25+
await del(path.join(process.cwd(), 'dist'))
2626

2727
// Run webpack
2828
const webpack = await execa('webpack-cli', [

src/docs/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
const Listr = require('listr')
44
const chalk = require('chalk')
5-
const { premove: remove } = require('premove')
5+
const { premove: del } = require('premove')
66
const { getListrConfig, publishDocs, hasTsconfig } = require('../utils')
77
const tsCmd = require('../ts')
88

99
const TASKS = new Listr(
1010
[
1111
{
1212
title: 'Clean ./docs',
13-
task: () => remove('docs')
13+
task: () => del('docs')
1414
},
1515
{
1616
title: 'Generating documentation',

0 commit comments

Comments
 (0)