@postalsys/email-text-tools 2.4.9 → 2.4.11
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/.ncurc.js +6 -1
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +14 -0
- package/package.json +7 -7
- package/test/comprehensive.test.js +9 -0
- package/.github/codeql/codeql-config.yml +0 -11
- package/.github/workflows/codeql.yml +0 -47
package/.ncurc.js
CHANGED
|
@@ -4,6 +4,11 @@ module.exports = {
|
|
|
4
4
|
// Block package upgrades that moved to ESM
|
|
5
5
|
'nanoid',
|
|
6
6
|
'jsdom', // parse5 dependency in 27.0.1 is ESM only
|
|
7
|
-
'juice' // 12+ is pure ESM (requires Node >=22.12) and breaks pkg builds
|
|
7
|
+
'juice', // 12+ is pure ESM (requires Node >=22.12) and breaks pkg builds
|
|
8
|
+
'node-html-parser', // 8+ depends on entities@8, which is pure ESM (no require export) and breaks CJS/pkg builds on Node <20.19; stay on 7.x (uses he)
|
|
9
|
+
// 6.0.0 changed the CommonJS export shape (named bindings instead of the constructor) and,
|
|
10
|
+
// more importantly, stopped linkifying bare domains such as 'example.com' or 'www.example.org'
|
|
11
|
+
// by default, which silently breaks autolinking in plain text emails. Stay on 5.x.
|
|
12
|
+
'linkify-it'
|
|
8
13
|
]
|
|
9
14
|
};
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.4.11](https://github.com/postalsys/email-text-tools/compare/v2.4.10...v2.4.11) (2026-07-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **deps:** update dompurify and moment-timezone ([372ab61](https://github.com/postalsys/email-text-tools/commit/372ab6172b60b2096041111bdc47dad0b33da50f))
|
|
9
|
+
|
|
10
|
+
## [2.4.10](https://github.com/postalsys/email-text-tools/compare/v2.4.9...v2.4.10) (2026-07-05)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* pin node-html-parser to 7.1.0 to keep the dependency tree CommonJS ([9931194](https://github.com/postalsys/email-text-tools/commit/99311943d05159f2d99ede14f46713da7171d889))
|
|
16
|
+
|
|
3
17
|
## [2.4.9](https://github.com/postalsys/email-text-tools/compare/v2.4.8...v2.4.9) (2026-06-26)
|
|
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.11",
|
|
4
4
|
"description": "Email text tools",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
"homepage": "https://github.com/postalsys/email-text-tools#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@eslint/js": "10.0.1",
|
|
29
|
-
"eslint": "10.
|
|
29
|
+
"eslint": "10.7.0",
|
|
30
30
|
"eslint-config-prettier": "10.1.8",
|
|
31
|
-
"prettier": "3.
|
|
31
|
+
"prettier": "3.9.5"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"dompurify": "3.4.
|
|
34
|
+
"dompurify": "3.4.12",
|
|
35
35
|
"he": "1.2.0",
|
|
36
36
|
"html-to-text": "10.0.0",
|
|
37
37
|
"jsdom": "27.0.0",
|
|
38
38
|
"juice": "11.1.1",
|
|
39
|
-
"linkify-it": "5.0.
|
|
40
|
-
"moment-timezone": "0.6.
|
|
41
|
-
"node-html-parser": "
|
|
39
|
+
"linkify-it": "5.0.2",
|
|
40
|
+
"moment-timezone": "0.6.3",
|
|
41
|
+
"node-html-parser": "7.1.0",
|
|
42
42
|
"tlds": "1.261.0"
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -37,6 +37,15 @@ describe('Comprehensive Test Suite', () => {
|
|
|
37
37
|
assert.ok(html.includes('https://example.com'));
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
+
it('should linkify bare domains without a scheme', () => {
|
|
41
|
+
// linkify-it 6 stopped doing this by default, which silently dropped
|
|
42
|
+
// autolinking for plain text emails, so keep it covered
|
|
43
|
+
const html = textToHtml('Visit example.com and www.example.org today');
|
|
44
|
+
|
|
45
|
+
assert.ok(html.includes('<a href="http://example.com">example.com</a>'));
|
|
46
|
+
assert.ok(html.includes('<a href="http://www.example.org">www.example.org</a>'));
|
|
47
|
+
});
|
|
48
|
+
|
|
40
49
|
it('should handle email addresses', () => {
|
|
41
50
|
const text = 'Contact me at test@example.com';
|
|
42
51
|
const html = textToHtml(text);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
name: "email-text-tools CodeQL config"
|
|
2
|
-
|
|
3
|
-
# Exclude code that is not part of the published runtime from analysis.
|
|
4
|
-
# These paths generate only false-positive noise:
|
|
5
|
-
# - tests and fixtures intentionally feed malformed/hostile input
|
|
6
|
-
# - benchmarks and examples are developer-only helper scripts
|
|
7
|
-
paths-ignore:
|
|
8
|
-
- test
|
|
9
|
-
- '**/test/**'
|
|
10
|
-
- benchmark
|
|
11
|
-
- examples
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
name: "CodeQL Advanced"
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: ["main"]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: ["main"]
|
|
8
|
-
schedule:
|
|
9
|
-
- cron: "40 17 * * 6"
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
analyze:
|
|
13
|
-
name: Analyze (${{ matrix.language }})
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
permissions:
|
|
16
|
-
# required for all workflows
|
|
17
|
-
security-events: write
|
|
18
|
-
# required to fetch internal or private CodeQL packs
|
|
19
|
-
packages: read
|
|
20
|
-
# only required for workflows in private repositories
|
|
21
|
-
actions: read
|
|
22
|
-
contents: read
|
|
23
|
-
|
|
24
|
-
strategy:
|
|
25
|
-
fail-fast: false
|
|
26
|
-
matrix:
|
|
27
|
-
include:
|
|
28
|
-
- language: actions
|
|
29
|
-
build-mode: none
|
|
30
|
-
- language: javascript-typescript
|
|
31
|
-
build-mode: none
|
|
32
|
-
|
|
33
|
-
steps:
|
|
34
|
-
- name: Checkout repository
|
|
35
|
-
uses: actions/checkout@v6
|
|
36
|
-
|
|
37
|
-
- name: Initialize CodeQL
|
|
38
|
-
uses: github/codeql-action/init@v4
|
|
39
|
-
with:
|
|
40
|
-
languages: ${{ matrix.language }}
|
|
41
|
-
build-mode: ${{ matrix.build-mode }}
|
|
42
|
-
config-file: ./.github/codeql/codeql-config.yml
|
|
43
|
-
|
|
44
|
-
- name: Perform CodeQL Analysis
|
|
45
|
-
uses: github/codeql-action/analyze@v4
|
|
46
|
-
with:
|
|
47
|
-
category: "/language:${{ matrix.language }}"
|