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

Windows 11 support for getCurrentConnections (fix parsing) #177

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

juanmartin
Copy link

Description

Windows 11 has two more fields in netsh wlan show interfaces: Interface Type (ifaceType) and Band (band). This made the parsing break so .getCurrentConnections() would return its values on the wrong keys for the resulting object.

Also made a few quick typo corrections.

Motivation and Context

See #176

Usage examples

Use .getCurrentConnections() in Windows 11.

How Has This Been Tested?

I tested getting the current connections and the object would now make sense.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactorization (non-functional change which improve code readibility)

const winMajor = os.release().split('.')[0];
const winMinor = os.release().split('.')[1];
const winBuild = os.release().split('.')[2];
return winMajor >= 10 && winMinor >= 0 && winBuild >= 22000;

Choose a reason for hiding this comment

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

Shouldn't this be winMajor >= 11? It still works because there is also the winBuild restriction though.

Choose a reason for hiding this comment

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

Answering my own question: no, winMajor is still 10 in windows 11:

https://stackoverflow.com/a/76873811

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants