@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';
@@ -352,7 +352,7 @@ class Descriptor {
352
352
  let isSymlink = false;
353
353
  try {
354
354
  isSymlink = lstatSync(fullPath).isSymbolicLink();
355
- } catch (e) {
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 (e) {
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 (e) {
452
+ } catch {
453
453
  //
454
454
  }
455
455
  throw isDir ? (isWindows ? "access" : (isMac ? "not-permitted" : "is-directory")) : "not-directory";
@@ -540,7 +540,7 @@ class Fields {
540
540
  }
541
541
  try {
542
542
  validateHeaderValue(name, new TextDecoder().decode(value));
543
- } catch (e) {
543
+ } catch {
544
544
  throw { tag: "invalid-syntax" };
545
545
  }
546
546
  const lowercased = name.toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytecodealliance/preview2-shim",
3
- "version": "0.16.5",
3
+ "version": "0.16.7",
4
4
  "description": "WASI Preview2 shim for JS environments",
5
5
  "author": "Guy Bedford, Eduardo Rodrigues<16357187+eduardomourar@users.noreply.github.com>",
6
6
  "type": "module",