MCPcopy Create free account
hub / github.com/play-co/devkit / resolveRequestedModuleVersion

Function resolveRequestedModuleVersion

src/install/index.js:49–63  ·  view source on GitHub ↗

* Figure out which version the user wishes to be installed.

(app, moduleName, version, opts)

Source from the content-addressed store, hash-verified

47 */
48
49function resolveRequestedModuleVersion (app, moduleName, version, opts) {
50 if (opts.latest || version === 'latest') {
51 opts.latest = true;
52 return void 0;
53 } else if (!version) {
54 // Not latest and no version provided, look up in manifest
55 var dep = app.getDependency(moduleName);
56 if (dep) {
57 return dep.version;
58 }
59 } else {
60 // The version was explicitly requested
61 return version;
62 }
63}
64
65exports.installModule = function (app, moduleName, opts, cb) {
66 if (!opts) { opts = {}; }

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…