Socket
Socket
Sign inDemoInstall

formdata-node

Package Overview
Dependencies
2
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.4.0 to 2.5.0

10

lib/FormData.js

@@ -298,13 +298,15 @@ const {Readable} = require("stream")

filename = basename(
value.name
|| filename
filename
|| value.name
|| (value.constructor.name === "Blob" ? "blob" : String(value.name))
)
} else if (isStream(value) && (value.path || filename)) {
} else if (isStream(value) && (filename || value.path)) {
// Readable stream which created from fs.createReadStream
// have a "path" property. So, we can get a "filename"
// from the stream itself.
filename = basename(value.path || filename)
filename = basename(filename || value.path)
}
// TODO: Rewrite File and Blob normalization to make FormData create a new objects for them
// TODO: Also, don't forget to test for the filename priorities
// Normalize field content

@@ -311,0 +313,0 @@ if (isStream(value)) {

34

package.json
{
"name": "formdata-node",
"version": "2.4.0",
"version": "2.5.0",
"description": "FormData implementation for Node.js. Built over Readable stream and async generators.",

@@ -27,29 +27,29 @@ "repository": "octet-stream/form-data",

"test:types": "tsd",
"coverage": "nyc npm run test",
"report": "nyc npm run test && nyc report -r=html",
"ci": "nyc npm run test && nyc report -r=json"
"coverage": "c8 npm test",
"ci": "c8 npm test && c8 report --reporter=json"
},
"devDependencies": {
"@octetstream/eslint-config": "4.0.0",
"@types/node": "14.6.1",
"ava": "3.12.1",
"codecov": "3.7.2",
"eslint": "7.7.0",
"@octetstream/eslint-config": "5.0.0",
"@types/node": "14.14.31",
"ava": "3.15.0",
"c8": "7.6.0",
"codecov": "3.8.1",
"domexception": "2.0.1",
"eslint": "7.21.0",
"eslint-plugin-ava": "11.0.0",
"fetch-blob": "2.1.1",
"husky": "4.2.5",
"lint-staged": "10.2.13",
"husky": "4.3.0",
"lint-staged": "10.5.4",
"lodash.isplainobject": "4.0.6",
"nyc": "15.1.0",
"object-deep-from-entries": "0.3.0",
"proxyquire": "2.1.3",
"sinon": "9.0.3",
"supertest": "4.0.2",
"sinon": "9.2.4",
"supertest": "6.1.3",
"then-busboy": "4.4.0",
"tsd": "0.13.1",
"web-streams-polyfill": "3.0.0"
"tsd": "0.14.0",
"web-streams-polyfill": "3.0.2"
},
"dependencies": {
"mime-types": "2.1.27"
"mime-types": "2.1.29"
}
}

@@ -19,3 +19,3 @@ // <reference types="node" />

declare type FormDataFieldOptions = {
declare interface FormDataFieldOptions {
size?: number,

@@ -161,2 +161,4 @@ type?: string,

export {FormData as default, FormDataFieldOptions, FormDataFields, FormDataEntry, File}
export type {FormDataFieldOptions, FormDataFields, FormDataEntry, File}
export default FormData
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc