hono 4.8.1 → 4.8.2
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/dist/cjs/utils/color.js +7 -1
- package/dist/utils/color.js +7 -1
- package/package.json +2 -2
package/dist/cjs/utils/color.js
CHANGED
|
@@ -30,7 +30,13 @@ function getColorEnabled() {
|
|
|
30
30
|
async function getColorEnabledAsync() {
|
|
31
31
|
const { navigator } = globalThis;
|
|
32
32
|
const cfWorkers = "cloudflare:workers";
|
|
33
|
-
const isNoColor = navigator !== void 0 && navigator.userAgent === "Cloudflare-Workers" ?
|
|
33
|
+
const isNoColor = navigator !== void 0 && navigator.userAgent === "Cloudflare-Workers" ? await (async () => {
|
|
34
|
+
try {
|
|
35
|
+
return "NO_COLOR" in ((await import(cfWorkers)).env ?? {});
|
|
36
|
+
} catch {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
})() : !getColorEnabled();
|
|
34
40
|
return !isNoColor;
|
|
35
41
|
}
|
|
36
42
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/utils/color.js
CHANGED
|
@@ -7,7 +7,13 @@ function getColorEnabled() {
|
|
|
7
7
|
async function getColorEnabledAsync() {
|
|
8
8
|
const { navigator } = globalThis;
|
|
9
9
|
const cfWorkers = "cloudflare:workers";
|
|
10
|
-
const isNoColor = navigator !== void 0 && navigator.userAgent === "Cloudflare-Workers" ?
|
|
10
|
+
const isNoColor = navigator !== void 0 && navigator.userAgent === "Cloudflare-Workers" ? await (async () => {
|
|
11
|
+
try {
|
|
12
|
+
return "NO_COLOR" in ((await import(cfWorkers)).env ?? {});
|
|
13
|
+
} catch {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
})() : !getColorEnabled();
|
|
11
17
|
return !isNoColor;
|
|
12
18
|
}
|
|
13
19
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hono",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.2",
|
|
4
4
|
"description": "Web framework built on Web Standards",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"test": "tsc --noEmit && vitest --run && vitest -c .vitest.config/jsx-runtime-default.ts --run && vitest -c .vitest.config/jsx-runtime-dom.ts --run",
|
|
14
14
|
"test:watch": "vitest --watch",
|
|
15
15
|
"test:deno": "deno test --allow-read --allow-env --allow-write --allow-net -c runtime-tests/deno/deno.json runtime-tests/deno && deno test --no-lock -c runtime-tests/deno-jsx/deno.precompile.json runtime-tests/deno-jsx && deno test --no-lock -c runtime-tests/deno-jsx/deno.react-jsx.json runtime-tests/deno-jsx",
|
|
16
|
-
"test:bun": "bun test --jsx-import-source ../../src/jsx runtime-tests/bun
|
|
16
|
+
"test:bun": "bun test --jsx-import-source ../../src/jsx runtime-tests/bun/*",
|
|
17
17
|
"test:fastly": "vitest --run --config ./runtime-tests/fastly/vitest.config.ts",
|
|
18
18
|
"test:node": "vitest --run --config ./runtime-tests/node/vitest.config.ts",
|
|
19
19
|
"test:workerd": "vitest --run --config ./runtime-tests/workerd/vitest.config.ts",
|