windows-release
Advanced tools
Comparing version 5.0.1 to 5.1.0
@@ -36,3 +36,3 @@ import os from 'node:os'; | ||
// If `wmic` is obsolete (later versions of Windows 10), use PowerShell instead. | ||
// If the resulting caption contains the year 2008, 2012, 2016 or 2019, it is a server version, so return a server OS name. | ||
// If the resulting caption contains the year 2008, 2012, 2016, 2019 or 2022, it is a server version, so return a server OS name. | ||
if ((!release || release === os.release()) && ['6.1', '6.2', '6.3', '10.0'].includes(ver)) { | ||
@@ -46,3 +46,3 @@ let stdout; | ||
const year = (stdout.match(/2008|2012|2016|2019/) || [])[0]; | ||
const year = (stdout.match(/2008|2012|2016|2019|2022/) || [])[0]; | ||
@@ -49,0 +49,0 @@ if (year) { |
{ | ||
"name": "windows-release", | ||
"version": "5.0.1", | ||
"version": "5.1.0", | ||
"description": "Get the name of a Windows version from the release number: `5.1.2600` → `XP`", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -7,5 +7,5 @@ # windows-release | ||
```sh | ||
npm install windows-release | ||
``` | ||
$ npm install windows-release | ||
``` | ||
@@ -49,13 +49,1 @@ ## Usage | ||
- [macos-release](https://github.com/sindresorhus/macos-release) - Get the name and version of a macOS release from the Darwin version | ||
--- | ||
<div align="center"> | ||
<b> | ||
<a href="https://tidelift.com/subscription/pkg/npm-windows-release?utm_source=npm-windows-release&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a> | ||
</b> | ||
<br> | ||
<sub> | ||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies. | ||
</sub> | ||
</div> |
5972
48