Skip to content

Commit

Permalink
Upgrade most of the dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Rowno committed Dec 3, 2023
1 parent 5ee59ca commit 6d6f090
Show file tree
Hide file tree
Showing 5 changed files with 1,236 additions and 1,188 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged
24 changes: 10 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,26 @@
],
"scripts": {
"test": "yarn lint && ava",
"lint": "eslint '**/*.js'"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
"lint": "eslint '**/*.js'",
"prepare": "husky install"
},
"engines": {
"node": ">=16"
"node": ">=18"
},
"dependencies": {
"@hapi/joi": "^16.0.0",
"@hapi/joi": "^17.1.1",
"micro": "^9.3.3",
"openssl-self-signed-certificate": "^1.1.6"
},
"devDependencies": {
"ava": "^3.12.1",
"eslint": "^7.9.0",
"eslint-config-prettier": "^6.12.0",
"eslint": "^8.55.0",
"eslint-config-prettier": "^9.1.0",
"got": "^11.7.0",
"husky": "^4.3.0",
"lint-staged": "^10.4.0",
"prettier": "^2.1.2",
"selfsigned": "^1.10.4"
"husky": "^8.0.0",
"lint-staged": "^15.1.0",
"prettier": "^3.1.0",
"selfsigned": "^2.4.1"
},
"lint-staged": {
"*.js": [
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class HttpStub {

if (this._options.https) {
this._server = https.createServer(this._options.https, (req, res) =>
micro.run(req, res, this._handler)
micro.run(req, res, this._handler),
)
} else {
this._server = micro(this._handler)
Expand Down
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ test('supports urlencoded request bodies', async (t) => {
t.deepEqual(request.body, { wow: 'such json' })
t.deepEqual(
request.headers['content-type'],
'application/x-www-form-urlencoded'
'application/x-www-form-urlencoded',
)
})

Expand Down Expand Up @@ -239,7 +239,7 @@ test('can stop the server', async (t) => {
await httpStub.stop()

const error = await t.throwsAsync(
got(httpStub.url, { throwHttpErrors: false, retry: 0 })
got(httpStub.url, { throwHttpErrors: false, retry: 0 }),
)
// Node <=18 returns ECONNREFUSED, Node >=20 returns ECONNRESET
t.true(error.code === 'ECONNREFUSED' || error.code === 'ECONNRESET')
Expand Down
Loading

0 comments on commit 6d6f090

Please sign in to comment.