@bytecodealliance/preview2-shim 0.16.5 → 0.16.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -198,7 +198,7 @@ class Descriptor {
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
statAt(_pathFlags, path) {
|
|
201
|
-
const entry = getChildEntry(this.#entry, path);
|
|
201
|
+
const entry = getChildEntry(this.#entry, path, { create: false, directory: false });
|
|
202
202
|
let type = 'unknown', size = BigInt(0);
|
|
203
203
|
if (entry.source) {
|
|
204
204
|
type = 'regular-file';
|
package/lib/nodejs/filesystem.js
CHANGED
|
@@ -352,7 +352,7 @@ class Descriptor {
|
|
|
352
352
|
let isSymlink = false;
|
|
353
353
|
try {
|
|
354
354
|
isSymlink = lstatSync(fullPath).isSymbolicLink();
|
|
355
|
-
} catch
|
|
355
|
+
} catch {
|
|
356
356
|
//
|
|
357
357
|
}
|
|
358
358
|
if (isSymlink) throw openFlags.directory ? "not-directory" : "loop";
|
|
@@ -361,7 +361,7 @@ class Descriptor {
|
|
|
361
361
|
let isFile = false;
|
|
362
362
|
try {
|
|
363
363
|
isFile = !statSync(fullPath).isDirectory();
|
|
364
|
-
} catch
|
|
364
|
+
} catch {
|
|
365
365
|
//
|
|
366
366
|
}
|
|
367
367
|
if (isFile) throw "not-directory";
|
|
@@ -430,7 +430,7 @@ class Descriptor {
|
|
|
430
430
|
let isDir = false;
|
|
431
431
|
try {
|
|
432
432
|
isDir = statSync(fullPath).isDirectory();
|
|
433
|
-
} catch
|
|
433
|
+
} catch {
|
|
434
434
|
//
|
|
435
435
|
}
|
|
436
436
|
if (!isDir) throw isWindows ? "no-entry" : "not-directory";
|
|
@@ -449,7 +449,7 @@ class Descriptor {
|
|
|
449
449
|
let isDir = false;
|
|
450
450
|
try {
|
|
451
451
|
isDir = statSync(fullPath).isDirectory();
|
|
452
|
-
} catch
|
|
452
|
+
} catch {
|
|
453
453
|
//
|
|
454
454
|
}
|
|
455
455
|
throw isDir ? (isWindows ? "access" : (isMac ? "not-permitted" : "is-directory")) : "not-directory";
|
package/lib/nodejs/http.js
CHANGED
package/package.json
CHANGED