function synchronizeEntry(id) {
        var entry = extensions[id];

        // Do nothing if we only have one set of data
        if (!entry || !entry.installInfo || !entry.registryInfo) {
            return;
        }

        entry.installInfo.owner = entry.registryInfo.owner;

        // Assume false
        entry.installInfo.updateAvailable   = false;
        entry.registryInfo.updateAvailable  = false;
        entry.installInfo.updateCompatible  = false;
        entry.registryInfo.updateCompatible = false;

        var currentVersion = entry.installInfo.metadata ? entry.installInfo.metadata.version : null;
        if (currentVersion && semver.lt(currentVersion, entry.registryInfo.metadata.version)) {
            // Note: available update may still be incompatible; we check for this when rendering the Update button in ExtensionManagerView._renderItem()
            entry.registryInfo.updateAvailable  = true;
            entry.installInfo.updateAvailable   = true;
            // Calculate updateCompatible to check if there's an update for current version of Brackets
            var lastCompatibleVersionInfo = _.findLast(entry.registryInfo.versions, function (versionInfo) {
                return !versionInfo.brackets || semver.satisfies(brackets.metadata.apiVersion, versionInfo.brackets);
            });
            if (lastCompatibleVersionInfo && lastCompatibleVersionInfo.version && semver.lt(currentVersion, lastCompatibleVersionInfo.version)) {
                entry.installInfo.updateCompatible        = true;
                entry.registryInfo.updateCompatible       = true;
                entry.installInfo.lastCompatibleVersion   = lastCompatibleVersionInfo.version;
                entry.registryInfo.lastCompatibleVersion  = lastCompatibleVersionInfo.version;
            }
        }

        exports.trigger("registryUpdate", id);
    }
function synchronizeEntry(id) {
        var entry = extensions[id];

        // Do nothing if we only have one set of data
        if (!entry || !entry.installInfo || !entry.registryInfo) {
            return;
        }

        entry.installInfo.owner = entry.registryInfo.owner;

        // Assume false
        entry.installInfo.updateAvailable   = false;
        entry.registryInfo.updateAvailable  = false;
        entry.installInfo.updateCompatible  = false;
        entry.registryInfo.updateCompatible = false;

        var currentVersion = entry.installInfo.metadata ? entry.installInfo.metadata.version : null;
        if (currentVersion && semver.lt(currentVersion, entry.registryInfo.metadata.version)) {
            // Note: available update may still be incompatible; we check for this when rendering the Update button in ExtensionManagerView._renderItem()
            entry.registryInfo.updateAvailable  = true;
            entry.installInfo.updateAvailable   = true;
            // Calculate updateCompatible to check if there's an update for current version of Brackets
            var lastCompatibleVersionInfo = _.findLast(entry.registryInfo.versions, function (versionInfo) {
                return !versionInfo.brackets || semver.satisfies(brackets.metadata.apiVersion, versionInfo.brackets);
            });
            if (lastCompatibleVersionInfo && lastCompatibleVersionInfo.version && semver.lt(currentVersion, lastCompatibleVersionInfo.version)) {
                entry.installInfo.updateCompatible        = true;
                entry.registryInfo.updateCompatible       = true;
                entry.installInfo.lastCompatibleVersion   = lastCompatibleVersionInfo.version;
                entry.registryInfo.lastCompatibleVersion  = lastCompatibleVersionInfo.version;
            }
        }

        exports.trigger("registryUpdate", id);
    }
function synchronizeEntry ( id ) { var entry = extensions [ id ] ; // Do nothing if we only have one set of data if ( ! entry || ! entry . installInfo || ! entry . registryInfo ) { return ; } entry . installInfo . owner = entry . registryInfo . owner ; // Assume false entry . installInfo . updateAvailable = false ; entry . registryInfo . updateAvailable = false ; entry . installInfo . updateCompatible = false ; entry . registryInfo . updateCompatible = false ; var currentVersion = entry . installInfo . metadata ? entry . installInfo . metadata . version : null ; if ( currentVersion && semver . lt ( currentVersion , entry . registryInfo . metadata . version ) ) { // Note: available update may still be incompatible; we check for this when rendering the Update button in ExtensionManagerView._renderItem() entry . registryInfo . updateAvailable = true ; entry . installInfo . updateAvailable = true ; // Calculate updateCompatible to check if there's an update for current version of Brackets var lastCompatibleVersionInfo = _ . findLast ( entry . registryInfo . versions , function ( versionInfo ) { return ! versionInfo . brackets || semver . satisfies ( brackets . metadata . apiVersion , versionInfo . brackets ) ; } ) ; if ( lastCompatibleVersionInfo && lastCompatibleVersionInfo . version && semver . lt ( currentVersion , lastCompatibleVersionInfo . version ) ) { entry . installInfo . updateCompatible = true ; entry . registryInfo . updateCompatible = true ; entry . installInfo . lastCompatibleVersion = lastCompatibleVersionInfo . version ; entry . registryInfo . lastCompatibleVersion = lastCompatibleVersionInfo . version ; } } exports . trigger ( "registryUpdate" , id ) ; }
@private
Synchronizes the information between the public registry and the installed
extensions. Specifically, this makes the `owner` available in each and sets
an `updateAvailable` flag.

@param {string} id of the extension to synchronize
@private Synchronizes the information between the public registry and the installed extensions . Specifically this makes the owner available in each and sets an updateAvailable flag .
Synchronize the registry with the current version of the extension