@jsenv/filesystem
Advanced tools
Comparing version 4.6.5 to 4.6.6
{ | ||
"name": "@jsenv/filesystem", | ||
"version": "4.6.5", | ||
"version": "4.6.6", | ||
"license": "MIT", | ||
@@ -35,3 +35,3 @@ "repository": { | ||
"dependencies": { | ||
"@jsenv/urls": "2.2.3", | ||
"@jsenv/urls": "2.2.4", | ||
"@jsenv/url-meta": "8.4.0", | ||
@@ -38,0 +38,0 @@ "@jsenv/abort": "4.3.0", |
@@ -19,3 +19,3 @@ import { urlToFileSystemPath } from "@jsenv/urls"; | ||
throw new Error( | ||
`directory expected at ${sourcePath} and found ${statsToType( | ||
`directory expect at ${sourcePath} and found ${statsToType( | ||
sourceStats, | ||
@@ -22,0 +22,0 @@ )} instead`, |
@@ -19,3 +19,3 @@ import { urlToFileSystemPath } from "@jsenv/urls"; | ||
throw new Error( | ||
`file expected at ${sourcePath} and found ${statsToType( | ||
`file expect at ${sourcePath} and found ${statsToType( | ||
sourceStats, | ||
@@ -22,0 +22,0 @@ )} instead`, |
@@ -14,3 +14,3 @@ /* | ||
if (!Buffer.isBuffer(buffer)) { | ||
throw new TypeError(`buffer expected, got ${buffer}`); | ||
throw new TypeError(`buffer expect,got ${buffer}`); | ||
} | ||
@@ -17,0 +17,0 @@ |
@@ -27,3 +27,3 @@ import { readdirSync, statSync } from "node:fs"; | ||
recursive = false, | ||
// filesystem might dispatch more events than expected | ||
// filesystem might dispatch more events than expect | ||
// Code can use "cooldownBetweenFileEvents" to prevent that | ||
@@ -30,0 +30,0 @@ // BUT it is UNADVISED to rely on this as explained later (search for "is lying" in this file) |
@@ -23,3 +23,3 @@ import { fileSystemPathToUrl } from "@jsenv/urls"; | ||
} catch (e) { | ||
throw new Error(`absolute url expected but got ${url}`); | ||
throw new Error(`absolute url expect but got ${url}`); | ||
} | ||
@@ -35,3 +35,3 @@ | ||
throw new Error( | ||
`absolute baseUrl expected but got ${baseUrl} to ensure windows drive letter on ${url}`, | ||
`absolute baseUrl expect but got ${baseUrl} to ensure windows drive letter on ${url}`, | ||
); | ||
@@ -58,3 +58,3 @@ } | ||
throw new Error( | ||
`drive letter expected on baseUrl but got ${baseUrl} to ensure windows drive letter on ${url}`, | ||
`drive letter expect on baseUrl but got ${baseUrl} to ensure windows drive letter on ${url}`, | ||
); | ||
@@ -61,0 +61,0 @@ } |
@@ -21,3 +21,12 @@ import { readdirSync, statSync } from "node:fs"; | ||
const visitDirectory = (directoryUrl) => { | ||
const entryNames = readdirSync(new URL(directoryUrl)); | ||
let entryNames; | ||
try { | ||
entryNames = readdirSync(new URL(directoryUrl)); | ||
} catch (e) { | ||
if (e.code === "ENOENT") { | ||
return; | ||
} | ||
throw e; | ||
} | ||
for (const entryName of entryNames) { | ||
@@ -24,0 +33,0 @@ const entryUrl = new URL(entryName, directoryUrl); |
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
128209
3732
+ Added@jsenv/humanize@1.1.0(transitive)
+ Added@jsenv/urls@2.2.4(transitive)
+ Addedstring-width@7.2.0(transitive)
- Removed@jsenv/humanize@1.0.0(transitive)
- Removed@jsenv/urls@2.2.3(transitive)
- Removedstring-width@7.0.0(transitive)
Updated@jsenv/urls@2.2.4