Skip to content

Commit

Permalink
rename the unclear util names
Browse files Browse the repository at this point in the history
  • Loading branch information
watilde committed Jul 22, 2017
1 parent 02b390e commit 7002570
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/install/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const https = require('https')
const semver = require('semver')
const npmrc = require('../utils/npmrc')
const { URL } = require('url')
const deeper = require('../utils/deeper')
const heaper = require('../utils/heaper')
const treeGetter = require('./tree/getter')
const treeSetter = require('./tree/setter')

const resolver = (dep, deps, base, resolve, reject) => {
const url = new URL(path.join(dep, deps[dep]), npmrc.registry)
Expand All @@ -20,7 +20,7 @@ const resolver = (dep, deps, base, resolve, reject) => {
}
}
for (let i = 0; base.length > i; i += 2) {
let target = heaper(global.dependenciesTree, base.slice(0, i))
let target = treeGetter(global.dependenciesTree, base.slice(0, i))
if (target && target[dep] && target[dep].version) {
if (semver.satisfies(target[dep].version, deps[dep])) {
return resolve()
Expand All @@ -39,7 +39,7 @@ const resolver = (dep, deps, base, resolve, reject) => {
global.dependenciesTree[dep].tarball = body.dist.tarball
global.dependenciesTree[dep].shasum = body.dist.shasum
} else {
deeper(global.dependenciesTree, dep, {
treeSetter(global.dependenciesTree, dep, {
version: body.version,
tarball: body.dist.tarball,
shuasum: body.dist.shasum
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 7002570

Please sign in to comment.