From b59d64f96e155ad353a1caf18878c74c64c521ac Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2026 10:05:53 +0200 Subject: [PATCH] chore(deps): update dependency cookie to v2 (#11318) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Vladimir Sheremet --- packages/ui/node/index.ts | 6 ++++-- packages/ui/package.json | 2 +- pnpm-lock.yaml | 10 ++++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/ui/node/index.ts b/packages/ui/node/index.ts index 4c95c8f1b..1cd031864 100644 --- a/packages/ui/node/index.ts +++ b/packages/ui/node/index.ts @@ -2,7 +2,7 @@ import type { IncomingMessage } from 'node:http' import type { PluginHarness, Vite } from 'vitest/node' import crypto from 'node:crypto' import fs from 'node:fs' -import { parse as parseCookie, serialize as serializeCookie } from 'cookie' +import { parseCookie, stringifySetCookie } from 'cookie' import { join, resolve } from 'pathe' import sirv from 'sirv' import c from 'tinyrainbow' @@ -39,7 +39,9 @@ export default (harness: PluginHarness): Vite.Plugin => { const base = uiOptions.uiBase function serializeTokenCookie(): string { - return serializeCookie(UI_TOKEN_COOKIE, ctx.config.api.token, { + return stringifySetCookie({ + name: UI_TOKEN_COOKIE, + value: ctx.config.api.token, path: base, httpOnly: true, maxAge: UI_TOKEN_COOKIE_MAX_AGE, diff --git a/packages/ui/package.json b/packages/ui/package.json index 4dc9e90c3..25ba4c914 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -77,7 +77,7 @@ "birpc": "catalog:", "codemirror": "^5.65.18", "codemirror-theme-vars": "^0.1.2", - "cookie": "^1.1.1", + "cookie": "^2.0.1", "d3-graph-controller": "^3.1.13", "floating-vue": "^5.2.2", "mime": "^4.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf92e798f..2fd488760 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -865,8 +865,8 @@ importers: specifier: ^0.1.2 version: 0.1.2 cookie: - specifier: ^1.1.1 - version: 1.1.1 + specifier: ^2.0.1 + version: 2.0.1 d3-graph-controller: specifier: ^3.1.13 version: 3.1.13 @@ -5939,6 +5939,10 @@ packages: resolution: {integrity: sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==} engines: {node: '>=18'} + cookie@2.0.1: + resolution: {integrity: sha512-yuToqVvRrj6pfDXREyQAAv8SkAEk/8GS3jQRTiUMm66TVtBYmqQeoEjL2Lmq8Rpo6271vH76InTChTitEAm65w==} + engines: {node: '>=22'} + cookiejar@2.1.4: resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==} @@ -13711,6 +13715,8 @@ snapshots: cookie@1.1.1: {} + cookie@2.0.1: {} + cookiejar@2.1.4: {} core-js-compat@3.49.0: -- 2.51.2