hono 2.7.1 → 2.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021 Yusuke Wada
3
+ Copyright (c) 2021 - present, Yusuke Wada and Hono contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -80,7 +80,7 @@ const cors = (options) => {
80
80
  }
81
81
  c.res.headers.delete("Content-Length");
82
82
  c.res.headers.delete("Content-Type");
83
- c.res = new Response(null, {
83
+ return new Response(null, {
84
84
  headers: c.res.headers,
85
85
  status: 204,
86
86
  statusText: c.res.statusText
@@ -58,7 +58,7 @@ var cors = (options) => {
58
58
  }
59
59
  c.res.headers.delete("Content-Length");
60
60
  c.res.headers.delete("Content-Type");
61
- c.res = new Response(null, {
61
+ return new Response(null, {
62
62
  headers: c.res.headers,
63
63
  status: 204,
64
64
  statusText: c.res.statusText
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hono",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "description": "Ultrafast web framework for Cloudflare Workers, Deno, and Bun.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "type": "module",
@@ -130,7 +130,8 @@
130
130
  "require": "./dist/cjs/router/smart-router/index.js"
131
131
  },
132
132
  "./router/static-router": {
133
- "import": "./dist/types/router/static-router/index.js",
133
+ "types": "./dist/types/router/static-router/index.d.ts",
134
+ "import": "./dist/router/static-router/index.js",
134
135
  "require": "./dist/cjs/router/static-router/index.js"
135
136
  },
136
137
  "./router/trie-router": {