Skip to content

Commit

Permalink
chore: Upgrade proxy to 2.2.0 (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshMock authored Nov 11, 2024
1 parent 77cd7b5 commit 9a51bff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"into-stream": "6.0.0",
"license-checker": "25.0.1",
"node-abort-controller": "3.1.1",
"proxy": "1.0.2",
"proxy": "2.2.0",
"rimraf": "6.0.1",
"stoppable": "1.1.0",
"tap": "21.0.1",
Expand Down
8 changes: 2 additions & 6 deletions test/acceptance/proxy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ test('http basic authentication', async t => {
res.end(JSON.stringify({ hello: 'world' }))
})

proxy.authenticate = function (req, fn): void {
fn(null, req.headers['proxy-authorization'] === `Basic ${Buffer.from('hello:world').toString('base64')}`)
}
proxy.authenticate = (req) => req.headers['proxy-authorization'] === `Basic ${Buffer.from('hello:world').toString('base64')}`

const client = new TestClient({
node: `http://${(server.address() as AddressInfo).address}:${(server.address() as AddressInfo).port}`,
Expand All @@ -158,9 +156,7 @@ test('https basic authentication', async t => {
res.end(JSON.stringify({ hello: 'world' }))
})

proxy.authenticate = function (req, fn): void {
fn(null, req.headers['proxy-authorization'] === `Basic ${Buffer.from('hello:world').toString('base64')}`)
}
proxy.authenticate = (req) => req.headers['proxy-authorization'] === `Basic ${Buffer.from('hello:world').toString('base64')}`

const client = new TestClient({
node: `https://${(server.address() as AddressInfo).address}:${(server.address() as AddressInfo).port}`,
Expand Down
2 changes: 1 addition & 1 deletion test/utils/buildProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

// @ts-ignore
import proxy from 'proxy'
import { createProxy as proxy } from 'proxy'
import { readFileSync } from 'fs'
import { join } from 'path'
import * as http from 'http'
Expand Down

0 comments on commit 9a51bff

Please sign in to comment.