Socket
Socket
Sign inDemoInstall

hono

Package Overview
Dependencies
Maintainers
1
Versions
330
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.5.5 to 4.5.6

7

dist/cjs/utils/html.js

@@ -44,4 +44,5 @@ "use strict";

callbacks ||= [];
for (let i = buffer.length - 1; ; i--) {
str += buffer[i];
const resolvedBuffer = await Promise.all(buffer);
for (let i = resolvedBuffer.length - 1; ; i--) {
str += resolvedBuffer[i];
i--;

@@ -51,3 +52,3 @@ if (i < 0) {

}
let r = await buffer[i];
let r = resolvedBuffer[i];
if (typeof r === "object") {

@@ -54,0 +55,0 @@ callbacks.push(...r.callbacks || []);

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

const jsonRegex = /^application\/([a-z-\.]+\+)?json(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/;
const multipartRegex = /^multipart\/form-data(; boundary=[a-zA-Z0-9'"()+_,\-./:=?]+)?$/;
const multipartRegex = /^multipart\/form-data(;\s?boundary=[a-zA-Z0-9'"()+_,\-./:=?]+)?$/;
const urlencodedRegex = /^application\/x-www-form-urlencoded$/;

@@ -68,8 +68,9 @@ const validator = (target, validationFunc) => {

if (key.endsWith("[]")) {
if (form[key] === void 0) {
form[key] = [value2];
} else if (Array.isArray(form[key])) {
;
form[key].push(value2);
}
;
(form[key] ??= []).push(value2);
} else if (Array.isArray(form[key])) {
;
form[key].push(value2);
} else if (key in form) {
form[key] = [form[key], value2];
} else {

@@ -76,0 +77,0 @@ form[key] = value2;

@@ -384,9 +384,27 @@ /**

}
/**
* String literal types with auto-completion
* @see https://github.com/Microsoft/TypeScript/issues/29729
*/
type LiteralUnion<T> = T | (string & Record<never, never>);
/**
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#http-equiv
*/
type MetaHttpEquiv = 'content-security-policy' | 'content-type' | 'default-style' | 'x-ua-compatible' | 'refresh';
/**
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name
*/
type MetaName = 'application-name' | 'author' | 'description' | 'generator' | 'keywords' | 'referrer' | 'theme-color' | 'color-scheme' | 'viewport' | 'creator' | 'googlebot' | 'publisher' | 'robots';
/**
* @see https://ogp.me/
*/
type MetaProperty = 'og:title' | 'og:type' | 'og:image' | 'og:url' | 'og:audio' | 'og:description' | 'og:determiner' | 'og:locale' | 'og:locale:alternate' | 'og:site_name' | 'og:video' | 'og:image:url' | 'og:image:secure_url' | 'og:image:type' | 'og:image:width' | 'og:image:height' | 'og:image:alt';
interface MetaHTMLAttributes extends HTMLAttributes {
charset?: string | undefined;
'http-equiv'?: string | undefined;
name?: string | undefined;
charset?: LiteralUnion<'utf-8'> | undefined;
'http-equiv'?: LiteralUnion<MetaHttpEquiv> | undefined;
name?: LiteralUnion<MetaName> | undefined;
media?: string | undefined;
content?: string | undefined;
httpEquiv?: string | undefined;
property?: LiteralUnion<MetaProperty> | undefined;
httpEquiv?: LiteralUnion<MetaHttpEquiv> | undefined;
}

@@ -393,0 +411,0 @@ interface MeterHTMLAttributes extends HTMLAttributes {

@@ -17,4 +17,5 @@ // src/utils/html.ts

callbacks ||= [];
for (let i = buffer.length - 1; ; i--) {
str += buffer[i];
const resolvedBuffer = await Promise.all(buffer);
for (let i = resolvedBuffer.length - 1; ; i--) {
str += resolvedBuffer[i];
i--;

@@ -24,3 +25,3 @@ if (i < 0) {

}
let r = await buffer[i];
let r = resolvedBuffer[i];
if (typeof r === "object") {

@@ -27,0 +28,0 @@ callbacks.push(...r.callbacks || []);

@@ -6,3 +6,3 @@ // src/validator/validator.ts

var jsonRegex = /^application\/([a-z-\.]+\+)?json(;\s*[a-zA-Z0-9\-]+\=([^;]+))*$/;
var multipartRegex = /^multipart\/form-data(; boundary=[a-zA-Z0-9'"()+_,\-./:=?]+)?$/;
var multipartRegex = /^multipart\/form-data(;\s?boundary=[a-zA-Z0-9'"()+_,\-./:=?]+)?$/;
var urlencodedRegex = /^application\/x-www-form-urlencoded$/;

@@ -46,8 +46,9 @@ var validator = (target, validationFunc) => {

if (key.endsWith("[]")) {
if (form[key] === void 0) {
form[key] = [value2];
} else if (Array.isArray(form[key])) {
;
form[key].push(value2);
}
;
(form[key] ??= []).push(value2);
} else if (Array.isArray(form[key])) {
;
form[key].push(value2);
} else if (key in form) {
form[key] = [form[key], value2];
} else {

@@ -54,0 +55,0 @@ form[key] = value2;

{
"name": "hono",
"version": "4.5.5",
"version": "4.5.6",
"description": "Web framework built on Web Standards",

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

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