src/plugman/fetch.js
function checkID(expectedIdAndVersion, pinfo) {
    if (!expectedIdAndVersion) return;
    var parsedSpec = pluginSpec.parse(expectedIdAndVersion);
    if (parsedSpec.id != pinfo.id) {
        var alias = parsedSpec.scope ? null : pluginMappernto[parsedSpec.id] || pluginMapperotn[parsedSpec.id];
        if (alias !== pinfo.id) {
            throw new Error('Expected plugin to have ID "' + parsedSpec.id + '" but got "' + pinfo.id + '".');
        }
    }
    if (parsedSpec.version && !semver.satisfies(pinfo.version, parsedSpec.version)) {
        throw new Error('Expected plugin ' + pinfo.id + ' to satisfy version "' + parsedSpec.version + '" but got "' + pinfo.version + '".');
    }
}
function checkID(expectedIdAndVersion, pinfo) {
    if (!expectedIdAndVersion) return;
    var parsedSpec = pluginSpec.parse(expectedIdAndVersion);
    if (parsedSpec.id != pinfo.id) {
        var alias = parsedSpec.scope ? null : pluginMappernto[parsedSpec.id] || pluginMapperotn[parsedSpec.id];
        if (alias !== pinfo.id) {
            throw new Error('Expected plugin to have ID "' + parsedSpec.id + '" but got "' + pinfo.id + '".');
        }
    }
    if (parsedSpec.version && !semver.satisfies(pinfo.version, parsedSpec.version)) {
        throw new Error('Expected plugin ' + pinfo.id + ' to satisfy version "' + parsedSpec.version + '" but got "' + pinfo.version + '".');
    }
}
function checkID ( expectedIdAndVersion , pinfo ) { if ( ! expectedIdAndVersion ) return ; var parsedSpec = pluginSpec . parse ( expectedIdAndVersion ) ; if ( parsedSpec . id != pinfo . id ) { var alias = parsedSpec . scope ? null : pluginMappernto [ parsedSpec . id ] || pluginMapperotn [ parsedSpec . id ] ; if ( alias !== pinfo . id ) { throw new Error ( 'Expected plugin to have ID "' + parsedSpec . id + '" but got "' + pinfo . id + '".' ) ; } } if ( parsedSpec . version && ! semver . satisfies ( pinfo . version , parsedSpec . version ) ) { throw new Error ( 'Expected plugin ' + pinfo . id + ' to satisfy version "' + parsedSpec . version + '" but got "' + pinfo . version + '".' ) ; } }
Helper function for checking expected plugin IDs against reality.
Helper function for checking expected plugin IDs against reality .