From 679d18b57f0f5db83c7baf68ddcca41dcbeeaec2 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 16 Mar 2026 19:39:56 +0100 Subject: [PATCH] esm: fix path normalization in `finalizeResolution` PR-URL: https://github.com/nodejs/node/pull/62080 Refs: https://github.com/nodejs/node/pull/61478/changes/BASE..6cd90e1c0167f94c7dc671d10316e561c81f26af#r2871221559 Reviewed-By: Chemi Atlow Reviewed-By: Luigi Pinca Reviewed-By: Yagiz Nizipli --- lib/internal/modules/esm/resolve.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js index d253a3ff672..cbdc1203024 100644 --- a/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js @@ -245,7 +245,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) { } const stats = internalFsBinding.internalModuleStat( - StringPrototypeEndsWith(internalFsBinding, path, '/') ? StringPrototypeSlice(path, -1) : path, + StringPrototypeEndsWith(path, '/') ? StringPrototypeSlice(path, -1) : path, ); // Check for stats.isDirectory()