"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/npm/lib/install/action/fetch.js" (8 Mar 2017, 882 Bytes) of archive /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 'use strict'
    2 // var cache = require('../../cache.js')
    3 // var packageId = require('../../utils/package-id.js')
    4 // var moduleName = require('../../utils/module-name.js')
    5 
    6 module.exports = function (top, buildpath, pkg, log, next) {
    7   next()
    8 /*
    9 // FIXME: Unnecessary as long as we have to have the tarball to resolve all deps, which
   10 // is progressively seeming to be likely for the indefinite future.
   11 // ALSO fails for local deps specified with relative URLs outside of the top level.
   12 
   13   var name = moduleName(pkg)
   14   var version
   15   switch (pkg.package._requested.type) {
   16     case 'version':
   17     case 'range':
   18       version = pkg.package.version
   19       break
   20     case 'hosted':
   21       name = name + '@' + pkg.package._requested.spec
   22       break
   23     default:
   24       name = pkg.package._requested.raw
   25   }
   26   log.silly('fetch', packageId(pkg))
   27   cache.add(name, version, top, false, next)
   28 */
   29 }