@postalsys/email-text-tools 2.4.1 → 2.4.3
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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +14 -0
- package/package.json +7 -7
- package/test/html-to-text.test.js +36 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.4.3](https://github.com/postalsys/email-text-tools/compare/v2.4.2...v2.4.3) (2026-03-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* bumped deps ([ff1a61c](https://github.com/postalsys/email-text-tools/commit/ff1a61c5a80dd0d42bfba373f577b3645bda4fe2))
|
|
9
|
+
|
|
10
|
+
## [2.4.2](https://github.com/postalsys/email-text-tools/compare/v2.4.1...v2.4.2) (2026-03-05)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* Bumped deps ([745d929](https://github.com/postalsys/email-text-tools/commit/745d929c0fae7601ff55309d673197397991e4c8))
|
|
16
|
+
|
|
3
17
|
## [2.4.1](https://github.com/postalsys/email-text-tools/compare/v2.4.0...v2.4.1) (2026-01-15)
|
|
4
18
|
|
|
5
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postalsys/email-text-tools",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.3",
|
|
4
4
|
"description": "Email text tools",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/postalsys/email-text-tools#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@eslint/js": "
|
|
29
|
-
"eslint": "
|
|
28
|
+
"@eslint/js": "10.0.1",
|
|
29
|
+
"eslint": "10.0.3",
|
|
30
30
|
"eslint-config-prettier": "10.1.8",
|
|
31
|
-
"prettier": "3.8.
|
|
31
|
+
"prettier": "3.8.1"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"dompurify": "3.3.
|
|
34
|
+
"dompurify": "3.3.3",
|
|
35
35
|
"he": "1.2.0",
|
|
36
36
|
"html-to-text": "9.0.5",
|
|
37
37
|
"jsdom": "27.0.0",
|
|
38
|
-
"juice": "11.1.
|
|
38
|
+
"juice": "11.1.1",
|
|
39
39
|
"linkify-it": "5.0.0",
|
|
40
40
|
"moment-timezone": "0.6.0",
|
|
41
|
-
"node-html-parser": "7.0
|
|
41
|
+
"node-html-parser": "7.1.0",
|
|
42
42
|
"tlds": "1.261.0"
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -14,7 +14,10 @@ describe('html-to-text conversion', () => {
|
|
|
14
14
|
assert.ok(text.includes('Line 3'));
|
|
15
15
|
|
|
16
16
|
// Check that lines are separated
|
|
17
|
-
const lines = text
|
|
17
|
+
const lines = text
|
|
18
|
+
.trim()
|
|
19
|
+
.split('\n')
|
|
20
|
+
.filter(l => l.trim());
|
|
18
21
|
assert.equal(lines.length, 3);
|
|
19
22
|
});
|
|
20
23
|
|
|
@@ -27,7 +30,10 @@ describe('html-to-text conversion', () => {
|
|
|
27
30
|
assert.ok(text.includes('Line 3'));
|
|
28
31
|
|
|
29
32
|
// Check that lines are separated
|
|
30
|
-
const lines = text
|
|
33
|
+
const lines = text
|
|
34
|
+
.trim()
|
|
35
|
+
.split('\n')
|
|
36
|
+
.filter(l => l.trim());
|
|
31
37
|
assert.equal(lines.length, 3);
|
|
32
38
|
});
|
|
33
39
|
|
|
@@ -40,7 +46,10 @@ describe('html-to-text conversion', () => {
|
|
|
40
46
|
assert.ok(text.includes('Paragraph 3'));
|
|
41
47
|
|
|
42
48
|
// Check that paragraphs are separated
|
|
43
|
-
const lines = text
|
|
49
|
+
const lines = text
|
|
50
|
+
.trim()
|
|
51
|
+
.split('\n')
|
|
52
|
+
.filter(l => l.trim());
|
|
44
53
|
assert.equal(lines.length, 3);
|
|
45
54
|
});
|
|
46
55
|
|
|
@@ -64,7 +73,10 @@ describe('html-to-text conversion', () => {
|
|
|
64
73
|
assert.ok(text.includes('User'));
|
|
65
74
|
|
|
66
75
|
// Verify structure is maintained
|
|
67
|
-
const lines = text
|
|
76
|
+
const lines = text
|
|
77
|
+
.split('\n')
|
|
78
|
+
.map(l => l.trim())
|
|
79
|
+
.filter(l => l);
|
|
68
80
|
assert.ok(lines.length >= 5, `Expected at least 5 lines, got ${lines.length}`);
|
|
69
81
|
});
|
|
70
82
|
|
|
@@ -77,7 +89,10 @@ describe('html-to-text conversion', () => {
|
|
|
77
89
|
assert.ok(text.includes('Item 3'));
|
|
78
90
|
|
|
79
91
|
// Each list item should be on a new line
|
|
80
|
-
const lines = text
|
|
92
|
+
const lines = text
|
|
93
|
+
.trim()
|
|
94
|
+
.split('\n')
|
|
95
|
+
.filter(l => l.trim());
|
|
81
96
|
assert.ok(lines.length >= 3);
|
|
82
97
|
});
|
|
83
98
|
|
|
@@ -91,7 +106,10 @@ describe('html-to-text conversion', () => {
|
|
|
91
106
|
assert.ok(text.includes('More content'));
|
|
92
107
|
|
|
93
108
|
// Headers should create separation
|
|
94
|
-
const lines = text
|
|
109
|
+
const lines = text
|
|
110
|
+
.trim()
|
|
111
|
+
.split('\n')
|
|
112
|
+
.filter(l => l.trim());
|
|
95
113
|
assert.ok(lines.length >= 4);
|
|
96
114
|
});
|
|
97
115
|
|
|
@@ -123,7 +141,10 @@ describe('html-to-text conversion', () => {
|
|
|
123
141
|
assert.ok(text.includes('Cell 4'));
|
|
124
142
|
|
|
125
143
|
// Rows should be separated
|
|
126
|
-
const lines = text
|
|
144
|
+
const lines = text
|
|
145
|
+
.trim()
|
|
146
|
+
.split('\n')
|
|
147
|
+
.filter(l => l.trim());
|
|
127
148
|
assert.ok(lines.length >= 2);
|
|
128
149
|
});
|
|
129
150
|
|
|
@@ -160,7 +181,10 @@ describe('html-to-text conversion', () => {
|
|
|
160
181
|
assert.ok(text.includes('Nested content'));
|
|
161
182
|
assert.ok(text.includes('Last paragraph'));
|
|
162
183
|
|
|
163
|
-
const lines = text
|
|
184
|
+
const lines = text
|
|
185
|
+
.trim()
|
|
186
|
+
.split('\n')
|
|
187
|
+
.filter(l => l.trim());
|
|
164
188
|
assert.equal(lines.length, 3);
|
|
165
189
|
});
|
|
166
190
|
|
|
@@ -208,7 +232,10 @@ describe('html-to-text conversion', () => {
|
|
|
208
232
|
assert.ok(text.includes('John'));
|
|
209
233
|
|
|
210
234
|
// Check structure is preserved
|
|
211
|
-
const lines = text
|
|
235
|
+
const lines = text
|
|
236
|
+
.trim()
|
|
237
|
+
.split('\n')
|
|
238
|
+
.filter(l => l.trim());
|
|
212
239
|
assert.ok(lines.length >= 7, `Expected at least 7 content lines, got ${lines.length}`);
|
|
213
240
|
|
|
214
241
|
// Items should be on separate lines
|