octet-stream / form-data

Spec-compliant FormData implementation for Node.js
https://www.npmjs.com/package/formdata-node
MIT License
142 stars 17 forks source link

Coerce field names to string #23

Closed jaydenseric closed 4 years ago

jaydenseric commented 4 years ago

Fixes https://github.com/octet-stream/form-data/issues/22 .

Field name arguments of get, getAll, set, append, and delete are now coerced to string, like how native FormData implementations behave.

Also, while I was in the area I tidied some typos, etc. in the test names.

codecov[bot] commented 4 years ago

Codecov Report

Merging #23 into master will decrease coverage by 0.74%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #23      +/-   ##
==========================================
- Coverage   99.62%   98.88%   -0.75%     
==========================================
  Files          17       17              
  Lines         269      269              
  Branches       70       70              
==========================================
- Hits          268      266       -2     
- Misses          1        3       +2     
Flag Coverage Δ
#unittests 98.88% <100.00%> (-0.75%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/lib/FormData.mjs 98.51% <100.00%> (-1.49%) :arrow_down:

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 79a84d0...fbfa47e. Read the comment docs.

octet-stream commented 4 years ago

I will release this today later, once I have a time to cut the release. Thanks again!

jaydenseric commented 4 years ago

Looking forward to this being released, so I can remove some workarounds in apollo-upload-client before I publish an update soon:

https://github.com/jaydenseric/apollo-upload-client/blob/302051fd04d9854fa04f985ab94e99b91a425e92/test/public/createUploadLink.test.js#L424-L426

octet-stream commented 4 years ago

Totally forgot to publish the release. Sorry. It is available now.