From a5f2b6317f9f3d39f30610ba2da381c850b1e9c1 Mon Sep 17 00:00:00 2001 From: Trevor Burnham Date: Tue, 18 Feb 2025 14:34:24 -0500 Subject: [PATCH] chore: remove duplicate var Following up on #8115. Since `cleanFetchSpec` no longer differs from `fetchSpec`, it's no longer needed. --- workspaces/arborist/lib/consistent-resolve.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/workspaces/arborist/lib/consistent-resolve.js b/workspaces/arborist/lib/consistent-resolve.js index cbd3392a9300c..890caa32f1072 100644 --- a/workspaces/arborist/lib/consistent-resolve.js +++ b/workspaces/arborist/lib/consistent-resolve.js @@ -20,11 +20,10 @@ const consistentResolve = (resolved, fromPath, toPath, relPaths = false) => { raw, } = npa(resolved, fromPath) if (type === 'file' || type === 'directory') { - const cleanFetchSpec = fetchSpec if (relPaths && toPath) { - return `file:${relpath(toPath, cleanFetchSpec)}` + return `file:${relpath(toPath, fetchSpec)}` } - return `file:${cleanFetchSpec}` + return `file:${fetchSpec}` } if (hosted) { return `git+${hosted.auth ? hosted.https(hostedOpt) : hosted.sshurl(hostedOpt)}`