New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hono

Package Overview
Dependencies
Maintainers
1
Versions
350
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 2.7.3 to 2.7.4

5

dist/cjs/context.js

@@ -124,2 +124,7 @@ "use strict";

set res(_res) {
if (this._res) {
this._res.headers.forEach((v, k) => {
_res.headers.set(k, v);
});
}
this._res = _res;

@@ -126,0 +131,0 @@ this.finalized = true;

@@ -102,2 +102,7 @@ // src/context.ts

set res(_res) {
if (this._res) {
this._res.headers.forEach((v, k) => {
_res.headers.set(k, v);
});
}
this._res = _res;

@@ -104,0 +109,0 @@ this.finalized = true;

13

dist/types/request.d.ts
import type { BodyData } from './utils/body';
import type { Cookie } from './utils/cookie';
import type { UnionToIntersection } from './utils/types';
declare type RemoveQuestion<T> = T extends `${infer R}?` ? R : T;
declare type UndefinedIfHavingQuestion<T> = T extends `${infer _}?` ? string | undefined : string;
declare type ParamKeyToRecord<T extends string> = T extends `${infer R}?` ? Record<R, string | undefined> : Record<T, string>;
declare global {
interface Request<CfHostMetadata = unknown, ParamKeyType extends string = string, Data = any> {
paramData?: Record<ParamKeyType, string>;
interface Request<CfHostMetadata = unknown, ParamKey extends string = string, Data = any> {
paramData?: Record<ParamKey, string>;
param: {
(key: ParamKeyType): string;
(): Record<ParamKeyType, string>;
(key: RemoveQuestion<ParamKey>): UndefinedIfHavingQuestion<ParamKey>;
(): UnionToIntersection<ParamKeyToRecord<ParamKey>>;
};

@@ -40,1 +44,2 @@ queryData?: Record<string, string>;

export declare function extendRequestPrototype(): void;
export {};

@@ -16,3 +16,3 @@ import type { Context } from './context';

declare type ParamKeyName<NameWithPattern> = NameWithPattern extends `${infer Name}{${infer _Pattern}` ? Name : NameWithPattern;
declare type ParamKey<Component> = Component extends `:${infer NameWithPattern}?` ? ParamKeyName<NameWithPattern> : Component extends `:${infer NameWithPattern}` ? ParamKeyName<NameWithPattern> : never;
declare type ParamKey<Component> = Component extends `:${infer NameWithPattern}` ? ParamKeyName<NameWithPattern> : never;
export declare type ParamKeys<Path> = Path extends `${infer Component}/${infer Rest}` ? ParamKey<Component> | ParamKeys<Rest> : ParamKey<Path>;

@@ -19,0 +19,0 @@ export interface CustomHandler<P = string, E = Partial<Environment>, S = any> {

export declare type Expect<T extends true> = T;
export declare type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? true : false;
export declare type NotEqual<X, Y> = true extends Equal<X, Y> ? false : true;
export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
{
"name": "hono",
"version": "2.7.3",
"version": "2.7.4",
"description": "Ultrafast web framework for Cloudflare Workers, Deno, and Bun.",

@@ -23,2 +23,3 @@ "main": "dist/cjs/index.js",

"build": "rimraf dist && tsx ./build.ts && yarn copy:package.cjs.json",
"postbuild": "publint",
"watch": "rimraf dist && tsx ./build.ts --watch && yarn copy:package.cjs.json",

@@ -280,2 +281,3 @@ "prerelease": "yarn denoify && yarn test:deno && yarn build",

"prettier": "^2.6.2",
"publint": "^0.1.8",
"rimraf": "^3.0.2",

@@ -282,0 +284,0 @@ "ts-jest": "^29.0.1",

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