Skip to content

Commit 2285132

Browse files
committed
Remove portfinder.
1 parent 30e7722 commit 2285132

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

packages/remix/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@
3939
"devDependencies": {
4040
"@remix-run/node": "^1.4.3",
4141
"@remix-run/react": "^1.4.3",
42-
"@types/express": "^4.17.14",
43-
"portfinder": "^1.0.28"
42+
"@types/express": "^4.17.14"
4443
},
4544
"peerDependencies": {
4645
"@remix-run/node": "1.x",
@@ -69,7 +68,7 @@
6968
"lint:prettier": "prettier --check \"{src,test,scripts}/**/**.ts\"",
7069
"test": "yarn test:unit",
7170
"test:integration": "run-s test:integration:v1 test:integration:v2",
72-
"test:integration:v1": "run-s test:integration:clean test:integration:prepare test:integration:client test:integration:server",
71+
"test:integration:v1": "run-s test:integration:prepare test:integration:client test:integration:server",
7372
"test:integration:v2": "export REMIX_VERSION=2 && run-s test:integration:v1",
7473
"test:integration:ci": "run-s test:integration:clean test:integration:prepare test:integration:client:ci test:integration:server",
7574
"test:integration:prepare": "(cd test/integration && yarn)",

packages/remix/test/integration/test/server/action.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe.each(['builtin', 'express'])('Remix API Actions with adapter = %s', ada
3838
cookies: expect.any(Object),
3939
headers: {
4040
'user-agent': expect.any(String),
41-
host: 'localhost:8000',
41+
host: expect.stringContaining('localhost:'),
4242
},
4343
},
4444
});
@@ -114,7 +114,7 @@ describe.each(['builtin', 'express'])('Remix API Actions with adapter = %s', ada
114114
cookies: expect.any(Object),
115115
headers: {
116116
'user-agent': expect.any(String),
117-
host: 'localhost:8000',
117+
host: expect.stringContaining('localhost:'),
118118
},
119119
},
120120
});
@@ -134,7 +134,7 @@ describe.each(['builtin', 'express'])('Remix API Actions with adapter = %s', ada
134134
cookies: expect.any(Object),
135135
headers: {
136136
'user-agent': expect.any(String),
137-
host: 'localhost:8000',
137+
host: expect.stringContaining('localhost:'),
138138
},
139139
},
140140
});

packages/remix/test/integration/test/server/utils/helpers.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import express from 'express';
22
import { createRequestHandler } from '@remix-run/express';
3-
import { getPort, getPortPromise } from 'portfinder';
43
import { wrapExpressCreateRequestHandler } from '@sentry/remix';
54
import { TestEnv } from '../../../../../../node-integration-tests/utils';
65
import * as http from 'http';
6+
import { AddressInfo } from 'net';
77

88
export * from '../../../../../../node-integration-tests/utils';
99

@@ -22,11 +22,9 @@ export class RemixTestEnv extends TestEnv {
2222

2323
app.all('*', requestHandlerFactory({ build: require('../../../build') }));
2424

25-
getPort((_, port) => {
26-
serverPort = port;
27-
const server = app.listen(port, () => {
28-
resolve(server);
29-
});
25+
const server = app.listen(0, () => {
26+
serverPort = (server.address() as AddressInfo).port;
27+
resolve(server);
3028
});
3129
});
3230

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21328,7 +21328,7 @@ [email protected], pnp-webpack-plugin@^1.6.4:
2132821328
dependencies:
2132921329
ts-pnp "^1.1.6"
2133021330

21331-
portfinder@^1.0.26, portfinder@^1.0.28, portfinder@^1.0.29:
21331+
portfinder@^1.0.26, portfinder@^1.0.29:
2133221332
version "1.0.32"
2133321333
resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.32.tgz#2fe1b9e58389712429dc2bea5beb2146146c7f81"
2133421334
integrity sha512-on2ZJVVDXRADWE6jnQaX0ioEylzgBpQk8r55NE4wjXW1ZxO+BgDlY6DXwj20i0V8eB4SenDQ00WEaxfiIQPcxg==

0 commit comments

Comments
 (0)