@jsenv/filesystem
Advanced tools
Comparing version 4.10.1 to 4.10.2
{ | ||
"name": "@jsenv/filesystem", | ||
"version": "4.10.1", | ||
"version": "4.10.2", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -18,3 +18,3 @@ import { | ||
urlString = String(new URL(value)); | ||
} catch (e) { | ||
} catch { | ||
return { | ||
@@ -27,2 +27,8 @@ valid: false, | ||
} | ||
} else if ( | ||
value && | ||
typeof value === "object" && | ||
typeof value.href === "string" | ||
) { | ||
value = value.href; | ||
} else { | ||
@@ -29,0 +35,0 @@ return { |
@@ -22,3 +22,3 @@ import { fileSystemPathToUrl } from "@jsenv/urls"; | ||
url = String(new URL(url)); | ||
} catch (e) { | ||
} catch { | ||
throw new Error(`absolute url expect but got ${url}`); | ||
@@ -33,3 +33,3 @@ } | ||
baseUrl = String(new URL(baseUrl)); | ||
} catch (e) { | ||
} catch { | ||
throw new Error( | ||
@@ -36,0 +36,0 @@ `absolute baseUrl expect but got ${baseUrl} to ensure windows drive letter on ${url}`, |
@@ -14,3 +14,3 @@ import { fileSystemPathToUrl, isFileSystemPath } from "@jsenv/urls"; | ||
urlString = String(new URL(value, baseUrl)); | ||
} catch (e) { | ||
} catch { | ||
return { | ||
@@ -17,0 +17,0 @@ valid: false, |
@@ -16,3 +16,2 @@ import { fileSystemPathToUrl, urlToFileSystemPath } from "@jsenv/urls"; | ||
let i = 0; | ||
// eslint-disable-next-line no-constant-condition | ||
while (true) { | ||
@@ -19,0 +18,0 @@ const name = parts[i]; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
138126
4029