rm js fns

This commit is contained in:
2026-01-16 17:44:14 -06:00
parent ac91495679
commit b46406f755
42 changed files with 1954 additions and 2335 deletions

View File

@@ -42,10 +42,10 @@ for (var i = 0; i < args.length; i++) {
}
} else if (args[i] == '--follow-links') {
follow_links = true
} else if (!args[i].startsWith('-')) {
} else if (!starts_with(args[i], '-')) {
target_pkg = args[i]
// Resolve relative paths to absolute paths
if (target_pkg == '.' || target_pkg.startsWith('./') || target_pkg.startsWith('../') || fd.is_dir(target_pkg)) {
if (target_pkg == '.' || starts_with(target_pkg, './') || starts_with(target_pkg, '../') || fd.is_dir(target_pkg)) {
var resolved = fd.realpath(target_pkg)
if (resolved) {
target_pkg = resolved
@@ -81,8 +81,8 @@ function update_and_fetch(pkg)
if (new_entry) {
if (new_entry.commit) {
var old_str = old_commit ? old_commit.substring(0, 8) : "(new)"
log.console(" " + effective_pkg + " " + old_str + " -> " + new_entry.commit.substring(0, 8))
var old_str = old_commit ? text(old_commit, 0, 8) : "(new)"
log.console(" " + effective_pkg + " " + old_str + " -> " + text(new_entry.commit, 0, 8))
shop.fetch(effective_pkg)
} else {
// Local package - just ensure symlink is correct