@jsenv/plugin-commonjs 2.8.11 → 2.8.12
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.
|
|
3
|
+
"version": "2.8.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"test": "node --conditions=development ./scripts/test.mjs"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@jsenv/filesystem": "4.10.
|
|
27
|
+
"@jsenv/filesystem": "4.10.2",
|
|
28
28
|
"@jsenv/humanize": "1.2.8",
|
|
29
29
|
"@jsenv/url-meta": "8.5.1",
|
|
30
30
|
"@jsenv/urls": "2.5.2",
|
|
@@ -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
|
|
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
|
|
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
|
|
143
|
+
} catch {
|
|
145
144
|
return true;
|
|
146
145
|
}
|
|
147
146
|
};
|