@jsenv/node-esm-resolution 1.0.5 → 1.0.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/node-esm-resolution",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -6,7 +6,7 @@ export const defaultReadPackageJson = (packageUrl) => {
6
6
  const string = String(buffer);
7
7
  try {
8
8
  return JSON.parse(string);
9
- } catch (e) {
9
+ } catch {
10
10
  throw new Error(`Invalid package configuration`);
11
11
  }
12
12
  };
@@ -93,7 +93,7 @@ const applyPackageSpecifierResolution = (specifier, resolutionContext) => {
93
93
  type: "absolute_specifier",
94
94
  url: urlObject.href,
95
95
  };
96
- } catch (e) {
96
+ } catch {
97
97
  // bare specifier
98
98
  const browserFieldResolution = applyBrowserFieldResolution(
99
99
  specifier,
package/src/url_utils.js CHANGED
@@ -37,7 +37,7 @@ export const isValidUrl = (url) => {
37
37
  // eslint-disable-next-line no-new
38
38
  new URL(url);
39
39
  return true;
40
- } catch (e) {
40
+ } catch {
41
41
  return false;
42
42
  }
43
43
  };