Skip to content

Conversation

@suneettipirneni
Copy link
Contributor

@suneettipirneni suneettipirneni commented Feb 2, 2022

This relates to...

#1172

Rationale

Types for RequestInit should be fully compatible with typescript dom types.

Changes

Adds all properties to RequestInit that were missing based on the typescript dom types. This adjusts the Headers subtype to also follow the typescript definitions.

Features

N/A

Bug Fixes

closes #1172

Breaking Changes and Deprecations

N/A

@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2022

Codecov Report

Merging #1199 (4f4ff94) into main (1204ed1) will decrease coverage by 0.30%.
The diff coverage is 98.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1199      +/-   ##
==========================================
- Coverage   93.73%   93.43%   -0.31%     
==========================================
  Files          43       43              
  Lines        4023     4052      +29     
==========================================
+ Hits         3771     3786      +15     
- Misses        252      266      +14     
Impacted Files Coverage Δ
lib/core/util.js 98.46% <98.11%> (ø)
lib/fetch/file.js 52.08% <0.00%> (-12.63%) ⬇️
lib/fetch/response.js 92.42% <0.00%> (-3.04%) ⬇️
lib/client.js 97.91% <0.00%> (-0.01%) ⬇️
lib/fetch/index.js 77.47% <0.00%> (ø)
lib/mock/mock-utils.js 100.00% <0.00%> (ø)
lib/mock/mock-interceptor.js 100.00% <0.00%> (ø)
lib/fetch/request.js 82.57% <0.00%> (+0.41%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1204ed1...4f4ff94. Read the comment docs.

@mcollina
Copy link
Member

mcollina commented Feb 9, 2022

Could you add a few assertions for these changes in https://github.com/nodejs/undici/blob/main/test/types/fetch.test-d.ts?

Copy link
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.

approving but also like @mcollina comment, please update the assertions in the test file before merging

@Ethan-Arrowood
Copy link
Collaborator

I assume you have prettier/eslint auto enabled in your editor. please revert all of the changes in the .js file as it does not apply to this PR's intended changes. Thank you!

Copy link
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

@mcollina mcollina merged commit 1f066b3 into nodejs:main Feb 11, 2022
KhafraDev pushed a commit to KhafraDev/undici that referenced this pull request Jun 23, 2022
metcoder95 pushed a commit to metcoder95/undici that referenced this pull request Dec 26, 2022
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
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.

RequestInit interface does not support all of the props in dom RequestInit interface

5 participants