🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@hono/node-server

Package Overview
Dependencies
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hono/node-server - npm Package Compare versions

Comparing version
2.0.6
to
2.0.8
+1
-1
dist/serve-static.cjs

@@ -64,3 +64,3 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });

c.header("Content-Type", mimeType || "application/octet-stream");
if (options.precompressed && (!mimeType || COMPRESSIBLE_CONTENT_TYPE_REGEX.test(mimeType))) {
if (options.precompressed && (!mimeType || mimeType === "application/octet-stream" || COMPRESSIBLE_CONTENT_TYPE_REGEX.test(mimeType))) {
const acceptEncodingSet = new Set(c.req.header("Accept-Encoding")?.split(",").map((encoding) => encoding.trim()));

@@ -67,0 +67,0 @@ for (const encoding of ENCODINGS_ORDERED_KEYS) {

@@ -63,3 +63,3 @@ import { createStreamBody } from "./utils/stream.mjs";

c.header("Content-Type", mimeType || "application/octet-stream");
if (options.precompressed && (!mimeType || COMPRESSIBLE_CONTENT_TYPE_REGEX.test(mimeType))) {
if (options.precompressed && (!mimeType || mimeType === "application/octet-stream" || COMPRESSIBLE_CONTENT_TYPE_REGEX.test(mimeType))) {
const acceptEncodingSet = new Set(c.req.header("Accept-Encoding")?.split(",").map((encoding) => encoding.trim()));

@@ -66,0 +66,0 @@ for (const encoding of ENCODINGS_ORDERED_KEYS) {

{
"name": "@hono/node-server",
"version": "2.0.6",
"version": "2.0.8",
"description": "Node.js Adapter for Hono",

@@ -69,14 +69,2 @@ "main": "dist/index.mjs",

},
"scripts": {
"test": "vitest",
"build": "tsdown --external hono",
"watch": "tsdown --watch",
"postbuild": "publint",
"prerelease": "bun run build && bun run test --run",
"release": "np --no-publish",
"lint": "eslint src test",
"lint:fix": "eslint src test --fix",
"format": "prettier --check \"src/**/*.{js,ts}\" \"test/**/*.{js,ts}\"",
"format:fix": "prettier --write \"src/**/*.{js,ts}\" \"test/**/*.{js,ts}\""
},
"license": "MIT",

@@ -91,3 +79,4 @@ "repository": {

"registry": "https://registry.npmjs.org",
"access": "public"
"access": "public",
"provenance": true
},

@@ -108,3 +97,3 @@ "engines": {

"publint": "^0.3.18",
"supertest": "^6.3.3",
"supertest": "^7.2.2",
"tsdown": "^0.20.3",

@@ -118,3 +107,14 @@ "typescript": "^5.3.2",

},
"packageManager": "bun@1.2.20"
}
"scripts": {
"test": "vitest",
"build": "tsdown --external hono",
"watch": "tsdown --watch",
"postbuild": "publint",
"prerelease": "pnpm run build && pnpm run test --run",
"release": "np --no-publish",
"lint": "eslint src test",
"lint:fix": "eslint src test --fix",
"format": "prettier --check \"src/**/*.{js,ts}\" \"test/**/*.{js,ts}\"",
"format:fix": "prettier --write \"src/**/*.{js,ts}\" \"test/**/*.{js,ts}\""
}
}

@@ -44,14 +44,9 @@ # Node.js Adapter for Hono

You can install it from the npm registry with `npm` command:
You can install it from the npm registry:
```sh
npm install @hono/node-server
pnpm add @hono/node-server
```
Or use `yarn`:
```sh
yarn add @hono/node-server
```
## Usage

@@ -58,0 +53,0 @@