rm js fns
This commit is contained in:
13
resolve.ce
13
resolve.ce
@@ -43,7 +43,7 @@ for (var i = 0; i < args.length; i++) {
|
||||
log.console(" --locked Show lock state without applying links")
|
||||
log.console(" --refresh Refresh floating refs before printing")
|
||||
$stop()
|
||||
} else if (!args[i].startsWith('-')) {
|
||||
} else if (!starts_with(args[i], '-')) {
|
||||
target_locator = args[i]
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,7 @@ if (!target_locator) {
|
||||
}
|
||||
|
||||
// Resolve local paths
|
||||
if (target_locator == '.' || target_locator.startsWith('./') || target_locator.startsWith('../') || fd.is_dir(target_locator)) {
|
||||
if (target_locator == '.' || starts_with(target_locator, './') || starts_with(target_locator, '../') || fd.is_dir(target_locator)) {
|
||||
var resolved = fd.realpath(target_locator)
|
||||
if (resolved) {
|
||||
target_locator = resolved
|
||||
@@ -114,10 +114,9 @@ var sorted = []
|
||||
for (var locator in all_deps) {
|
||||
sorted.push({ locator: locator, depth: all_deps[locator].depth })
|
||||
}
|
||||
sorted.sort(function(a, b) {
|
||||
if (a.depth != b.depth) return a.depth - b.depth
|
||||
return a.locator < b.locator ? -1 : 1
|
||||
})
|
||||
|
||||
sorted = sort(sorted, "locator")
|
||||
sorted = sort(sorted, "depth")
|
||||
|
||||
for (var i = 0; i < sorted.length; i++) {
|
||||
var locator = sorted[i].locator
|
||||
@@ -158,7 +157,7 @@ for (var i = 0; i < sorted.length; i++) {
|
||||
|
||||
var commit_str = ""
|
||||
if (lock_entry && lock_entry.commit) {
|
||||
commit_str = " @" + lock_entry.commit.substring(0, 8)
|
||||
commit_str = " @" + text(lock_entry.commit, 0, 8)
|
||||
} else if (lock_entry && lock_entry.type == 'local') {
|
||||
commit_str = " (local)"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user