libmime 5.1.0 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/libmime.js +6 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
package/lib/libmime.js
CHANGED
|
@@ -148,6 +148,12 @@ class Libmime {
|
|
|
148
148
|
let chr = encodedStr.charAt(i);
|
|
149
149
|
// check if we can add this character to the existing string
|
|
150
150
|
// without breaking byte length limit
|
|
151
|
+
|
|
152
|
+
if (/[\ud83c\ud83d\ud83e]/.test(chr) && i < len - 1) {
|
|
153
|
+
// composite emoji byte, so add the next byte as well
|
|
154
|
+
chr += encodedStr.charAt(++i);
|
|
155
|
+
}
|
|
156
|
+
|
|
151
157
|
if (Buffer.byteLength(lpart + chr) <= maxLength || i === 0) {
|
|
152
158
|
lpart += chr;
|
|
153
159
|
} else {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "libmime",
|
|
3
3
|
"description": "Encode and decode quoted printable and base64 strings",
|
|
4
|
-
"version": "5.1
|
|
4
|
+
"version": "5.2.1",
|
|
5
5
|
"main": "lib/libmime",
|
|
6
6
|
"homepage": "https://github.com/andris9/libmime",
|
|
7
7
|
"repository": {
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
"encoding-japanese": "2.0.0",
|
|
23
23
|
"iconv-lite": "0.6.3",
|
|
24
24
|
"libbase64": "1.2.1",
|
|
25
|
-
"libqp": "
|
|
25
|
+
"libqp": "2.0.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"chai": "4.3.
|
|
28
|
+
"chai": "4.3.7",
|
|
29
29
|
"eslint-config-nodemailer": "1.2.0",
|
|
30
|
-
"eslint-config-prettier": "8.
|
|
31
|
-
"grunt": "1.5.
|
|
30
|
+
"eslint-config-prettier": "8.6.0",
|
|
31
|
+
"grunt": "1.5.3",
|
|
32
32
|
"grunt-cli": "1.4.3",
|
|
33
|
-
"grunt-eslint": "24.0.
|
|
33
|
+
"grunt-eslint": "24.0.1",
|
|
34
34
|
"grunt-mocha-test": "0.13.3",
|
|
35
|
-
"mocha": "
|
|
35
|
+
"mocha": "10.2.0"
|
|
36
36
|
}
|
|
37
37
|
}
|