Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hono

Package Overview
Dependencies
Maintainers
1
Versions
344
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hono - npm Package Compare versions

Comparing version 1.6.2 to 1.6.3

2

dist/hono.d.ts

@@ -51,5 +51,5 @@ /// <reference types="@cloudflare/workers-types" />

handleEvent(event: FetchEvent): Promise<Response>;
fetch(request: Request, env?: E, executionCtx?: ExecutionContext): Promise<Response>;
fetch: (request: Request, env?: E | undefined, executionCtx?: ExecutionContext | undefined) => Promise<Response>;
request(input: RequestInfo, requestInit?: RequestInit): Promise<Response>;
}
export {};

@@ -32,2 +32,5 @@ "use strict";

};
this.fetch = async (request, env, executionCtx) => {
return this.dispatch(request, executionCtx, env);
};
(0, request_1.extendRequestPrototype)();

@@ -121,5 +124,2 @@ const allMethods = [...methods, router_1.METHOD_NAME_ALL_LOWERCASE];

}
async fetch(request, env, executionCtx) {
return this.dispatch(request, executionCtx, env);
}
request(input, requestInit) {

@@ -126,0 +126,0 @@ const req = input instanceof Request ? input : new Request(input, requestInit);

{
"name": "hono",
"version": "1.6.2",
"version": "1.6.3",
"description": "Ultrafast web framework for Cloudflare Workers.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -18,3 +18,3 @@ <div align="center">

Hono - _**[炎] means flame🔥 in Japanese**_ - is a small, simple, and ultrafast web framework for Cloudflare Workers, Deno, and others.
Hono - _**[炎] means flame🔥 in Japanese**_ - is a small, simple, and ultrafast web framework for Cloudflare Workers, Deno, Bun, and others.

@@ -36,3 +36,3 @@ ```ts

- **TypeScript** - first-class TypeScript support.
- **Multi-platform** - works on Cloudflare Workers, Fastly Compute@Edge, or Deno.
- **Multi-platform** - works on Cloudflare Workers, Fastly Compute@Edge, Deno, or Bun.

@@ -74,2 +74,4 @@ ## Benchmarks

Another benchmark result: [denosaurs/bench](https://github.com/denosaurs/bench)
## Why so fast?

@@ -107,3 +109,3 @@

- [JSON pretty printing](https://github.com/honojs/hono/tree/master/src/middleware/pretty-json/)
- [Serving static files](https://github.com/honojs/hono/tree/master/src/middleware/serve-static/) (Only for Cloudflare Workers)
- [Serving static files](https://github.com/honojs/hono/tree/master/src/middleware/serve-static/) (Only for Cloudflare Workers and Deno)

@@ -765,7 +767,7 @@ To enable logger and Etag middleware with just this code.

Hono also works with Deno. This feature is still experimental.
Hono also works on Deno. This feature is still experimental.
```tsx
/** @jsx jsx */
import { serve } from 'https://deno.land/std@0.146.0/http/server.ts'
import { serve } from 'https://deno.land/std/http/server.ts'
import { Hono, logger, poweredBy, serveStatic, jsx } from 'https://deno.land/x/hono/mod.ts'

@@ -782,5 +784,24 @@

serve((req) => app.fetch(req))
serve(app.fetch)
```
## Bun
Hono also works on Bun. This feature is still experimental.
```ts
import { Hono } from 'hono'
const app = new Hono()
app.get('/', (c) => {
return c.json({ message: 'Hello Bun!' })
})
export default {
port: 3000,
fetch: app.fetch,
}
```
## Related projects

@@ -787,0 +808,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc