apple-version-history 1.6.36 → 1.6.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core.js +7 -8
- package/index.js +25 -25
- package/package.json +1 -1
- package/util.js +5 -6
- package/watchos-version-history.js +1 -1
package/core.js
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.listVersions = listVersions;
|
|
4
|
+
exports.flatlistVersionNumbers = flatlistVersionNumbers;
|
|
5
|
+
exports.listVersionNumbers = listVersionNumbers;
|
|
6
|
+
exports.flatlistVersionBuilds = flatlistVersionBuilds;
|
|
7
|
+
exports.listVersionBuilds = listVersionBuilds;
|
|
8
|
+
exports.listBuilds = listBuilds;
|
|
9
|
+
exports.flatlistBuilds = flatlistBuilds;
|
|
4
10
|
const util_1 = require("./util");
|
|
5
11
|
const defaultSeparator = ' ';
|
|
6
12
|
function listVersions(os) {
|
|
7
13
|
const json = (0, util_1.pickJson)(os);
|
|
8
14
|
return Object.keys(json);
|
|
9
15
|
}
|
|
10
|
-
exports.listVersions = listVersions;
|
|
11
16
|
function flatlistVersionNumbers(os, separator = defaultSeparator) {
|
|
12
17
|
return [].concat(...listVersionNumbers(os, separator));
|
|
13
18
|
}
|
|
14
|
-
exports.flatlistVersionNumbers = flatlistVersionNumbers;
|
|
15
19
|
function listVersionNumbers(os, separator = defaultSeparator) {
|
|
16
20
|
const json = (0, util_1.pickJson)(os);
|
|
17
21
|
const numbersByVersionName = Object.keys(json).map(versionNameKey => {
|
|
@@ -21,11 +25,9 @@ function listVersionNumbers(os, separator = defaultSeparator) {
|
|
|
21
25
|
});
|
|
22
26
|
return numbersByVersionName;
|
|
23
27
|
}
|
|
24
|
-
exports.listVersionNumbers = listVersionNumbers;
|
|
25
28
|
function flatlistVersionBuilds(os, separator = defaultSeparator) {
|
|
26
29
|
return [].concat(...listVersionBuilds(os, separator));
|
|
27
30
|
}
|
|
28
|
-
exports.flatlistVersionBuilds = flatlistVersionBuilds;
|
|
29
31
|
function listVersionBuilds(os, separator = defaultSeparator) {
|
|
30
32
|
const json = (0, util_1.pickJson)(os);
|
|
31
33
|
const buildsByVersionName = Object.keys(json).map(versionNameKey => {
|
|
@@ -39,15 +41,12 @@ function listVersionBuilds(os, separator = defaultSeparator) {
|
|
|
39
41
|
});
|
|
40
42
|
return buildsByVersionName;
|
|
41
43
|
}
|
|
42
|
-
exports.listVersionBuilds = listVersionBuilds;
|
|
43
44
|
function listBuilds(os) {
|
|
44
45
|
const json = (0, util_1.pickJson)(os);
|
|
45
46
|
return Object.keys(json)
|
|
46
47
|
.map(versionName => Object.keys(json[versionName])
|
|
47
48
|
.flatMap(versionNumber => json[versionName][versionNumber]));
|
|
48
49
|
}
|
|
49
|
-
exports.listBuilds = listBuilds;
|
|
50
50
|
function flatlistBuilds(os) {
|
|
51
51
|
return [].concat(...listBuilds(os));
|
|
52
52
|
}
|
|
53
|
-
exports.flatlistBuilds = flatlistBuilds;
|
package/index.js
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.tvosVersionHistory = exports.macosVersionHistory = exports.iosVersionHistory = exports.flatlistBuilds = exports.listBuilds = exports.flatlistVersionBuilds = exports.flatlistVersionNumbers = exports.listVersionBuilds = exports.listVersionNumbers = exports.listVersions = void 0;
|
|
4
|
+
exports.listIosVersions = listIosVersions;
|
|
5
|
+
exports.listMacosVersions = listMacosVersions;
|
|
6
|
+
exports.listTvosVersions = listTvosVersions;
|
|
7
|
+
exports.flatlistIosVersions = flatlistIosVersions;
|
|
8
|
+
exports.flatlistMacosVersions = flatlistMacosVersions;
|
|
9
|
+
exports.flatlistTvosVersions = flatlistTvosVersions;
|
|
10
|
+
exports.listIosVersionsNumbers = listIosVersionsNumbers;
|
|
11
|
+
exports.listMacosVersionsNumbers = listMacosVersionsNumbers;
|
|
12
|
+
exports.listTvosVersionsNumbers = listTvosVersionsNumbers;
|
|
13
|
+
exports.flatlistIosVersionsNumbers = flatlistIosVersionsNumbers;
|
|
14
|
+
exports.flatlistMacosVersionsNumbers = flatlistMacosVersionsNumbers;
|
|
15
|
+
exports.flatlistTvosVersionsNumbers = flatlistTvosVersionsNumbers;
|
|
16
|
+
exports.listIosVersionsBuilds = listIosVersionsBuilds;
|
|
17
|
+
exports.listMacosVersionsBuilds = listMacosVersionsBuilds;
|
|
18
|
+
exports.listTvosVersionsBuilds = listTvosVersionsBuilds;
|
|
19
|
+
exports.flatlistIosVersionsBuilds = flatlistIosVersionsBuilds;
|
|
20
|
+
exports.flatlistMacosVersionsBuilds = flatlistMacosVersionsBuilds;
|
|
21
|
+
exports.flatlistTvosVersionsBuilds = flatlistTvosVersionsBuilds;
|
|
22
|
+
exports.listIosBuilds = listIosBuilds;
|
|
23
|
+
exports.listMacosBuilds = listMacosBuilds;
|
|
24
|
+
exports.listTvosBuilds = listTvosBuilds;
|
|
25
|
+
exports.flatlistIosBuilds = flatlistIosBuilds;
|
|
26
|
+
exports.flatlistMacosBuilds = flatlistMacosBuilds;
|
|
27
|
+
exports.flatlistTvosBuilds = flatlistTvosBuilds;
|
|
4
28
|
const core_1 = require("./core");
|
|
5
29
|
Object.defineProperty(exports, "listVersions", { enumerable: true, get: function () { return core_1.listVersions; } });
|
|
6
30
|
Object.defineProperty(exports, "listVersionNumbers", { enumerable: true, get: function () { return core_1.listVersionNumbers; } });
|
|
@@ -18,56 +42,32 @@ var tvos_version_history_1 = require("./tvos-version-history");
|
|
|
18
42
|
Object.defineProperty(exports, "tvosVersionHistory", { enumerable: true, get: function () { return tvos_version_history_1.default; } });
|
|
19
43
|
// listVersions
|
|
20
44
|
function listIosVersions() { return (0, core_1.listVersions)('ios'); }
|
|
21
|
-
exports.listIosVersions = listIosVersions;
|
|
22
45
|
function listMacosVersions() { return (0, core_1.listVersions)('macos'); }
|
|
23
|
-
exports.listMacosVersions = listMacosVersions;
|
|
24
46
|
function listTvosVersions() { return (0, core_1.listVersions)('tvos'); }
|
|
25
|
-
exports.listTvosVersions = listTvosVersions;
|
|
26
47
|
function flatlistIosVersions() { return (0, core_1.listVersions)('ios'); }
|
|
27
|
-
exports.flatlistIosVersions = flatlistIosVersions;
|
|
28
48
|
function flatlistMacosVersions() { return (0, core_1.listVersions)('macos'); }
|
|
29
|
-
exports.flatlistMacosVersions = flatlistMacosVersions;
|
|
30
49
|
function flatlistTvosVersions() { return (0, core_1.listVersions)('tvos'); }
|
|
31
|
-
exports.flatlistTvosVersions = flatlistTvosVersions;
|
|
32
50
|
// listVersionNumbers
|
|
33
51
|
function listIosVersionsNumbers() { return (0, core_1.listVersionNumbers)('ios'); }
|
|
34
|
-
exports.listIosVersionsNumbers = listIosVersionsNumbers;
|
|
35
52
|
function listMacosVersionsNumbers() { return (0, core_1.listVersionNumbers)('macos'); }
|
|
36
|
-
exports.listMacosVersionsNumbers = listMacosVersionsNumbers;
|
|
37
53
|
function listTvosVersionsNumbers() { return (0, core_1.listVersionNumbers)('tvos'); }
|
|
38
|
-
exports.listTvosVersionsNumbers = listTvosVersionsNumbers;
|
|
39
54
|
// flatlistVersionNumbers
|
|
40
55
|
function flatlistIosVersionsNumbers() { return (0, core_1.flatlistVersionNumbers)('ios'); }
|
|
41
|
-
exports.flatlistIosVersionsNumbers = flatlistIosVersionsNumbers;
|
|
42
56
|
function flatlistMacosVersionsNumbers() { return (0, core_1.flatlistVersionNumbers)('macos'); }
|
|
43
|
-
exports.flatlistMacosVersionsNumbers = flatlistMacosVersionsNumbers;
|
|
44
57
|
function flatlistTvosVersionsNumbers() { return (0, core_1.flatlistVersionNumbers)('tvos'); }
|
|
45
|
-
exports.flatlistTvosVersionsNumbers = flatlistTvosVersionsNumbers;
|
|
46
58
|
// listVersionBuilds
|
|
47
59
|
function listIosVersionsBuilds() { return (0, core_1.listVersionBuilds)('ios'); }
|
|
48
|
-
exports.listIosVersionsBuilds = listIosVersionsBuilds;
|
|
49
60
|
function listMacosVersionsBuilds() { return (0, core_1.listVersionBuilds)('macos'); }
|
|
50
|
-
exports.listMacosVersionsBuilds = listMacosVersionsBuilds;
|
|
51
61
|
function listTvosVersionsBuilds() { return (0, core_1.listVersionBuilds)('tvos'); }
|
|
52
|
-
exports.listTvosVersionsBuilds = listTvosVersionsBuilds;
|
|
53
62
|
// flatlistVersionBuilds
|
|
54
63
|
function flatlistIosVersionsBuilds() { return (0, core_1.flatlistVersionBuilds)('ios'); }
|
|
55
|
-
exports.flatlistIosVersionsBuilds = flatlistIosVersionsBuilds;
|
|
56
64
|
function flatlistMacosVersionsBuilds() { return (0, core_1.flatlistVersionBuilds)('macos'); }
|
|
57
|
-
exports.flatlistMacosVersionsBuilds = flatlistMacosVersionsBuilds;
|
|
58
65
|
function flatlistTvosVersionsBuilds() { return (0, core_1.flatlistVersionBuilds)('tvos'); }
|
|
59
|
-
exports.flatlistTvosVersionsBuilds = flatlistTvosVersionsBuilds;
|
|
60
66
|
// listBuilds
|
|
61
67
|
function listIosBuilds() { return (0, core_1.listBuilds)('ios'); }
|
|
62
|
-
exports.listIosBuilds = listIosBuilds;
|
|
63
68
|
function listMacosBuilds() { return (0, core_1.listBuilds)('macos'); }
|
|
64
|
-
exports.listMacosBuilds = listMacosBuilds;
|
|
65
69
|
function listTvosBuilds() { return (0, core_1.listBuilds)('tvos'); }
|
|
66
|
-
exports.listTvosBuilds = listTvosBuilds;
|
|
67
70
|
// flatlistBuilds
|
|
68
71
|
function flatlistIosBuilds() { return (0, core_1.flatlistBuilds)('ios'); }
|
|
69
|
-
exports.flatlistIosBuilds = flatlistIosBuilds;
|
|
70
72
|
function flatlistMacosBuilds() { return (0, core_1.flatlistBuilds)('macos'); }
|
|
71
|
-
exports.flatlistMacosBuilds = flatlistMacosBuilds;
|
|
72
73
|
function flatlistTvosBuilds() { return (0, core_1.flatlistBuilds)('tvos'); }
|
|
73
|
-
exports.flatlistTvosBuilds = flatlistTvosBuilds;
|
package/package.json
CHANGED
package/util.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.pickJson = pickJson;
|
|
4
|
+
exports.versionNameWithoutSuffix = versionNameWithoutSuffix;
|
|
5
|
+
exports.versionNumberWithoutPatch = versionNumberWithoutPatch;
|
|
6
|
+
exports.addMinorZero = addMinorZero;
|
|
7
|
+
exports.hasPatch = hasPatch;
|
|
4
8
|
const ios_version_history_1 = require("./ios-version-history");
|
|
5
9
|
const macos_version_history_1 = require("./macos-version-history");
|
|
6
10
|
const tvos_version_history_1 = require("./tvos-version-history");
|
|
@@ -19,7 +23,6 @@ function pickJson(os) {
|
|
|
19
23
|
throw `Unexpected os value: ${os}`;
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
|
-
exports.pickJson = pickJson;
|
|
23
26
|
/**
|
|
24
27
|
* Removes "1.0.x" part from "iPhone OS 1.0.x".
|
|
25
28
|
*/
|
|
@@ -27,14 +30,12 @@ function versionNameWithoutSuffix(versionName) {
|
|
|
27
30
|
const split = versionName.split(' ');
|
|
28
31
|
return split.slice(0, split.length - 1).join(' ');
|
|
29
32
|
}
|
|
30
|
-
exports.versionNameWithoutSuffix = versionNameWithoutSuffix;
|
|
31
33
|
/**
|
|
32
34
|
* Removes ".2" part from "1.0.2".
|
|
33
35
|
*/
|
|
34
36
|
function versionNumberWithoutPatch(versionNumber) {
|
|
35
37
|
return versionNumber.split('.').slice(0, 2).join('.');
|
|
36
38
|
}
|
|
37
|
-
exports.versionNumberWithoutPatch = versionNumberWithoutPatch;
|
|
38
39
|
/**
|
|
39
40
|
* Adds minor ".0" part if it's missing.
|
|
40
41
|
* e.g. `15` becomes `15.0`.
|
|
@@ -42,7 +43,6 @@ exports.versionNumberWithoutPatch = versionNumberWithoutPatch;
|
|
|
42
43
|
function addMinorZero(version) {
|
|
43
44
|
return version.includes('.') ? version : `${version}.0`;
|
|
44
45
|
}
|
|
45
|
-
exports.addMinorZero = addMinorZero;
|
|
46
46
|
/**
|
|
47
47
|
* Checks whether the version-number has patch part or not.
|
|
48
48
|
* e.g. `10.0.1` has patch, and `10.0` has not.
|
|
@@ -50,4 +50,3 @@ exports.addMinorZero = addMinorZero;
|
|
|
50
50
|
function hasPatch(versionNumber) {
|
|
51
51
|
return /^\d+\.\d+\.\d+$/.test(versionNumber);
|
|
52
52
|
}
|
|
53
|
-
exports.hasPatch = hasPatch;
|