meteor/meteor

View on GitHub
packages/modules-runtime-hot/installer.js

Summary

Maintainability
C
1 day
Test Coverage

File installer.js has 344 lines of code (exceeds 250 allowed). Consider refactoring.
Open

makeInstaller = function (options) {
  "use strict";

  options = options || {};

Severity: Minor
Found in packages/modules-runtime-hot/installer.js - About 4 hrs to fix

    Function prefetch has 49 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      Module.prototype.prefetch = function (id) {
        var module = this;
        var parentFile = getOwn(filesByModuleId, module.id);
    
        lastPrefetchPromise = lastPrefetchPromise || Promise.resolve();
    Severity: Minor
    Found in packages/modules-runtime-hot/installer.js - About 1 hr to fix

      Function fileMergeContents has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function fileMergeContents(file, contents, options) {
          if (Array.isArray(contents)) {
            contents.forEach(function (item) {
              if (isString(item)) {
                file.deps[item] = file.module.id;
      Severity: Minor
      Found in packages/modules-runtime-hot/installer.js - About 1 hr to fix

        Function fileResolve has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function fileResolve(file, id, parentModule, seenDirFiles) {
            var parentModule = parentModule || file.module;
            var extensions = fileGetExtensions(file);
        
            file =
        Severity: Minor
        Found in packages/modules-runtime-hot/installer.js - About 1 hr to fix

          Function fileEvaluate has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function fileEvaluate(file, parentModule) {
              var module = file.module;
              if (!strictHasOwn(module, "exports")) {
                var contents = file.contents;
                if (!contents) {
          Severity: Minor
          Found in packages/modules-runtime-hot/installer.js - About 1 hr to fix

            Function require has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              Module.prototype.require = function require(id) {
                var result = fileResolve(filesByModuleId[this.id], id);
            
                if (result) {
                  // Skip any hooks added while requiring this module
            Severity: Minor
            Found in packages/modules-runtime-hot/installer.js - About 1 hr to fix

              There are no issues that match your filters.

              Category
              Status