Skip to content

Commit bb1e85c

Browse files
authored
Merge pull request #6061 from Shopify/07-03-replace_http-proxy_with_http-proxy-node16
replace http-proxy with http-proxy-node16
2 parents eba5c36 + 857b74d commit bb1e85c

File tree

3 files changed

+13
-24
lines changed

3 files changed

+13
-24
lines changed

packages/app/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"express": "4.21.2",
6969
"graphql-request": "6.1.0",
7070
"h3": "0.7.21",
71-
"http-proxy": "1.18.1",
71+
"http-proxy-node16": "^1.0.6",
7272
"ignore": "6.0.2",
7373
"proper-lockfile": "4.1.2",
7474
"react": "^18.2.0",
@@ -80,7 +80,6 @@
8080
"@types/body-parser": "^1.19.2",
8181
"@types/diff": "^5.0.3",
8282
"@types/express": "^4.17.17",
83-
"@types/http-proxy": "^1.17.11",
8483
"@types/proper-lockfile": "4.1.4",
8584
"@types/react": "18.2.0",
8685
"@types/react-dom": "18.2.0",

packages/app/src/cli/utilities/app/http-reverse-proxy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import {AbortController} from '@shopify/cli-kit/node/abort'
22
import {outputDebug, outputContent, outputToken, outputWarn} from '@shopify/cli-kit/node/output'
3-
import Server from 'http-proxy'
43
import {useConcurrentOutputContext} from '@shopify/cli-kit/node/ui/components'
54
import * as http from 'http'
65
import * as https from 'https'
76
import {Writable} from 'stream'
7+
import type Server from 'http-proxy-node16'
88

99
export interface LocalhostCert {
1010
key: string
@@ -20,8 +20,8 @@ export async function getProxyingWebServer(
2020
) {
2121
// Lazy-importing it because it's CJS and we don't want it
2222
// to block the loading of the ESM module graph.
23-
const {default: httpProxy} = await import('http-proxy')
24-
const proxy = httpProxy.createProxy()
23+
const httpProxy = await import('http-proxy-node16')
24+
const proxy = httpProxy.default.createProxyServer()
2525

2626
const requestListener = getProxyServerRequestListener(rules, proxy, stdout)
2727

pnpm-lock.yaml

Lines changed: 9 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)