🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

libmime

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libmime - npm Package Compare versions

Comparing version
5.3.7
to
5.3.8
+8
-0
CHANGELOG.md
# Changelog
## [5.3.8](https://github.com/nodemailer/libmime/compare/v5.3.7...v5.3.8) (2026-04-08)
### Bug Fixes
* bump iconv-lite to 0.7.2 and refresh dev tooling ([176bde0](https://github.com/nodemailer/libmime/commit/176bde025f4d1ec1dc61266330ed1d2e11457c2c))
* charset.decode returns string for Japanese encodings ([c2cff8b](https://github.com/nodemailer/libmime/commit/c2cff8b6833d7c0d50d19bb1a63e8db1685cc866))
## [5.3.7](https://github.com/nodemailer/libmime/compare/v5.3.6...v5.3.7) (2025-06-26)

@@ -4,0 +12,0 @@

+5
-5

@@ -30,3 +30,3 @@ 'use strict';

* @param {String} [fromCharset='UTF-8'] Binary data is decoded into string using this charset
* @return {String} Decded string
* @return {String} Decoded string
*/

@@ -52,5 +52,5 @@ decode(buf, fromCharset) {

if (typeof output === 'string') {
output = Buffer.from(output);
return output;
}
return output;
// fall through to iconv-lite if convert returned something unexpected
} catch (err) {

@@ -71,3 +71,3 @@ // ignore, defaults to iconv-lite on error

*
* @param {String|Buffer} str String to be encoded
* @param {String|Buffer} data String or Buffer to be encoded
* @param {String} [fromCharset='UTF-8'] Source encoding for the string

@@ -97,3 +97,3 @@ * @return {Buffer} UTF-8 encoded typed array

* @param {String} charset Charset name to convert
* @return {String} Canoninicalized charset name
* @return {String} Canonicalized charset name
*/

@@ -100,0 +100,0 @@ normalizeCharset(charset) {

@@ -40,2 +40,3 @@ /* eslint no-control-regex: 0, no-div-regex: 0, quotes: 0 */

*
* @param {String} str String to be tested
* @param {Number} lineLength Max line length to check for

@@ -199,5 +200,8 @@ * @returns {Boolean} Returns true if there is at least one line longer than lineLength chars

/**
* Decode a complete mime word encoded string
* Decodes the inner payload of a single mime encoded-word into a unicode string.
* Expects the three components of `=?charset?encoding?text?=` already separated.
*
* @param {String} str Mime word encoded string
* @param {String} charset Charset name from the encoded-word (may include an RFC 2231 language tag, which is ignored)
* @param {String} encoding Encoding indicator, either 'Q' or 'B' (case insensitive)
* @param {String} str Encoded payload between the second `?` and the trailing `?=`
* @return {String} Decoded unicode string

@@ -262,3 +266,3 @@ */

* @param {Number} [maxLength=0] If set, split mime words into several chunks if needed
* @param {String} [fromCharset='UTF-8'] Source sharacter set
* @param {String} [fromCharset='UTF-8'] Source character set
* @return {String} String with possible mime words

@@ -306,3 +310,3 @@ */

*
* @param {String} str String including some mime words that will be encoded
* @param {String} str String including some mime words that will be decoded
* @return {String} Decoded unicode string

@@ -354,3 +358,3 @@ */

* @param {String} headerLine Single header line, might include linebreaks as well if folded
* @return {Object} And object of {key, value}
* @return {Object} An object of {key, value}
*/

@@ -605,5 +609,6 @@ decodeHeader(headerLine) {

*
* @param {String} key Parameter name (eg. 'filename')
* @param {String|Buffer} data String to be encoded
* @param {Number} [maxLength=50] Max length for generated chunks
* @param {String} [fromCharset='UTF-8'] Source sharacter set
* @param {String} [fromCharset='UTF-8'] Source character set
* @return {Array} A list of encoded keys and headers

@@ -772,4 +777,4 @@ */

*
* @param {String} extension Extension to be checked for
* @return {String} File extension
* @param {String} extension Extension (or filename) to be checked for
* @return {String} Content type
*/

@@ -807,3 +812,3 @@ detectMimeType(extension) {

* @param {Number} [lineLength=76] Maximum length of a line
* @param {Boolean} afterSpace If true, leave a space in th end of a line
* @param {Boolean} afterSpace If true, leave a space in the end of a line
* @return {String} String with folded lines

@@ -810,0 +815,0 @@ */

{
"name": "libmime",
"description": "Encode and decode quoted printable and base64 strings",
"version": "5.3.7",
"version": "5.3.8",
"main": "lib/libmime.js",

@@ -28,3 +28,3 @@ "files": [

"encoding-japanese": "2.2.0",
"iconv-lite": "0.6.3",
"iconv-lite": "0.7.2",
"libbase64": "1.3.0",

@@ -36,3 +36,3 @@ "libqp": "2.1.1"

"eslint-config-nodemailer": "1.2.0",
"eslint-config-prettier": "10.1.5",
"eslint-config-prettier": "10.1.8",
"grunt": "1.6.1",

@@ -42,4 +42,4 @@ "grunt-cli": "1.5.0",

"grunt-mocha-test": "0.13.3",
"mocha": "11.7.1"
"mocha": "11.7.5"
}
}

@@ -203,3 +203,3 @@ # libmime

libmime.detectExtension('logo.jpg') // returns 'image/jpeg'
libmime.detectMimeType('logo.jpg') // returns 'image/jpeg'

@@ -206,0 +206,0 @@ ## License