source: imaps-frontend/node_modules/@babel/helper-compilation-targets/lib/debug.js@ d565449

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
RevLine 
[d565449]1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.getInclusionReasons = getInclusionReasons;
7var _semver = require("semver");
8var _pretty = require("./pretty.js");
9var _utils = require("./utils.js");
10function 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.