main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.getInclusionReasons = getInclusionReasons;
|
---|
7 | var _semver = require("semver");
|
---|
8 | var _pretty = require("./pretty.js");
|
---|
9 | var _utils = require("./utils.js");
|
---|
10 | function getInclusionReasons(item, targetVersions, list) {
|
---|
11 | const minVersions = list[item] || {};
|
---|
12 | return Object.keys(targetVersions).reduce((result, env) => {
|
---|
13 | const minVersion = (0, _utils.getLowestImplementedVersion)(minVersions, env);
|
---|
14 | const targetVersion = targetVersions[env];
|
---|
15 | if (!minVersion) {
|
---|
16 | result[env] = (0, _pretty.prettifyVersion)(targetVersion);
|
---|
17 | } else {
|
---|
18 | const minIsUnreleased = (0, _utils.isUnreleasedVersion)(minVersion, env);
|
---|
19 | const targetIsUnreleased = (0, _utils.isUnreleasedVersion)(targetVersion, env);
|
---|
20 | if (!targetIsUnreleased && (minIsUnreleased || _semver.lt(targetVersion.toString(), (0, _utils.semverify)(minVersion)))) {
|
---|
21 | result[env] = (0, _pretty.prettifyVersion)(targetVersion);
|
---|
22 | }
|
---|
23 | }
|
---|
24 | return result;
|
---|
25 | }, {});
|
---|
26 | }
|
---|
27 |
|
---|
28 | //# sourceMappingURL=debug.js.map
|
---|
Note:
See
TracBrowser
for help on using the repository browser.