Skip to content

Commit bc915c7

Browse files
authored
Update vulnerable and outdated packages (#2)
1 parent 8b090e9 commit bc915c7

File tree

10 files changed

+15564
-9825
lines changed

10 files changed

+15564
-9825
lines changed

Diff for: package-lock.json

+15,475-9,748
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+68-61
Original file line numberDiff line numberDiff line change
@@ -46,82 +46,85 @@
4646
"homepage": "https://github.com/jeansaad/chalet",
4747
"dependencies": {
4848
"after-all": "^2.0.2",
49-
"ansi2html": "0.0.1",
50-
"chalk": "^2.3.1",
51-
"chokidar": "^2.0.2",
49+
"ansi-to-html": "^0.6.14",
50+
"chalk": "^2.4.2",
51+
"chokidar": "^3.3.1",
5252
"connect-sse": "^1.2.0",
5353
"exit-hook": "^1.1.1",
54-
"express": "^4.16.2",
54+
"express": "^4.17.1",
5555
"get-port": "^3.2.0",
56-
"http-proxy": "^1.17.0",
57-
"matcher": "^1.1.0",
58-
"mkdirp": "^0.5.1",
56+
"http-proxy": "^1.18.0",
57+
"matcher": "^2.1.0",
58+
"mkdirp": "^1.0.3",
5959
"once": "^1.3.2",
60-
"please-upgrade-node": "^3.0.2",
61-
"pug": "^2.0.0-rc.4",
62-
"respawn": "^2.4.1",
63-
"selfsigned": "^1.10.2",
60+
"please-upgrade-node": "^3.2.0",
61+
"pug": "^2.0.4",
62+
"respawn": "^2.6.0",
63+
"selfsigned": "^1.10.7",
6464
"server-ready": "^0.3.1",
65-
"sudo-block": "^2.0.0",
66-
"tildify": "^1.1.2",
67-
"tinydate": "^1.0.0",
65+
"sudo-block": "^3.0.0",
66+
"tinydate": "^1.2.0",
6867
"unquote": "^1.1.1",
69-
"untildify": "^3.0.2",
70-
"update-notifier": "^2.3.0",
7168
"user-startup": "^0.2.1",
7269
"vhost": "^3.0.2",
73-
"yargs": "^10.1.2"
70+
"yargs": "^15.3.0"
7471
},
7572
"devDependencies": {
76-
"@types/classnames": "^2.2.3",
73+
"@ava/babel": "^1.0.1",
74+
"@types/classnames": "^2.2.10",
7775
"@types/escape-html": "0.0.20",
78-
"@types/react": "^16.0.38",
79-
"@types/react-dom": "^16.0.4",
80-
"@types/react-icons": "^2.2.5",
81-
"ava": "^0.25.0",
76+
"@types/react": "^16.9.23",
77+
"@types/react-dom": "^16.9.5",
78+
"@types/react-icons": "^2.2.7",
79+
"ansi-html": "0.0.7",
80+
"ava": "^3.5.0",
8281
"babel-cli": "^6.26.0",
8382
"babel-plugin-transform-object-rest-spread": "^6.26.0",
84-
"babel-preset-env": "^1.6.1",
85-
"classnames": "^2.2.5",
86-
"css-loader": "^0.28.10",
83+
"babel-preset-env": "^1.7.0",
84+
"classnames": "^2.2.6",
85+
"css-loader": "^3.4.2",
8786
"escape-html": "^1.0.3",
88-
"eslint": "^4.18.1",
89-
"eslint-config-prettier": "^2.9.0",
90-
"eslint-config-standard": "^11.0.0",
91-
"eslint-plugin-import": "^2.9.0",
92-
"eslint-plugin-node": "^5.2.1",
93-
"eslint-plugin-prettier": "^2.6.0",
94-
"eslint-plugin-promise": "^3.6.0",
95-
"eslint-plugin-standard": "^3.0.1",
96-
"html-webpack-plugin": "^2.30.1",
97-
"husky": "^0.15.0-rc.8",
87+
"eslint": "^6.8.0",
88+
"eslint-config-prettier": "^6.10.0",
89+
"eslint-config-standard": "^14.1.0",
90+
"eslint-plugin-import": "^2.20.1",
91+
"eslint-plugin-node": "^11.0.0",
92+
"eslint-plugin-prettier": "^3.1.2",
93+
"eslint-plugin-promise": "^4.2.1",
94+
"eslint-plugin-standard": "^4.0.1",
95+
"html-webpack-plugin": "^3.2.0",
96+
"husky": "^4.2.3",
9897
"lodash.uniqueid": "^4.0.1",
99-
"mobx": "^3.5.1",
100-
"mobx-react": "^4.4.2",
101-
"nodemon": "^1.15.1",
102-
"npm-run-all": "^4.1.2",
103-
"pkg-ok": "^2.1.0",
104-
"prettier": "^1.10.2",
105-
"react": "^16.2.0",
106-
"react-dom": "^16.2.0",
98+
"mobx": "^5.15.4",
99+
"mobx-react": "^6.1.8",
100+
"nodemon": "^2.0.2",
101+
"npm-run-all": "^4.1.5",
102+
"pkg-ok": "^2.3.1",
103+
"prettier": "^1.19.1",
104+
"react": "^16.13.0",
105+
"react-dom": "^16.13.0",
107106
"react-icons": "^2.2.7",
108-
"rimraf": "^2.6.2",
109-
"sinon": "^4.4.2",
110-
"style-loader": "^0.19.1",
111-
"stylelint": "^8.4.0",
112-
"stylelint-config-recess-order": "^1.2.3",
113-
"stylelint-config-standard": "^18.1.0",
114-
"supertest": "^3.0.0",
115-
"tempy": "^0.2.0",
116-
"ts-loader": "^3.5.0",
117-
"tslint": "^5.9.1",
118-
"tslint-config-prettier": "^1.9.0",
119-
"tslint-plugin-prettier": "^1.3.0",
120-
"typescript": "^2.7.2",
121-
"uglifyjs-webpack-plugin": "^1.2.2",
122-
"webpack": "^3.11.0",
123-
"webpack-dev-server": "^2.11.1",
124-
"webpack-merge": "^4.1.2"
107+
"rimraf": "^3.0.2",
108+
"sinon": "^9.0.1",
109+
"style-loader": "^1.1.3",
110+
"stylelint": "^13.2.1",
111+
"stylelint-config-recess-order": "^2.0.3",
112+
"stylelint-config-standard": "^20.0.0",
113+
"supertest": "^4.0.2",
114+
"tempy": "^0.5.0",
115+
"terser-webpack-plugin": "^2.3.5",
116+
"tildify": "^2.0.0",
117+
"ts-loader": "^6.2.1",
118+
"tslint": "^6.1.0",
119+
"tslint-config-prettier": "^1.18.0",
120+
"tslint-plugin-prettier": "^2.1.0",
121+
"typescript": "^3.8.3",
122+
"untildify": "^4.0.0",
123+
"update-notifier": "^4.1.0",
124+
"webpack": "^4.42.0",
125+
"webpack-cli": "^3.3.11",
126+
"webpack-dev-server": "^3.10.3",
127+
"webpack-merge": "^4.2.2"
125128
},
126129
"ava": {
127130
"serial": true,
@@ -130,7 +133,11 @@
130133
"babel-register",
131134
"./test/_setup"
132135
],
133-
"babel": "inherit"
136+
"babel": {
137+
"testOptions": {
138+
"babelrc": false
139+
}
140+
}
134141
},
135142
"husky": {
136143
"hooks": {

Diff for: src/app/formatter.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as ansi2HTML from 'ansi2html'
1+
import * as ansiHTML from 'ansi-html'
22
import * as escapeHTML from 'escape-html'
33
import { IMonitor } from './Store'
44

@@ -12,13 +12,13 @@ export function formatLines(str: string): string[] {
1212
.split('\n')
1313
.map(escapeHTML)
1414
.map(blankLine)
15-
.map(ansi2HTML)
15+
.map(ansiHTML)
1616
}
1717

1818
export function statusTitle(monitor: IMonitor) {
1919
return monitor.pid
2020
? `PID ${monitor.pid}\nStarted since ${new Date(
21-
monitor.started
22-
).toLocaleString()}`
21+
monitor.started
22+
).toLocaleString()}`
2323
: ''
2424
}

Diff for: src/app/global.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
declare module 'ansi2html'
1+
declare module 'ansi-html'
22
declare module 'lodash.uniqueid'
33
declare module 'react-icons/lib/md/arrow-downward'
44
declare module 'react-icons/lib/md/clear-all'

Diff for: src/cli/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,18 @@ module.exports = processArgv =>
6363
'Add server or proxy',
6464
yargs => yargs.options(addOptions),
6565
// .demand(1),
66-
argv => servers.add(argv['cmd_or_url'], argv)
66+
argv => servers.add(argv.cmd_or_url, argv)
6767
)
6868
.command(
6969
'run <cmd> [options]',
7070
'Run server and get a temporary local domain',
7171
yargs => {
7272
const runOptions = { ...addOptions }
73-
delete runOptions['out']
73+
delete runOptions.out
7474
return yargs.options(runOptions)
7575
// TODO demand(1) ?
7676
},
77-
argv => run.spawn(argv['cmd'], argv)
77+
argv => run.spawn(argv.cmd, argv)
7878
)
7979
.command(
8080
'rm [options]',

Diff for: src/daemon/group.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ class Group extends EventEmitter {
365365
} else if (item.start) {
366366
target = `ws://127.0.0.1:${item.env.PORT}`
367367
} else {
368-
const { hostname, port } = url.parse(item.target)
368+
const { hostname, port } = new url.URL(item.target)
369369
const targetPort = port || 80
370370
target = `ws://${hostname}:${targetPort}`
371371
}
@@ -404,7 +404,7 @@ class Group extends EventEmitter {
404404
log(`Connect - ${host}${PORT}`)
405405
tcpProxy.proxy(socket, PORT)
406406
} else {
407-
const { hostname, port } = url.parse(item.target)
407+
const { hostname, port } = new url.URL(item.target)
408408
const targetPort = port || 80
409409
log(`Connect - ${host}${hostname}:${port}`)
410410
tcpProxy.proxy(socket, targetPort, hostname)

Diff for: test/cli/servers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ test('add should create file', t => {
2525
t.deepEqual(actual, conf)
2626
})
2727

28-
test('add should create file with URL safe characters by defaults', t => {
28+
test('add should create file with URL safe characters for dir by default', t => {
2929
cli(['', '', 'add', 'node index.js', '--dir', '/_-Some Project_Name--'])
3030

3131
const file = path.join(serversDir, 'some-project-name.json')
3232

3333
t.true(fs.existsSync(file))
3434
})
3535

36-
test('add should create file with URL safe characters by defaults', t => {
36+
test('add should create file with URL safe characters with name by default', t => {
3737
cli(['', '', 'add', 'node index.js', '--name', '/_-Some Project_Name--'])
3838

3939
const file = path.join(serversDir, 'some-project-name.json')

Diff for: test/daemon/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ test.before(() => {
8686
Loader(group, { watch: false })
8787
})
8888

89-
test.cb.after(t => app.group.stopAll(t.end))
89+
test.after.cb(t => app.group.stopAll(t.end))
9090

9191
//
9292
// Test daemon/vhosts/tld.js

Diff for: webpack.dev.js

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const merge = require('webpack-merge')
22
const common = require('./webpack.common.js')
33

44
module.exports = merge(common, {
5+
mode: 'development',
56
devtool: 'inline-source-map',
67
devServer: {
78
contentBase: './dist',

Diff for: webpack.prod.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
const webpack = require('webpack')
22
const merge = require('webpack-merge')
3-
const UglifyJSPlugin = require('uglifyjs-webpack-plugin')
3+
const TerserPlugin = require('terser-webpack-plugin')
44
const common = require('./webpack.common.js')
55

66
module.exports = merge(common, {
7+
mode: 'production',
78
plugins: [
8-
new UglifyJSPlugin({
9-
sourceMap: true
9+
new TerserPlugin({
10+
parallel: true,
11+
terserOptions: {
12+
ecma: 6
13+
}
1014
}),
1115
new webpack.DefinePlugin({
1216
'process.env.NODE_ENV': JSON.stringify('production')

0 commit comments

Comments
 (0)