@cmssy/next 10.9.1 → 10.9.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.
@@ -74,8 +74,11 @@ function createCmssyProxy(config, options = {}) {
74
74
  for (const write of writes) {
75
75
  response.cookies.set(write.name, write.value, {
76
76
  ...DEFAULT_COOKIE_OPTIONS,
77
- ...write.value ? {} : { maxAge: 0 },
78
- ...write.options
77
+ ...write.options,
78
+ // Deletion wins over the caller's options. They will be the same
79
+ // options the cookie was written with, maxAge included, and honoring
80
+ // that here would keep an emptied cookie alive instead of removing it.
81
+ ...write.value ? {} : { maxAge: 0 }
79
82
  });
80
83
  }
81
84
  return response;
@@ -73,8 +73,11 @@ function createCmssyProxy(config, options = {}) {
73
73
  for (const write of writes) {
74
74
  response.cookies.set(write.name, write.value, {
75
75
  ...DEFAULT_COOKIE_OPTIONS,
76
- ...write.value ? {} : { maxAge: 0 },
77
- ...write.options
76
+ ...write.options,
77
+ // Deletion wins over the caller's options. They will be the same
78
+ // options the cookie was written with, maxAge included, and honoring
79
+ // that here would keep an emptied cookie alive instead of removing it.
80
+ ...write.value ? {} : { maxAge: 0 }
78
81
  });
79
82
  }
80
83
  return response;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/next",
3
- "version": "10.9.1",
3
+ "version": "10.9.2",
4
4
  "description": "Next.js App Router bindings for cmssy headless sites (createCmssyPage + draft preview)",
5
5
  "keywords": [
6
6
  "cmssy",
@@ -65,12 +65,12 @@
65
65
  "tsup": "^8.3.0",
66
66
  "typescript": "^5.6.0",
67
67
  "vitest": "^2.1.0",
68
- "@cmssy/react": "10.9.1"
68
+ "@cmssy/react": "10.9.2"
69
69
  },
70
70
  "dependencies": {
71
71
  "@cmssy/types": "0.32.0",
72
72
  "server-only": "^0.0.1",
73
- "@cmssy/core": "10.9.1"
73
+ "@cmssy/core": "10.9.2"
74
74
  },
75
75
  "scripts": {
76
76
  "build": "tsup",