This commit is contained in:
David Kale
2020-09-08 13:25:36 -04:00
parent e4246d2b5b
commit 91fcbb0108
4227 changed files with 416837 additions and 457884 deletions

View File

@@ -2,7 +2,7 @@ declare const macosRelease: {
/**
Get the name and version of a macOS release from the Darwin version.
@param release - By default, the current operating system is used, but you can supply a custom [Darwin kernel version](http://en.wikipedia.org/wiki/Darwin_%28operating_system%29#Release_history), which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release).
@param release - By default, the current operating system is used, but you can supply a custom [Darwin kernel version](https://en.wikipedia.org/wiki/Darwin_%28operating_system%29#Release_history), which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release).
@example
```
@@ -23,12 +23,15 @@ declare const macosRelease: {
macosRelease('14.0.0');
//=> {name: 'Yosemite', version: '10.10'}
macosRelease('20.0.0');
//=> {name: 'Big Sur', version: '11'}
```
*/
(release?: string): string;
(release?: string): {name: string, version: string};
// TODO: remove this in the next major version, refactor the whole definition to:
// declare function macosRelease(release?: string): string;
// declare function macosRelease(release?: string): {name: string, version: string};
// export = macosRelease;
default: typeof macosRelease;
};

38
node_modules/macos-release/index.js generated vendored
View File

@@ -2,28 +2,32 @@
const os = require('os');
const nameMap = new Map([
[19, 'Catalina'],
[18, 'Mojave'],
[17, 'High Sierra'],
[16, 'Sierra'],
[15, 'El Capitan'],
[14, 'Yosemite'],
[13, 'Mavericks'],
[12, 'Mountain Lion'],
[11, 'Lion'],
[10, 'Snow Leopard'],
[9, 'Leopard'],
[8, 'Tiger'],
[7, 'Panther'],
[6, 'Jaguar'],
[5, 'Puma']
[20, ['Big Sur', '11']],
[19, ['Catalina', '10.15']],
[18, ['Mojave', '10.14']],
[17, ['High Sierra', '10.13']],
[16, ['Sierra', '10.12']],
[15, ['El Capitan', '10.11']],
[14, ['Yosemite', '10.10']],
[13, ['Mavericks', '10.9']],
[12, ['Mountain Lion', '10.8']],
[11, ['Lion', '10.7']],
[10, ['Snow Leopard', '10.6']],
[9, ['Leopard', '10.5']],
[8, ['Tiger', '10.4']],
[7, ['Panther', '10.3']],
[6, ['Jaguar', '10.2']],
[5, ['Puma', '10.1']]
]);
const macosRelease = release => {
release = Number((release || os.release()).split('.')[0]);
const [name, version] = nameMap.get(release);
return {
name: nameMap.get(release),
version: '10.' + (release - 4)
name,
version
};
};

2
node_modules/macos-release/license generated vendored
View File

@@ -1,6 +1,6 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@@ -1,40 +1,37 @@
{
"_args": [
[
"macos-release@2.3.0",
"C:\\Users\\damccorm\\Documents\\labeler"
]
],
"_from": "macos-release@2.3.0",
"_id": "macos-release@2.3.0",
"_from": "macos-release@^2.2.0",
"_id": "macos-release@2.4.1",
"_inBundle": false,
"_integrity": "sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA==",
"_integrity": "sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg==",
"_location": "/macos-release",
"_phantomChildren": {},
"_requested": {
"type": "version",
"type": "range",
"registry": true,
"raw": "macos-release@2.3.0",
"raw": "macos-release@^2.2.0",
"name": "macos-release",
"escapedName": "macos-release",
"rawSpec": "2.3.0",
"rawSpec": "^2.2.0",
"saveSpec": null,
"fetchSpec": "2.3.0"
"fetchSpec": "^2.2.0"
},
"_requiredBy": [
"/os-name"
],
"_resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz",
"_spec": "2.3.0",
"_where": "C:\\Users\\damccorm\\Documents\\labeler",
"_resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.4.1.tgz",
"_shasum": "64033d0ec6a5e6375155a74b1a1eba8e509820ac",
"_spec": "macos-release@^2.2.0",
"_where": "/Users/dakale/dev/GitHub/actions/labeler/node_modules/os-name",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/macos-release/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Get the name and version of a macOS release from the Darwin version",
"devDependencies": {
"ava": "^1.4.1",
@@ -48,6 +45,7 @@
"index.js",
"index.d.ts"
],
"funding": "https://github.com/sponsors/sindresorhus",
"homepage": "https://github.com/sindresorhus/macos-release#readme",
"keywords": [
"macos",
@@ -70,5 +68,5 @@
"scripts": {
"test": "xo && ava && tsd"
},
"version": "2.3.0"
"version": "2.4.1"
}

28
node_modules/macos-release/readme.md generated vendored
View File

@@ -1,16 +1,14 @@
# macos-release [![Build Status](https://travis-ci.org/sindresorhus/macos-release.svg?branch=master)](https://travis-ci.org/sindresorhus/macos-release)
# macos-release [![Build Status](https://travis-ci.com/sindresorhus/macos-release.svg?branch=master)](https://travis-ci.com/github/sindresorhus/macos-release)
> Get the name and version of a macOS release from the Darwin version<br>
> Get the name and version of a macOS release from the Darwin version\
> Example: `13.2.0` → `{name: 'Mavericks', version: '10.9'}`
## Install
```
$ npm install macos-release
```
## Usage
```js
@@ -31,19 +29,20 @@ macosRelease(os.release());
macosRelease('14.0.0');
//=> {name: 'Yosemite', version: '10.10'}
```
macosRelease('20.0.0');
//=> {name: 'Big Sur', version: '11'}
```
## API
### macosRelease([release])
### macosRelease(release?)
#### release
Type: `string`
By default, the current operating system is used, but you can supply a custom [Darwin kernel version](http://en.wikipedia.org/wiki/Darwin_%28operating_system%29#Release_history), which is the output of [`os.release()`](http://nodejs.org/api/os.html#os_os_release).
By default, the current operating system is used, but you can supply a custom [Darwin kernel version](https://en.wikipedia.org/wiki/Darwin_%28operating_system%29#Release_history), which is the output of [`os.release()`](https://nodejs.org/api/os.html#os_os_release).
## Related
@@ -51,7 +50,14 @@ By default, the current operating system is used, but you can supply a custom [D
- [macos-version](https://github.com/sindresorhus/macos-version) - Get the macOS version of the current system. Example: `10.9.3`
- [win-release](https://github.com/sindresorhus/win-release) - Get the name of a Windows version from the release number: `5.1.2600``XP`
---
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-macos-release?utm_source=npm-macos-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>