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

hono

Package Overview
Dependencies
Maintainers
1
Versions
342
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 4.2.7 to 4.2.8

2

dist/adapter/cloudflare-workers/utils.js

@@ -27,3 +27,3 @@ // src/adapter/cloudflare-workers/utils.ts

}
const content = await ASSET_NAMESPACE.get(key, { type: "arrayBuffer" });
const content = await ASSET_NAMESPACE.get(key, { type: "stream" });
if (!content) {

@@ -30,0 +30,0 @@ return null;

@@ -49,3 +49,3 @@ "use strict";

}
const content = await ASSET_NAMESPACE.get(key, { type: "arrayBuffer" });
const content = await ASSET_NAMESPACE.get(key, { type: "stream" });
if (!content) {

@@ -52,0 +52,0 @@ return null;

@@ -173,2 +173,9 @@ "use strict";

this.#res.headers.forEach((v, k) => {
if (k === "set-cookie" && this.#res) {
const cookies = this.#res.headers.getSetCookie();
for (const cookie of cookies) {
this.#headers?.append("set-cookie", cookie);
}
return;
}
this.#headers?.set(k, v);

@@ -175,0 +182,0 @@ });

@@ -150,2 +150,9 @@ // src/context.ts

this.#res.headers.forEach((v, k) => {
if (k === "set-cookie" && this.#res) {
const cookies = this.#res.headers.getSetCookie();
for (const cookie of cookies) {
this.#headers?.append("set-cookie", cookie);
}
return;
}
this.#headers?.set(k, v);

@@ -152,0 +159,0 @@ });

@@ -6,2 +6,2 @@ import type { KVNamespace } from '@cloudflare/workers-types';

};
export declare const getContentFromKVAsset: (path: string, options?: KVAssetOptions) => Promise<ArrayBuffer | null>;
export declare const getContentFromKVAsset: (path: string, options?: KVAssetOptions) => Promise<ReadableStream | null>;

@@ -12,15 +12,18 @@ import type { Props, Child, JSXNode } from '../base';

declare const _default: {
useState: <T>(initialState: T | (() => T)) => [T, (newState: T | ((currentState: T) => T)) => void];
useState: {
<T>(initialState: T | (() => T)): [T, (newState: T | ((currentState: T) => T)) => void];
<T_1 = undefined>(): [T_1 | undefined, (newState: T_1 | ((currentState: T_1 | undefined) => T_1 | undefined) | undefined) => void];
};
useEffect: (effect: () => void | (() => void), deps?: readonly unknown[] | undefined) => void;
useRef: <T_1>(initialValue: T_1 | null) => import("../hooks").RefObject<T_1>;
useCallback: <T_2 extends (...args: unknown[]) => unknown>(callback: T_2, deps: readonly unknown[]) => T_2;
use: <T_3>(promise: Promise<T_3>) => T_3;
useRef: <T_2>(initialValue: T_2 | null) => import("../hooks").RefObject<T_2>;
useCallback: <T_3 extends (...args: unknown[]) => unknown>(callback: T_3, deps: readonly unknown[]) => T_3;
use: <T_4>(promise: Promise<T_4>) => T_4;
startTransition: (callback: () => void) => void;
useTransition: () => [boolean, (callback: () => void) => void];
useDeferredValue: <T_4>(value: T_4) => T_4;
useDeferredValue: <T_5>(value: T_5) => T_5;
startViewTransition: (callback: () => void) => void;
useViewTransition: () => [boolean, (callback: () => void) => void];
useMemo: <T_5>(factory: () => T_5, deps: readonly unknown[]) => T_5;
useMemo: <T_6>(factory: () => T_6, deps: readonly unknown[]) => T_6;
useLayoutEffect: (effect: () => void | (() => void), deps?: readonly unknown[] | undefined) => void;
useReducer: <T_6, A>(reducer: (state: T_6, action: A) => T_6, initialArg: T_6, init?: ((initialState: T_6) => T_6) | undefined) => [T_6, (action: A) => void];
useReducer: <T_7, A>(reducer: (state: T_7, action: A) => T_7, initialArg: T_7, init?: ((initialState: T_7) => T_7) | undefined) => [T_7, (action: A) => void];
useId: () => string;

@@ -36,10 +39,10 @@ useDebugValue: (_value: unknown, _formatter?: ((value: unknown) => string) | undefined) => void;

}>>;
createContext: <T_7>(defaultValue: T_7) => import("../context").Context<T_7>;
useContext: <T_8>(context: import("../context").Context<T_8>) => T_8;
memo: <T_9>(component: import("../base").FC<T_9>, propsAreEqual?: (prevProps: Readonly<T_9>, nextProps: Readonly<T_9>) => boolean) => import("../base").FC<T_9>;
createContext: <T_8>(defaultValue: T_8) => import("../context").Context<T_8>;
useContext: <T_9>(context: import("../context").Context<T_9>) => T_9;
memo: <T_10>(component: import("../base").FC<T_10>, propsAreEqual?: (prevProps: Readonly<T_10>, nextProps: Readonly<T_10>) => boolean) => import("../base").FC<T_10>;
isValidElement: (element: unknown) => element is JSXNode;
createElement: (tag: string | ((props: Props) => JSXNode), props: Props, ...children: Child[]) => JSXNode;
cloneElement: <T_10 extends JSXNode | JSX.Element>(element: T_10, props: Props, ...children: Child[]) => T_10;
cloneElement: <T_11 extends JSXNode | JSX.Element>(element: T_11, props: Props, ...children: Child[]) => T_11;
};
export default _default;
export type { Context } from '../context';

@@ -17,3 +17,7 @@ type UpdateStateFunction<T> = (newState: T | ((currentState: T) => T)) => void;

export declare const useDeferredValue: <T>(value: T) => T;
export declare const useState: <T>(initialState: T | (() => T)) => [T, UpdateStateFunction<T>];
type UseStateType = {
<T>(initialState: T | (() => T)): [T, UpdateStateFunction<T>];
<T = undefined>(): [T | undefined, UpdateStateFunction<T | undefined>];
};
export declare const useState: UseStateType;
export declare const useReducer: <T, A>(reducer: (state: T, action: A) => T, initialArg: T, init?: ((initialState: T) => T) | undefined) => [T, (action: A) => void];

@@ -20,0 +24,0 @@ export declare const useEffect: (effect: () => void | (() => void), deps?: readonly unknown[]) => void;

@@ -23,16 +23,19 @@ import { jsx, memo, Fragment, isValidElement, cloneElement } from './base';

useContext: <T_3>(context: import("./context").Context<T_3>) => T_3;
useState: <T_4>(initialState: T_4 | (() => T_4)) => [T_4, (newState: T_4 | ((currentState: T_4) => T_4)) => void];
useState: {
<T_4>(initialState: T_4 | (() => T_4)): [T_4, (newState: T_4 | ((currentState: T_4) => T_4)) => void];
<T_5 = undefined>(): [T_5 | undefined, (newState: T_5 | ((currentState: T_5 | undefined) => T_5 | undefined) | undefined) => void];
};
useEffect: (effect: () => void | (() => void), deps?: readonly unknown[] | undefined) => void;
useRef: <T_5>(initialValue: T_5 | null) => import("./hooks").RefObject<T_5>;
useCallback: <T_6 extends (...args: unknown[]) => unknown>(callback: T_6, deps: readonly unknown[]) => T_6;
useReducer: <T_7, A>(reducer: (state: T_7, action: A) => T_7, initialArg: T_7, init?: ((initialState: T_7) => T_7) | undefined) => [T_7, (action: A) => void];
useRef: <T_6>(initialValue: T_6 | null) => import("./hooks").RefObject<T_6>;
useCallback: <T_7 extends (...args: unknown[]) => unknown>(callback: T_7, deps: readonly unknown[]) => T_7;
useReducer: <T_8, A>(reducer: (state: T_8, action: A) => T_8, initialArg: T_8, init?: ((initialState: T_8) => T_8) | undefined) => [T_8, (action: A) => void];
useId: () => string;
useDebugValue: (_value: unknown, _formatter?: ((value: unknown) => string) | undefined) => void;
use: <T_8>(promise: Promise<T_8>) => T_8;
use: <T_9>(promise: Promise<T_9>) => T_9;
startTransition: (callback: () => void) => void;
useTransition: () => [boolean, (callback: () => void) => void];
useDeferredValue: <T_9>(value: T_9) => T_9;
useDeferredValue: <T_10>(value: T_10) => T_10;
startViewTransition: (callback: () => void) => void;
useViewTransition: () => [boolean, (callback: () => void) => void];
useMemo: <T_10>(factory: () => T_10, deps: readonly unknown[]) => T_10;
useMemo: <T_11>(factory: () => T_11, deps: readonly unknown[]) => T_11;
useLayoutEffect: (effect: () => void | (() => void), deps?: readonly unknown[] | undefined) => void;

@@ -39,0 +42,0 @@ Suspense: import("./base").FC<import("./types").PropsWithChildren<{

{
"name": "hono",
"version": "4.2.7",
"version": "4.2.8",
"description": "Ultrafast web framework for the Edges",

@@ -25,4 +25,4 @@ "main": "dist/cjs/index.js",

"lint:fix": "eslint --ext js,ts,tsx src runtime_tests --fix",
"format": "prettier --check \"src/**/*.{js,ts,tsx}\" \"runtime_tests/**/*.{js,ts,tsx}\"",
"format:fix": "prettier --write \"src/**/*.{js,ts,tsx}\" \"runtime_tests/**/*.{js,ts,tsx}\"",
"format": "prettier --check --cache \"src/**/*.{js,ts,tsx}\" \"runtime_tests/**/*.{js,ts,tsx}\"",
"format:fix": "prettier --write --cache --cache-strategy metadata \"src/**/*.{js,ts,tsx}\" \"runtime_tests/**/*.{js,ts,tsx}\"",
"denoify": "rimraf deno_dist && denoify && rimraf \"deno_dist/**/*.test.{ts,tsx}\"",

@@ -29,0 +29,0 @@ "copy:package.cjs.json": "cp ./package.cjs.json ./dist/cjs/package.json && cp ./package.cjs.json ./dist/types/package.json ",

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