fix(review): restore cookie attrs + color fallback, drop stale knip entry

Code-review findings:
- donation-toast: restore path/secure/sameSite cookie attributes the
  inlined useCookie dropped (security/scope regression).
- utils/color: restore @uiw fallback so percentage-notation rgb() still
  converts (custom style-rule colors are arbitrary strings); add tests
  pinning the one real difference vs the black fallback.
- knip: drop stale npm-check-updates ignoreDependencies entry.

Claude-Session: https://claude.ai/code/session_012Bnvt1MghwHj4qQRxuQUGa
This commit is contained in:
Amruth Pillai
2026-07-04 22:25:06 +02:00
parent 560956bbe6
commit 7a0d1e93f3
6 changed files with 21 additions and 6 deletions
+8
View File
@@ -26,6 +26,14 @@ describe("rgbaStringToHex", () => {
expect(rgbaStringToHex("#F1F5F9")).toBe("#f1f5f9");
expect(rgbaStringToHex("#0F172A")).toBe("#0f172a");
});
it("converts percentage-notation rgb via the @uiw fallback (integer parser misses it)", () => {
expect(rgbaStringToHex("rgb(100%, 0%, 0%)")).toBe("#ff0000");
});
it("returns black for formats neither parser nor @uiw understands", () => {
expect(rgbaStringToHex("not-a-color")).toBe("#000000");
});
});
describe("isDarkColor", () => {