Skip to content

Commit

Permalink
fix: clean deps and more (#677)
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
hugomrdias authored Nov 19, 2020
1 parent f332803 commit ac2a3f7
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 70 deletions.
3 changes: 1 addition & 2 deletions cmds/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module.exports = {
},
handler (argv) {
const lint = require('../src/lint')
const onError = require('../src/error-handler')
lint(argv).catch(onError)
return lint(argv)
}
}
3 changes: 1 addition & 2 deletions cmds/publish-rc.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ module.exports = {
},
handler (argv) {
const cmd = require('../src/publish-rc')
const onError = require('../src/error-handler')
cmd(argv).catch(onError)
return cmd(argv)
}
}
3 changes: 1 addition & 2 deletions cmds/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ module.exports = {
},
handler (argv) {
const release = require('../src/release')
const onError = require('../src/error-handler')
release(argv).catch(onError)
return release(argv)
}
}
3 changes: 1 addition & 2 deletions cmds/test-dependant.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ module.exports = {
},
handler (argv) {
const cmd = require('../src/test-dependant')
const onError = require('../src/error-handler')
cmd(argv).catch(onError)
return cmd(argv)
}
}
3 changes: 1 addition & 2 deletions cmds/update-last-successful-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ module.exports = {
},
handler (argv) {
const cmd = require('../src/update-last-successful-build')
const onError = require('../src/error-handler')
cmd(argv).catch(onError)
return cmd(argv)
}
}
3 changes: 1 addition & 2 deletions cmds/update-rc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ module.exports = {
},
handler (argv) {
const cmd = require('../src/update-rc')
const onError = require('../src/error-handler')
cmd(argv).catch(onError)
return cmd(argv)
}
}
3 changes: 1 addition & 2 deletions cmds/update-release-branch-lockfiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ module.exports = {
},
handler (argv) {
const cmd = require('../src/update-release-branch-lockfiles')
const onError = require('../src/error-handler')
cmd(argv).catch(onError)
return cmd(argv)
}
}
62 changes: 29 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
},
"dependencies": {
"@achingbrain/dependency-check": "^4.1.0",
"@babel/cli": "^7.10.1",
"@babel/core": "^7.10.2",
"@babel/plugin-transform-regenerator": "^7.10.1",
"@babel/plugin-transform-runtime": "^7.10.1",
"@babel/preset-env": "^7.10.2",
"@babel/preset-typescript": "^7.10.1",
"@babel/register": "^7.10.1",
"@babel/runtime": "^7.10.2",
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"@babel/plugin-transform-regenerator": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/preset-typescript": "^7.12.1",
"@babel/register": "^7.12.1",
"@babel/runtime": "^7.12.5",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@commitlint/lint": "^11.0.0",
Expand All @@ -59,62 +59,58 @@
"@electron/get": "^1.10.0",
"@polka/send-type": "^0.5.2",
"@types/mocha": "^8.0.4",
"@types/node": "^14.14.7",
"@types/node": "^14.14.8",
"aegir-typedoc-theme": "^0.1.0",
"babel-loader": "^8.0.5",
"buffer": "^5.6.0",
"babel-loader": "^8.2.1",
"buffer": "^6.0.2",
"bytes": "^3.1.0",
"camelcase": "^6.0.0",
"camelcase": "^6.2.0",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"chai-subset": "^1.6.0",
"chalk": "^4.1.0",
"codecov": "^3.6.3",
"conventional-changelog": "^3.1.18",
"conventional-github-releaser": "^3.1.3",
"conventional-changelog": "^3.1.24",
"conventional-github-releaser": "^3.1.5",
"cors": "^2.8.5",
"cosmiconfig": "^7.0.0",
"dirty-chai": "^2.0.1",
"documentation": "^13.0.1",
"electron-mocha": "^8.2.0",
"electron-mocha": "^9.3.2",
"eslint": "^7.11.0",
"eslint-config-ipfs": "^0.1.0",
"execa": "^4.0.0",
"execa": "^4.1.0",
"extract-zip": "^2.0.1",
"findup-sync": "^4.0.0",
"fs-extra": "^9.0.1",
"gh-pages": "^3.0.0",
"git-authors-cli": "^1.0.27",
"gh-pages": "^3.1.0",
"git-authors-cli": "^1.0.31",
"git-validate": "^2.2.4",
"globby": "^11.0.1",
"ipfs-utils": "^4.0.0",
"it-glob": "~0.0.8",
"ipfs-utils": "^5.0.0",
"it-glob": "~0.0.10",
"json-loader": "~0.5.7",
"karma": "^5.1.0",
"karma": "^5.2.3",
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "^2.0.0",
"karma-firefox-launcher": "^1.3.0",
"karma-firefox-launcher": "^2.1.0",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-mocha-webworker": "^1.3.0",
"karma-sourcemap-loader": "~0.3.7",
"karma-sourcemap-loader": "~0.3.8",
"karma-webpack": "4.0.2",
"listr": "~0.14.2",
"merge-options": "^3.0.3",
"mocha": "^8.0.1",
"mocha": "^8.2.1",
"npm-package-json-lint": "^5.1.0",
"nyc": "^15.1.0",
"ora": "^5.1.0",
"p-map": "^4.0.0",
"pascalcase": "^1.0.0",
"pify": "^5.0.0",
"polka": "^0.5.2",
"premove": "^3.0.1",
"prompt-promise": "^1.0.3",
"read-pkg-up": "^7.0.1",
"rimraf": "^3.0.1",
"semver": "^7.3.2",
"simple-git": "^2.7.0",
"simple-git": "^2.22.0",
"strip-bom": "^4.0.0",
"strip-json-comments": "^3.1.1",
"terser-webpack-plugin": "^3.0.5",
Expand All @@ -125,14 +121,14 @@
"webpack-bundle-analyzer": "^3.7.0",
"webpack-cli": "^3.3.10",
"webpack-merge": "^4.2.2",
"yargs": "^16.1.0",
"yargs": "^16.1.1",
"yargs-parser": "^20.2.3"
},
"devDependencies": {
"electron": "^9.0.4",
"iso-url": "^0.4.7",
"electron": "^11.0.1",
"iso-url": "^1.0.0",
"mock-require": "^3.0.2",
"sinon": "^9.0.2"
"sinon": "^9.2.1"
},
"engines": {
"node": ">=10.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const path = require('path')
const fs = require('fs')
const bytes = require('bytes')
const execa = require('execa')
const rimraf = require('rimraf')
const { premove: del } = require('premove')
const { fromAegir, gzipSize, pkg, hasTsconfig } = require('./../utils')
const userConfig = require('../config/user')
const tsCmd = require('../ts')
Expand All @@ -22,7 +22,7 @@ module.exports = async (argv) => {
: []

// Clean dist
rimraf.sync(path.join(process.cwd(), 'dist'))
await del(path.join(process.cwd(), 'dist'))

// Run webpack
const webpack = await execa('webpack-cli', [
Expand Down
4 changes: 2 additions & 2 deletions src/docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

const Listr = require('listr')
const chalk = require('chalk')
const { premove: remove } = require('premove')
const { premove: del } = require('premove')
const { getListrConfig, publishDocs, hasTsconfig } = require('../utils')
const tsCmd = require('../ts')

const TASKS = new Listr(
[
{
title: 'Clean ./docs',
task: () => remove('docs')
task: () => del('docs')
},
{
title: 'Generating documentation',
Expand Down
15 changes: 0 additions & 15 deletions src/error-handler.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/release/github.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict'

const conventionalGithubReleaser = require('conventional-github-releaser')
const pify = require('pify')
const { promisify } = require('util')

function github (opts) {
return pify(conventionalGithubReleaser)({
return promisify(conventionalGithubReleaser)({
type: 'oauth',
token: opts.ghtoken,
url: 'https://api.github.com/'
Expand Down
4 changes: 2 additions & 2 deletions test/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const lint = require('../src/lint')
const { expect } = require('../utils/chai')
const path = require('path')
const fs = require('fs')
const rimraf = require('rimraf')
const { premove: del } = require('premove/sync')

const TEMP_FOLDER = path.join(__dirname, '../node_modules/.temp-test')

Expand Down Expand Up @@ -67,7 +67,7 @@ describe('lint', () => {

after(() => {
process.chdir(cwd)
rimraf.sync(TEMP_FOLDER)
del(TEMP_FOLDER)
})

it('lint itself (aegir)', function () {
Expand Down

0 comments on commit ac2a3f7

Please sign in to comment.