h3 0.5.7 → 0.6.0

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/dist/index.cjs CHANGED
@@ -165,7 +165,10 @@ function useCookie(event, name) {
165
165
  return useCookies(event)[name];
166
166
  }
167
167
  function setCookie(event, name, value, serializeOptions) {
168
- const cookieStr = cookieEs.serialize(name, value, serializeOptions);
168
+ const cookieStr = cookieEs.serialize(name, value, {
169
+ path: "/",
170
+ ...serializeOptions
171
+ });
169
172
  appendHeader(event, "Set-Cookie", cookieStr);
170
173
  }
171
174
  function deleteCookie(event, name, serializeOptions) {
package/dist/index.mjs CHANGED
@@ -157,7 +157,10 @@ function useCookie(event, name) {
157
157
  return useCookies(event)[name];
158
158
  }
159
159
  function setCookie(event, name, value, serializeOptions) {
160
- const cookieStr = serialize(name, value, serializeOptions);
160
+ const cookieStr = serialize(name, value, {
161
+ path: "/",
162
+ ...serializeOptions
163
+ });
161
164
  appendHeader(event, "Set-Cookie", cookieStr);
162
165
  }
163
166
  function deleteCookie(event, name, serializeOptions) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "h3",
3
- "version": "0.5.7",
3
+ "version": "0.6.0",
4
4
  "description": "Tiny JavaScript Server",
5
5
  "repository": "unjs/h3",
6
6
  "license": "MIT",