Skip to content

Allow string[] as Record value on HeadersInit#1244

Merged
ronag merged 3 commits intonodejs:mainfrom
dgadelha:fix/fetch-headers-type
Feb 28, 2022
Merged

Allow string[] as Record value on HeadersInit#1244
ronag merged 3 commits intonodejs:mainfrom
dgadelha:fix/fetch-headers-type

Conversation

@dgadelha
Copy link
Copy Markdown
Contributor

This is a TypeScript-only change, undici already handles Records with string[] values: https://runkit.com/embed/972d5c6lsor2

A test was created to ensure this feature works properly

@ronag ronag requested a review from Ethan-Arrowood February 21, 2022 17:09
Comment thread types/fetch.d.ts Outdated
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 21, 2022

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.08%. Comparing base (17e6a0f) to head (e0d29aa).
⚠️ Report is 2154 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1244   +/-   ##
=======================================
  Coverage   94.08%   94.08%           
=======================================
  Files          43       43           
  Lines        4071     4071           
=======================================
  Hits         3830     3830           
  Misses        241      241           

☔ 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.

Copy link
Copy Markdown
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Copy Markdown
Collaborator

@Ethan-Arrowood Ethan-Arrowood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type change is fine but the test should exist somewhere else I think

Comment thread test/node-fetch/headers.js Outdated
@ronag ronag merged commit 901f9d6 into nodejs:main Feb 28, 2022
metcoder95 pushed a commit to metcoder95/undici that referenced this pull request Mar 1, 2022
* fix(fetch): allow string[] as Record value on HeadersInit

* fix(fetch): allow readonly string arrays on HeadersInit

* refact(fetch): move HeadersInit test to test/fetch
KhafraDev pushed a commit to KhafraDev/undici that referenced this pull request Jun 23, 2022
* fix(fetch): allow string[] as Record value on HeadersInit

* fix(fetch): allow readonly string arrays on HeadersInit

* refact(fetch): move HeadersInit test to test/fetch
metcoder95 pushed a commit to metcoder95/undici that referenced this pull request Dec 26, 2022
* fix(fetch): allow string[] as Record value on HeadersInit

* fix(fetch): allow readonly string arrays on HeadersInit

* refact(fetch): move HeadersInit test to test/fetch
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
* fix(fetch): allow string[] as Record value on HeadersInit

* fix(fetch): allow readonly string arrays on HeadersInit

* refact(fetch): move HeadersInit test to test/fetch
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.

6 participants