@jsenv/plugin-commonjs 2.8.11 → 2.8.13

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/plugin-commonjs",
3
- "version": "2.8.11",
3
+ "version": "2.8.13",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,13 +20,10 @@
20
20
  "files": [
21
21
  "/src/"
22
22
  ],
23
- "scripts": {
24
- "test": "node --conditions=development ./scripts/test.mjs"
25
- },
26
23
  "dependencies": {
27
- "@jsenv/filesystem": "4.10.1",
24
+ "@jsenv/filesystem": "4.10.3",
28
25
  "@jsenv/humanize": "1.2.8",
29
- "@jsenv/url-meta": "8.5.1",
26
+ "@jsenv/url-meta": "8.5.2",
30
27
  "@jsenv/urls": "2.5.2",
31
28
  "@rollup/plugin-commonjs": "26.0.1",
32
29
  "@rollup/plugin-json": "6.1.0",
@@ -4,7 +4,6 @@ import {
4
4
  } from "@jsenv/filesystem";
5
5
  import { createLogger, UNICODE } from "@jsenv/humanize";
6
6
  import { readFileSync, writeFileSync } from "node:fs";
7
-
8
7
  import { createLockRegistry } from "./file_lock_registry.js";
9
8
  import { updateCompileCache } from "./update_compile_cache.js";
10
9
  import { validateCompileCache } from "./validate_compile_cache.js";
@@ -147,7 +146,7 @@ const readCompileContextFile = ({ logger, compileContextJsonFileUrl }) => {
147
146
  let compileContextFileContent;
148
147
  try {
149
148
  compileContextFileContent = readFileSync(compileContextJsonFileUrl);
150
- } catch (e) {
149
+ } catch {
151
150
  logger.debug(
152
151
  `${UNICODE.INFO} cannot read compile context at ${compileContextJsonFileUrl}`,
153
152
  );
@@ -100,7 +100,7 @@ const validateCompiledFile = ({
100
100
  let ifModifiedSinceDate;
101
101
  try {
102
102
  ifModifiedSinceDate = new Date(lastModificationTime);
103
- } catch (e) {
103
+ } catch {
104
104
  ifModifiedSinceDate = null;
105
105
  // ideally we should rather respond with
106
106
  // 400 "if-modified-since header is not a valid date"
@@ -1,7 +1,6 @@
1
1
  import { defaultLookupPackageScope } from "@jsenv/node-esm-resolution";
2
2
  import { URL_META } from "@jsenv/url-meta";
3
3
  import { injectQueryParams, urlToBasename, urlToExtension } from "@jsenv/urls";
4
-
5
4
  import { commonJsToJsModule } from "./cjs_to_esm.js";
6
5
 
7
6
  const compileCacheDirectoryUrlDefault = new URL("../.cache/", import.meta.url);
@@ -141,7 +140,7 @@ const isBareSpecifier = (specifier) => {
141
140
  // eslint-disable-next-line no-new
142
141
  new URL(specifier);
143
142
  return false;
144
- } catch (e) {
143
+ } catch {
145
144
  return true;
146
145
  }
147
146
  };