-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: ipv4 detection on node 18 #34203
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
packages/playwright-core/src/utils/httpServer.ts:131
- [nitpick] The variable name isIPV4 should be renamed to isIPv4 for consistency and clarity.
const isIPV4 = address.family === 'IPv4' || (address.family as any) === 4;
@@ -128,7 +128,8 @@ export class HttpServer { | |||
this._urlPrefixHumanReadable = address; | |||
} else { | |||
this._port = address.port; | |||
const resolvedHost = address.family === 'IPv4' ? address.address : `[${address.address}]`; | |||
const isIPV4 = address.family === 'IPv4' || (address.family as any) === 4; // Node 18.0.0 returns number, >18.4.0 returns string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we support 18.0.0. We support only the latest 18.X, 20.X, 22.X release.
I recommend the user instead update his Node.js since he misses important security updates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know! I can't find us stating that anywhere in the docs, let's change that.
Test results for "tests 1"3 failed 8 flaky37506 passed, 653 skipped Merge workflow run. |
Closes #34187