Skip to content
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 #945 - Node.js v18 os.networkInterfaces()[].family number/string comparison #947

Merged
merged 2 commits into from
Apr 27, 2022

Conversation

oznu
Copy link
Member

@oznu oznu commented Apr 26, 2022

♻️ Current situation

nodejs/node#42787
nodejs/node#41431 (comment)

💡 Proposed solution

It's worth doing this sooner rather than later. There may be other compatibility issues in Node.js 18 we won't find until this one is patched.

The use of @ts-expect-error should alert us to remove the exception when @types/node is updated to 18 (if they decide to keep backwards compatibility with old versions, which they may not, be we need to).

Alternatively we could do something like this, but I feel like it will result in the exception never being removed in the future:

(info.family === "IPv6" || (info.family as unknown as string) === 6)

⚙️ Release Notes

  • Fix an issue with network interface family detection when running Node.js 18

Testing

Tests are still failing on Node v18.0.0 - out of scope for this PR.

Reviewer Nudging

@Supereg

@oznu oznu requested a review from Supereg April 26, 2022 11:48
@github-actions github-actions bot added the fix label Apr 26, 2022
@coveralls
Copy link

coveralls commented Apr 26, 2022

Pull Request Test Coverage Report for Build 2227779606

  • 2 of 4 (50.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.008%) to 51.819%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/lib/util/eventedhttp.ts 0 2 0.0%
Files with Coverage Reduction New Missed Lines %
src/lib/util/eventedhttp.ts 1 22.02%
Totals Coverage Status
Change from base Build 2212935693: -0.008%
Covered Lines: 5712
Relevant Lines: 10069

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2226464995

  • 2 of 4 (50.0%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.08%) to 51.75%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/lib/util/eventedhttp.ts 0 2 0.0%
Files with Coverage Reduction New Missed Lines %
src/lib/util/eventedhttp.ts 1 22.02%
Totals Coverage Status
Change from base Build 2162410027: -0.08%
Covered Lines: 5709
Relevant Lines: 10068

💛 - Coveralls

@Supereg Supereg changed the base branch from master to beta-0.10.2 April 26, 2022 15:42
Copy link
Member

@Supereg Supereg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing this. 👍🏼

Proposing to include this in the upcoming 0.10.2 release. I adopted the base branch accordingly.

@oznu oznu merged commit 11287fc into beta-0.10.2 Apr 27, 2022
@oznu oznu deleted the fix/945 branch April 27, 2022 00:02
koush pushed a commit to koush/HAP-NodeJS that referenced this pull request Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants