Sha256: 184d3aaa2b303d33747ad3fa4fd5cb7e4b39d2c233c442a5af7a03d76fc0b8c2

Contents?: true

Size: 1.01 KB

Versions: 4

Compression:

Stored size: 1.01 KB

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getInclusionReasons = getInclusionReasons;

var _pretty = require("./pretty");

var _utils = require("./utils");

const semver = require("semver");

function getInclusionReasons(item, targetVersions, list) {
  const minVersions = list[item] || {};
  return Object.keys(targetVersions).reduce((result, env) => {
    const minVersion = (0, _utils.getLowestImplementedVersion)(minVersions, env);
    const targetVersion = targetVersions[env];

    if (!minVersion) {
      result[env] = (0, _pretty.prettifyVersion)(targetVersion);
    } else {
      const minIsUnreleased = (0, _utils.isUnreleasedVersion)(minVersion, env);
      const targetIsUnreleased = (0, _utils.isUnreleasedVersion)(targetVersion, env);

      if (!targetIsUnreleased && (minIsUnreleased || semver.lt(targetVersion.toString(), (0, _utils.semverify)(minVersion)))) {
        result[env] = (0, _pretty.prettifyVersion)(targetVersion);
      }
    }

    return result;
  }, {});
}

Version data entries

4 entries across 3 versions & 2 rubygems

Version Path
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/@babel/helper-compilation-targets/lib/debug.js
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/@babel/helper-compilation-targets/lib/debug.js
ruby2js-4.0.4 lib/tasks/testrails/node_modules/@babel/helper-compilation-targets/lib/debug.js
ruby2js-4.0.3 lib/tasks/testrails/node_modules/@babel/helper-compilation-targets/lib/debug.js