Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mailgun.js

Package Overview
Dependencies
Maintainers
4
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailgun.js - npm Package Compare versions

Comparing version 3.5.5 to 3.5.6

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [3.5.6](https://github.com/mailgun/mailgun-js/compare/v3.5.5...v3.5.6) (2021-08-12)
### Bug Fixes
* Blob and buffer attachments not working ([ad69bda](https://github.com/mailgun/mailgun-js/commits/ad69bdaed5627d62571f58b1a79ac870c5086b14))
### [3.5.5](https://github.com/mailgun/mailgun-js/compare/v3.5.4...v3.5.5) (2021-08-09)

@@ -7,0 +14,0 @@

2

dist/mailgun.js.LICENSE.txt

@@ -5,2 +5,2 @@ /*! MIT License © Sindre Sorhus */

/*! mailgun.js v3.5.4 */
/*! mailgun.js v3.5.5 */

@@ -155,2 +155,13 @@ import base64 from 'base-64';

createFormData(data: any): IFormData {
const appendFileToFD = (key: string, obj : any, formDataInstance: IFormData): void => {
const isStreamData = isStream(obj);
const objData = isStreamData ? obj : obj.data;
const options = getAttachmentOptions(obj);
if (isStreamData) {
formDataInstance.append(key, objData, options);
return;
}
formDataInstance.append(key, objData, options.filename);
};
const formData: IFormData = Object.keys(data)

@@ -164,10 +175,6 @@ .filter(function (key) { return data[key]; })

obj.forEach(function (item) {
const itemData = isStream(item) ? item : item.data;
const options = getAttachmentOptions(item);
(formDataAcc as any).append(key, itemData, options);
appendFileToFD(key, item, formDataAcc);
});
} else {
const objData = isStream(obj) ? obj : obj.data;
const options = getAttachmentOptions(obj);
(formDataAcc as any).append(key, objData, options);
appendFileToFD(key, obj, formDataAcc);
}

@@ -174,0 +181,0 @@

{
"name": "mailgun.js",
"version": "3.5.5",
"version": "3.5.6",
"main": "dist/mailgun.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc