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

h3

Package Overview
Dependencies
Maintainers
1
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

h3 - npm Package Compare versions

Comparing version 1.6.6 to 1.7.0

9

dist/index.d.ts

@@ -27,2 +27,4 @@ import { CookieSerializeOptions } from 'cookie-es';

crypto?: Crypto;
/** Default is Crypto.randomUUID */
generateId?: () => string;
}

@@ -109,2 +111,3 @@ declare function useSession<T extends SessionDataT = SessionDataT>(event: H3Event, config: SessionConfig): Promise<{

"__is_event__": boolean;
_handled: boolean;
node: NodeEventContext;

@@ -114,2 +117,3 @@ context: H3EventContext;

get path(): string;
get handled(): boolean;
/** @deprecated Please use `event.node.req` instead. **/

@@ -319,2 +323,3 @@ get req(): IncomingMessage;

cookiePathRewrite?: string | Record<string, string>;
onResponse?: (event: H3Event, response: Response) => void;
}

@@ -331,4 +336,4 @@ declare function proxyRequest(event: H3Event, target: string, opts?: ProxyOptions): Promise<any>;

declare function getQuery(event: H3Event): ufo.QueryObject;
declare function getRouterParams(event: H3Event): H3Event["context"];
declare function getRouterParam(event: H3Event, name: string): H3Event["context"][string];
declare function getRouterParams(event: H3Event): NonNullable<H3Event["context"]["params"]>;
declare function getRouterParam(event: H3Event, name: string): string | undefined;
declare function getMethod(event: H3Event, defaultMethod?: HTTPMethod): HTTPMethod;

@@ -335,0 +340,0 @@ declare function isMethod(event: H3Event, expected: HTTPMethod | HTTPMethod[], allowHead?: boolean): boolean;

{
"name": "h3",
"version": "1.6.6",
"version": "1.7.0",
"description": "Tiny JavaScript Server",

@@ -35,7 +35,7 @@ "repository": "unjs/h3",

"defu": "^6.1.2",
"destr": "^1.2.2",
"destr": "^2.0.0",
"iron-webcrypto": "^0.7.0",
"radix3": "^1.0.1",
"ufo": "^1.1.2",
"uncrypto": "^0.1.2"
"uncrypto": "^0.1.3"
},

@@ -45,22 +45,22 @@ "devDependencies": {

"@types/express": "^4.17.17",
"@types/node": "^20.1.4",
"@types/node": "^20.3.1",
"@types/supertest": "^2.0.12",
"@vitest/coverage-c8": "^0.31.0",
"@vitest/coverage-v8": "^0.32.2",
"autocannon": "^7.11.0",
"changelogen": "^0.5.3",
"connect": "^3.7.0",
"eslint": "^8.40.0",
"eslint-config-unjs": "^0.1.0",
"eslint": "^8.43.0",
"eslint-config-unjs": "^0.2.1",
"express": "^4.18.2",
"get-port": "^6.1.2",
"get-port": "^7.0.0",
"jiti": "^1.18.2",
"listhen": "^1.0.4",
"node-fetch-native": "^1.1.1",
"node-fetch-native": "^1.2.0",
"prettier": "^2.8.8",
"supertest": "^6.3.3",
"typescript": "^5.0.4",
"typescript": "^5.1.3",
"unbuild": "^1.2.1",
"vitest": "^0.31.0"
"vitest": "^0.32.2"
},
"packageManager": "pnpm@8.5.1"
"packageManager": "pnpm@8.6.3"
}

@@ -114,3 +114,3 @@ # H3

// We can proxy requests and rewrite cookie's domain and path
app.use('/api', eventHandler((event) => proxyRequest('https://example.com', {
app.use('/api', eventHandler((event) => proxyRequest(event, 'https://example.com', {
// f.e. keep one domain unchanged, rewrite one domain and remove other domains

@@ -117,0 +117,0 @@ cookieDomainRewrite: {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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