UNPKG

bit-bin

Version:

<a href="https://opensource.org/licenses/Apache-2.0"><img alt="apache" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a> <a href="https://github.com/teambit/bit/blob/master/CONTRIBUTING.md"><img alt="prs" src="https://img.shields.io/b

43 lines (32 loc) 926 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; function _bluebird() { const data = require("bluebird"); _bluebird = function () { return data; }; return data; } function _scope() { const data = require("../../../scope"); _scope = function () { return data; }; return data; } var _default = /*#__PURE__*/function () { var _latestVersions = (0, _bluebird().coroutine)(function* (path, componentIdsStr) { const scope = yield (0, _scope().loadScope)(path); const bitIds = yield Promise.all(componentIdsStr.map(id => scope.getParsedId(id))); const componentsIds = yield scope.latestVersions(bitIds); return componentsIds.map(componentId => componentId.toString()); }); function latestVersions(_x, _x2) { return _latestVersions.apply(this, arguments); } return latestVersions; }(); exports.default = _default;