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

Suggestion normalize all Platform #638

Closed
marler8997 opened this issue Sep 4, 2021 · 3 comments
Closed

Suggestion normalize all Platform #638

marler8997 opened this issue Sep 4, 2021 · 3 comments
Assignees
Labels
usability Touch-up to improve the user experience for a language projection

Comments

@marler8997
Copy link
Contributor

marler8997 commented Sep 4, 2021

Original Issue: marlersoft/win32json#1

I've copied this issue from user @Iygstate where they suggest that platform strings be normalized. From their suggestion, it seems that some of the platforms have inconsistent casing and whitespace. Here is their suggestion:

Copied Proposal (title "Suggestion normalize all Platform")

And also generate the detail kernel version number from Platform by reference to
https://en.wikipedia.org/wiki/Comparison_of_Microsoft_Windows_versions

The normlize typescript function

function normalizePlatform(platform: string | null) {
    if (platform === null) {
        return platform
    }
    platform = platform.toLowerCase()
    platform = platform.replace(/\s+/g, '');
    return platform
}
[
  {
    "Platform": "windows5.0",
    "Version": "5.0.2195"
  },
  {
    "Platform": "windows2000",
    "Version": "5.0.2195"
  },
  {
    "Platform": "windowsserver2000",
    "Version": "5.0.2195"
  },
  {
    "Platform": "windows5.1.2600",
    "Version": "5.1.2600"
  },
  {
    "Platform": "windowsserver2003",
    "Version": "5.2.3790"
  },
  {
    "Platform": "windows6.0.6000",
    "Version": "6.0.6000"
  },
  {
    "Platform": "windowsvista",
    "Version": "6.0.6000"
  },
  {
    "Platform": "windowsserver2008",
    "Version": "6.0.6000"
  },
  {
    "Platform": "windows6.1",
    "Version": "6.1.7600"
  },
  {
    "Platform": "windows8",
    "Version": "6.2.9200"
  },
  {
    "Platform": "windows8.0",
    "Version": "6.2.9200"
  },
  {
    "Platform": "windowsserver2012",
    "Version": "6.2.9200"
  },
  {
    "Platform": "windows8.1",
    "Version": "6.2.9600"
  },
  {
    "Platform": "windows10.0.10240",
    "Version": "10.0.10240"
  },
  {
    "Platform": "windows10.0.10586",
    "Version": "10.0.10586"
  },
  {
    "Platform": "windows10.0.14393",
    "Version": "10.0.14393"
  },
  {
    "Platform": "windowsserver2016",
    "Version": "10.0.14393"
  },
  {
    "Platform": "windows10.0.15063",
    "Version": "10.0.15063"
  },
  {
    "Platform": "windows10.0.16299",
    "Version": "10.0.16299"
  },
  {
    "Platform": "windows10.0.17134",
    "Version": "10.0.17134"
  },
  {
    "Platform": "windows10.0.17763",
    "Version": "10.0.17763"
  },
  {
    "Platform": "windows10.0.19041",
    "Version": "10.0.19041"
  }
]

@mikebattista
Copy link
Contributor

Spaces were already removed with #627. Normalized to lowercase.

@riverar
Copy link
Collaborator

riverar commented Mar 10, 2023

Note: None of the versioning data in metadata is really usable, needs to be gutted and redone.

@mikebattista
Copy link
Contributor

#738

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usability Touch-up to improve the user experience for a language projection
Projects
None yet
Development

No branches or pull requests

4 participants