From 0bb3fe00bd9cd5fa90466975795fe45ed6bf2b96 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Wed, 15 Oct 2025 15:33:16 -0300 Subject: validators, test: permissive typeless validateReference() Test appears to describe that the original behavior would have been to default to 'track', which like... okay?? That is so and was changed (to no default and arbitrary typeless behavior) in commit 4f6e0bc3. --- src/validators.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/validators.js b/src/validators.js index 59df80d4..63268ded 100644 --- a/src/validators.js +++ b/src/validators.js @@ -842,9 +842,11 @@ export function validateReference(type) { type.map(type => `"${type}:"`).join(', ') + `, got "${typePart}:"`); } - } else if (typePart !== type) { - throw new TypeError( - `Expected ref to begin with "${type}:", got "${typePart}:"`); + } else if (type) { + if (typePart !== type) { + throw new TypeError( + `Expected ref to begin with "${type}:", got "${typePart}:"`); + } } isDirectory(directoryPart); -- cgit 1.3.0-6-gf8a5