Skip to content

feat: export cookie utilities from undici#742

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/export-getcookie-and-setcookie
Draft

feat: export cookie utilities from undici#742
Copilot wants to merge 2 commits intomasterfrom
copilot/export-getcookie-and-setcookie

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 12, 2026

Re-export undici's Cookie API from urllib.

  • Export getCookies, setCookie, getSetCookies, deleteCookie, parseCookie functions and Cookie type from src/index.ts
  • Add tests for all five cookie utilities
import { getCookies, setCookie, getSetCookies, deleteCookie, parseCookie, Headers } from 'urllib';
import type { Cookie } from 'urllib';

const headers = new Headers();
setCookie(headers, { name: 'foo', value: 'bar' });
const cookies = getSetCookies(headers); // [{ name: 'foo', value: 'bar' }]

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • http://registry.npmjs.org:80/urllib/latest
    • Triggering command: /opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node --experimental-import-meta-resolve --require /home/REDACTED/work/urllib/urllib/node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.1.15_@arethetypeswrong+core@0.18.2_@types+node@22.19.15__7c6ae394869a5d43fd0cf7dc1d33dc1c/node_modules/@voidzero-dev/vite-plus-test/suppress-warnings.cjs --conditions node --conditions development /home/REDACTED/work/urllib/urllib/node_modules/.pnpm/@voidzero-dev+vite-plus-test@0.1.15_@arethetypeswrong+core@0.18.2_@types+node@22.19.15__7c6ae394869a5d43fd0cf7dc1d33dc1c/node_modules/@voidzero-dev/vite-plus-test/dist/workers/forks.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue Apr 12, 2026 that may be closed by this pull request
…eCookie and Cookie type from undici

Agent-Logs-Url: https://github.com/node-modules/urllib/sessions/ff57bdc1-581c-491f-94bc-7cfe12407c04

Co-authored-by: fengmk2 <156269+fengmk2@users.noreply.github.com>
Copilot AI changed the title [WIP] Export getCookie and setCookie from undici feat: export cookie utilities from undici Apr 12, 2026
Copilot AI requested a review from fengmk2 April 12, 2026 12:09
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 12, 2026

Open in StackBlitz

npm i https://pkg.pr.new/node-modules/urllib@742

commit: 5629627

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 12, 2026

Open in StackBlitz

npm i https://pkg.pr.new/node-modules/urllib@742

commit: 5629627

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.60%. Comparing base (ca63296) to head (5629627).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #742   +/-   ##
=======================================
  Coverage   94.60%   94.60%           
=======================================
  Files          10       10           
  Lines         723      723           
  Branches      226      226           
=======================================
  Hits          684      684           
  Misses         36       36           
  Partials        3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

export getCookie and setCookie from undici

2 participants