imapflow 1.0.200 → 1.1.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/.eslintrc +1 -2
- package/.github/CODE_OF_CONDUCT.md +13 -13
- package/.github/ISSUE_TEMPLATE/bug_report.md +10 -8
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -1
- package/.github/workflows/release.yaml +16 -17
- package/.github/workflows/test.yml +2 -2
- package/.ncurc.js +1 -1
- package/.prettierignore +4 -0
- package/.release-please-manifest.json +3 -0
- package/CHANGELOG.md +98 -0
- package/Gruntfile.js +1 -1
- package/eslint.config.js +43 -0
- package/lib/imap-flow.js +7 -8
- package/lib/jp-decoder.js +1 -1
- package/lib/tools.js +3 -3
- package/package.json +12 -7
- package/release-please-config.json +9 -0
- package/test/commands-test.js +6 -6
- package/test/connection-edge-cases-test.js +202 -129
- package/test/connection-test.js +17 -17
- package/test/fixtures/serialized-mimetorture.js +1 -2
- package/test/integration-test.js +10 -10
- package/test/search-compiler-test.js +34 -22
- package/test/special-use-test.js +1 -1
package/.eslintrc
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"rules": {
|
|
3
|
-
"indent": 0,
|
|
4
3
|
"no-await-in-loop": 0,
|
|
5
4
|
"require-atomic-updates": 0
|
|
6
5
|
},
|
|
@@ -10,7 +9,7 @@
|
|
|
10
9
|
"extends": ["nodemailer", "prettier"],
|
|
11
10
|
"parser": "@babel/eslint-parser",
|
|
12
11
|
"parserOptions": {
|
|
13
|
-
"ecmaVersion":
|
|
12
|
+
"ecmaVersion": 2020,
|
|
14
13
|
"sourceType": "script"
|
|
15
14
|
},
|
|
16
15
|
"plugins": ["@babel"]
|
|
@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
|
|
|
14
14
|
Examples of behavior that contributes to creating a positive environment
|
|
15
15
|
include:
|
|
16
16
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
17
|
+
- Using welcoming and inclusive language
|
|
18
|
+
- Being respectful of differing viewpoints and experiences
|
|
19
|
+
- Gracefully accepting constructive criticism
|
|
20
|
+
- Focusing on what is best for the community
|
|
21
|
+
- Showing empathy towards other community members
|
|
22
22
|
|
|
23
23
|
Examples of unacceptable behavior by participants include:
|
|
24
24
|
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
25
|
+
- The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
+
advances
|
|
27
|
+
- Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
+
- Public or private harassment
|
|
29
|
+
- Publishing others' private information, such as a physical or electronic
|
|
30
|
+
address, without explicit permission
|
|
31
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
+
professional setting
|
|
33
33
|
|
|
34
34
|
## Our Responsibilities
|
|
35
35
|
|
|
@@ -4,7 +4,6 @@ about: Create a report to help us improve
|
|
|
4
4
|
title: ''
|
|
5
5
|
labels: ''
|
|
6
6
|
assignees: ''
|
|
7
|
-
|
|
8
7
|
---
|
|
9
8
|
|
|
10
9
|
**Describe the bug**
|
|
@@ -12,6 +11,7 @@ A clear and concise description of what the bug is.
|
|
|
12
11
|
|
|
13
12
|
**To Reproduce**
|
|
14
13
|
Steps to reproduce the behavior:
|
|
14
|
+
|
|
15
15
|
1. Go to '...'
|
|
16
16
|
2. Click on '....'
|
|
17
17
|
3. Scroll down to '....'
|
|
@@ -24,15 +24,17 @@ A clear and concise description of what you expected to happen.
|
|
|
24
24
|
If applicable, add screenshots to help explain your problem.
|
|
25
25
|
|
|
26
26
|
**Desktop (please complete the following information):**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
|
|
28
|
+
- OS: [e.g. iOS]
|
|
29
|
+
- Browser [e.g. chrome, safari]
|
|
30
|
+
- Version [e.g. 22]
|
|
30
31
|
|
|
31
32
|
**Smartphone (please complete the following information):**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
|
|
34
|
+
- Device: [e.g. iPhone6]
|
|
35
|
+
- OS: [e.g. iOS8.1]
|
|
36
|
+
- Browser [e.g. stock browser, safari]
|
|
37
|
+
- Version [e.g. 22]
|
|
36
38
|
|
|
37
39
|
**Additional context**
|
|
38
40
|
Add any other context about the problem here.
|
|
@@ -6,32 +6,31 @@ on:
|
|
|
6
6
|
permissions:
|
|
7
7
|
contents: write
|
|
8
8
|
pull-requests: write
|
|
9
|
+
issues: write
|
|
9
10
|
id-token: write
|
|
10
11
|
|
|
11
12
|
name: release
|
|
12
13
|
jobs:
|
|
13
14
|
release-please:
|
|
14
15
|
runs-on: ubuntu-latest
|
|
16
|
+
outputs:
|
|
17
|
+
release_created: ${{ steps.release.outputs.release_created }}
|
|
15
18
|
steps:
|
|
16
|
-
- uses:
|
|
19
|
+
- uses: googleapis/release-please-action@v4
|
|
17
20
|
id: release
|
|
21
|
+
|
|
22
|
+
publish:
|
|
23
|
+
needs: release-please
|
|
24
|
+
if: ${{ needs.release-please.outputs.release_created }}
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
permissions:
|
|
27
|
+
contents: read
|
|
28
|
+
id-token: write
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
- uses: actions/setup-node@v4
|
|
18
32
|
with:
|
|
19
|
-
|
|
20
|
-
package-name: imapflow
|
|
21
|
-
pull-request-title-pattern: 'chore${scope}: release ${version} [skip-ci]'
|
|
22
|
-
# The logic below handles the npm publication:
|
|
23
|
-
- uses: actions/checkout@v3
|
|
24
|
-
# these if statements ensure that a publication only occurs when
|
|
25
|
-
# a new release is created:
|
|
26
|
-
if: ${{ steps.release.outputs.release_created }}
|
|
27
|
-
- uses: actions/setup-node@v3
|
|
28
|
-
with:
|
|
29
|
-
node-version: 18
|
|
33
|
+
node-version: 24
|
|
30
34
|
registry-url: 'https://registry.npmjs.org'
|
|
31
|
-
if: ${{ steps.release.outputs.release_created }}
|
|
32
35
|
- run: npm ci
|
|
33
|
-
if: ${{ steps.release.outputs.release_created }}
|
|
34
36
|
- run: npm publish --provenance --access public
|
|
35
|
-
env:
|
|
36
|
-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
37
|
-
if: ${{ steps.release.outputs.release_created }}
|
|
@@ -12,9 +12,9 @@ jobs:
|
|
|
12
12
|
os: [ubuntu-latest]
|
|
13
13
|
runs-on: ${{ matrix.os }}
|
|
14
14
|
steps:
|
|
15
|
-
- uses: actions/checkout@
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
16
|
- name: Use Node.js ${{ matrix.node }}
|
|
17
|
-
uses: actions/setup-node@
|
|
17
|
+
uses: actions/setup-node@v4
|
|
18
18
|
with:
|
|
19
19
|
node-version: ${{ matrix.node }}
|
|
20
20
|
- run: npm install
|
package/.ncurc.js
CHANGED
package/.prettierignore
ADDED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,103 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.1](https://github.com/postalsys/imapflow/compare/imapflow-v1.1.0...imapflow-v1.1.1) (2025-10-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* prevent race condition in initial IMAP greeting reception ([4841f79](https://github.com/postalsys/imapflow/commit/4841f79cd4a94067747c3139fb1de41df49ed533))
|
|
9
|
+
|
|
10
|
+
## [1.1.0](https://github.com/postalsys/imapflow/compare/imapflow-v1.0.200...imapflow-v1.1.0) (2025-10-23)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* added default SPECIAL-USE when given params to list ([e26953f](https://github.com/postalsys/imapflow/commit/e26953f4cdc1d1bc32d1432e4a6d841f60aca993))
|
|
16
|
+
* added default SPECIAL-USE when given params to list ([79e59f8](https://github.com/postalsys/imapflow/commit/79e59f8456d227ce1b587d86b573870aed4a1814))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* Add async yielding to compression readNext() to prevent CPU blocking ([18e806d](https://github.com/postalsys/imapflow/commit/18e806d5485defe6d4a0ef3eb502b17f3b2d8c2d))
|
|
22
|
+
* Add async yielding to lock processing loop ([fbf1d9a](https://github.com/postalsys/imapflow/commit/fbf1d9a3aa93b4733a123553d8be0b1785f4135e))
|
|
23
|
+
* Add async yielding to processInput() to prevent CPU blocking ([6b619ce](https://github.com/postalsys/imapflow/commit/6b619ced453c3ee8556e18646ad476ad82a68fbf))
|
|
24
|
+
* Add async yielding to reader() method to prevent CPU blocking ([40574e3](https://github.com/postalsys/imapflow/commit/40574e322be27d8b3cdd1b32416e8395d7e395b5))
|
|
25
|
+
* Add exponential backoff to FETCH retry logic ([fb99e2d](https://github.com/postalsys/imapflow/commit/fb99e2d26c9cb29e69b6d33083ef101264b4b039))
|
|
26
|
+
* Add rate limiting for compression operations ([f54c1d0](https://github.com/postalsys/imapflow/commit/f54c1d0caf1bd8cc41a0779e12c915adbb55f346))
|
|
27
|
+
* Added authzid option for AUTH=PLAIN authentication ([541c43a](https://github.com/postalsys/imapflow/commit/541c43ab0f15608c7d28f19c810e1a14bc8519bc))
|
|
28
|
+
* **address:** do not use '@' instead of empyt address if a field does not contain a value ([aeabbde](https://github.com/postalsys/imapflow/commit/aeabbded3bf3c6ba7266f79d4bc001980644da0d))
|
|
29
|
+
* Allow to call the connect method only once ([ca7ec96](https://github.com/postalsys/imapflow/commit/ca7ec969f19a93c5dc574bf3873cd7afc4d7af47))
|
|
30
|
+
* **api:** Add fetchAll method ([#207](https://github.com/postalsys/imapflow/issues/207)) ([bc09998](https://github.com/postalsys/imapflow/commit/bc09998270006ea6ff8430b3461619dd9b3e91c8))
|
|
31
|
+
* **atom:** Allow < and [ in an atom value ([53b96bb](https://github.com/postalsys/imapflow/commit/53b96bb347705bd96efa3bd2503784d5f501f728))
|
|
32
|
+
* **Authentication:** Report errors; Fix LOGINDISABLED ([#275](https://github.com/postalsys/imapflow/issues/275)) ([a3a3fb9](https://github.com/postalsys/imapflow/commit/a3a3fb993dee66c02b34bba0e0b26fc349487b26))
|
|
33
|
+
* **auth:** Fixed AUTHENTICATE LOGIN if server uses 'VXNlciBOYW1lAA==' for username ([86c08a7](https://github.com/postalsys/imapflow/commit/86c08a769e2a98fe59375857cd16661e804f79a7))
|
|
34
|
+
* **auth:** Prefer AUTH=LOGIN and AUTH=PLAIN to LOGIN ([3efd98a](https://github.com/postalsys/imapflow/commit/3efd98a5033db29228023302fc4663316b2b28fb))
|
|
35
|
+
* **bodystructure:** Handle invalid BODYSTRUCTURE from Bluemind mail server ([b63f861](https://github.com/postalsys/imapflow/commit/b63f861f2894d0a34583ad9ff512ef5071f63228))
|
|
36
|
+
* **bodystructure:** Handle unicode filenames for servers that do not know how to use parameter continuations ([2b4b240](https://github.com/postalsys/imapflow/commit/2b4b2408bf19a337958888f5f2bcdd9af86424c1))
|
|
37
|
+
* Bumped deps ([fd568db](https://github.com/postalsys/imapflow/commit/fd568db7c0087bcee9c21e7be079b00a53d77040))
|
|
38
|
+
* Bumped deps ([e7b06e1](https://github.com/postalsys/imapflow/commit/e7b06e16eead8b1654e8f516ab2f78c96bc703df))
|
|
39
|
+
* Bumped deps ([6efb9f6](https://github.com/postalsys/imapflow/commit/6efb9f6952ff1f17d80054edb3d46aa43d540756))
|
|
40
|
+
* **connection-failure:** Reject all pending commands, not just LOGOUT ([1b42a61](https://github.com/postalsys/imapflow/commit/1b42a6116a76bf8fc8a9cf9a0421b53c659a5e98))
|
|
41
|
+
* **copy:** Updated cipyright year to 2024 ([e3f5040](https://github.com/postalsys/imapflow/commit/e3f5040e8f90523e12108e978ac5002f8caa9e1e))
|
|
42
|
+
* Correct log source indicator for client commands ([bb3ea09](https://github.com/postalsys/imapflow/commit/bb3ea09c3135c131fc8bedd733311aa3fe176261))
|
|
43
|
+
* Date time format in IMAP requires space before a single digit ([#272](https://github.com/postalsys/imapflow/issues/272)) ([bdb6b09](https://github.com/postalsys/imapflow/commit/bdb6b09a9939e65e0342219539e13045ce3f6995))
|
|
44
|
+
* **deps:** Bumped dependencies ([e8f5e8c](https://github.com/postalsys/imapflow/commit/e8f5e8ce431debddeecf523fa8739ae5ad23c659))
|
|
45
|
+
* **deps:** Bumped deps ([53ccd8b](https://github.com/postalsys/imapflow/commit/53ccd8b1027782dcd2af6dd1f7d337007a7f79c0))
|
|
46
|
+
* **deps:** Bumped deps ([559aa72](https://github.com/postalsys/imapflow/commit/559aa72337018f21a3675f4521ce4aae87e0aabb))
|
|
47
|
+
* **deps:** Bumped Nodemailer version ([ee02764](https://github.com/postalsys/imapflow/commit/ee0276493494ecf08be557cc0c486fe309d359bf))
|
|
48
|
+
* destroy _inflate and _deflate streams if set ([eab274b](https://github.com/postalsys/imapflow/commit/eab274b15b2ea2ee93aa027fd874249b1860167e))
|
|
49
|
+
* do not allow too large IMAP literals ([680a44d](https://github.com/postalsys/imapflow/commit/680a44d6550d51fc00602c49d6c5a377046c3504))
|
|
50
|
+
* **docs:** Fixed mailbox property name in AppendResponseObject ([ca6d789](https://github.com/postalsys/imapflow/commit/ca6d789b761d3117f733ed7b026122098f4d9142))
|
|
51
|
+
* **exchange:** handle special error response from exchange ([3ed4198](https://github.com/postalsys/imapflow/commit/3ed4198c1b5504ab0b46926fec179c682988b2e3))
|
|
52
|
+
* **FETCH:** throw on failing FETCH ([12f9a45](https://github.com/postalsys/imapflow/commit/12f9a45530c6f3a2f35ba2968819011eea9c32b2))
|
|
53
|
+
* **fetc:** Treat 'Some of the requested messages no longer exist' as a success, not a failure ([565f988](https://github.com/postalsys/imapflow/commit/565f988178fc4a4d3989fe027451980f3ee0d412))
|
|
54
|
+
* **filename:** Fixed filename decoding for the download method ([68a8159](https://github.com/postalsys/imapflow/commit/68a8159a0988245bf3f7c9b002823b01d9d24876))
|
|
55
|
+
* Fixed race condition when opening multiple mailboxes simultaneusly ([1248f84](https://github.com/postalsys/imapflow/commit/1248f8494afe0cc2c9faf31642fa3ea045ec0453))
|
|
56
|
+
* **flag-colors:** added a method to set Flag Color. The color is also included in the Fetch response structure ([d840951](https://github.com/postalsys/imapflow/commit/d8409513075b864e9131665af3f1670a0714d05c))
|
|
57
|
+
* **idle:** Do not clear preCheck from other command ([cdf7643](https://github.com/postalsys/imapflow/commit/cdf7643952c975556e11a03ceca85f8a57fe1420))
|
|
58
|
+
* **idle:** removed unneeded variable ([da59d9a](https://github.com/postalsys/imapflow/commit/da59d9a960dd0992b22335902808a315b1cb6ded))
|
|
59
|
+
* **idle:** Treat preCheck as async function ([346bb43](https://github.com/postalsys/imapflow/commit/346bb430e2ddeeb877b5778f9f1bdfd97a83ee4c))
|
|
60
|
+
* **imap ID:** Re-request ID information if only a single key was returned ([87bc016](https://github.com/postalsys/imapflow/commit/87bc016ae677b4428916d4a2047abcdeb95950bb))
|
|
61
|
+
* **imap:** Fixed issue with a single + response ([51be3a9](https://github.com/postalsys/imapflow/commit/51be3a98205cc900eba6d3cf1962bc42a8de942d))
|
|
62
|
+
* **imap:** Support invalid servers that return a full partial instead of starting byte for a FETCH property ([7281ce9](https://github.com/postalsys/imapflow/commit/7281ce98683946f825b5bfec197beecad7867a70))
|
|
63
|
+
* improved error handling ([0b955e4](https://github.com/postalsys/imapflow/commit/0b955e4e4a4ce05cae61ae603b68b84f3e19539c))
|
|
64
|
+
* Improved exception handling ([0eb77ac](https://github.com/postalsys/imapflow/commit/0eb77ac28a0f36b085769b6f9a20fd89d9214060))
|
|
65
|
+
* Improved socket handler listener setup/cleanup ([0b72714](https://github.com/postalsys/imapflow/commit/0b727140866d220ff1df07d7245c60aa72e3be4a))
|
|
66
|
+
* **license:** Bumped license timeframe ([ce308b6](https://github.com/postalsys/imapflow/commit/ce308b66e5d30819c6bab7d75752528abc4b8436))
|
|
67
|
+
* **license:** bumped license timeframe in README ([9a04730](https://github.com/postalsys/imapflow/commit/9a047309d10c0ef056c53fba3493df9f2fea5a1d))
|
|
68
|
+
* **listTree:** pass listing options as an optional argument ([917ba80](https://github.com/postalsys/imapflow/commit/917ba80f21b2fe485154acd252d6565b838e73e6))
|
|
69
|
+
* **locking:** log extra information about locks ([9790ec5](https://github.com/postalsys/imapflow/commit/9790ec575f405820d05dd4777987a88e0a4e819d))
|
|
70
|
+
* **login:** Always treat username and password as strings, not atom ([01b3471](https://github.com/postalsys/imapflow/commit/01b347145551c046e4400b8824be9be3c69d353b))
|
|
71
|
+
* **login:** When using slashes in username (indicates an Exchange account or drive account), use LOGIN as the authentication mechanism ([7ac0036](https://github.com/postalsys/imapflow/commit/7ac00369a13ff35ed0b923b44e97ba933eee397c))
|
|
72
|
+
* **logout:** Fixed race condition for logout and TCP close. Fixes [#161](https://github.com/postalsys/imapflow/issues/161) ([39a7333](https://github.com/postalsys/imapflow/commit/39a7333a39499e4876abb29149f7c72f2f99a63d))
|
|
73
|
+
* **logs:** Log mailbox lock description ([ce87cf5](https://github.com/postalsys/imapflow/commit/ce87cf5a256ddc324624893a1c17992475fafeb3))
|
|
74
|
+
* Merge branch 'master' into mustang-im-trycatch ([b024a0a](https://github.com/postalsys/imapflow/commit/b024a0a6375e9e62b8f5a0e1183c34d7e39bd5b7))
|
|
75
|
+
* messageFlagsSet with empty flag array ([#268](https://github.com/postalsys/imapflow/issues/268)) ([7de471c](https://github.com/postalsys/imapflow/commit/7de471c80590284fab6747221d9bcc1491d2a505))
|
|
76
|
+
* micro-optimizations for parser ([3451ad2](https://github.com/postalsys/imapflow/commit/3451ad235532ca1a64a829f9f2f8e77bcef3a17d))
|
|
77
|
+
* migrated from mailsplit to [@zone](https://github.com/zone).eu/mailsplit ([464f5f6](https://github.com/postalsys/imapflow/commit/464f5f6d68c57c4a60d284f94811c440f96031cc))
|
|
78
|
+
* **MS365:** Wait until responding with a throttling response ([#142](https://github.com/postalsys/imapflow/issues/142)) ([09bfb3e](https://github.com/postalsys/imapflow/commit/09bfb3e1b90bdd37bc1c9b40e9284ad4afbd5c72))
|
|
79
|
+
* **parser:** Fixed DIGIT handling' ([75389f1](https://github.com/postalsys/imapflow/commit/75389f12036cf746e7fa490843d27ade26fe1e78))
|
|
80
|
+
* **parser:** parse subfolders with square brackets ([0d0e8a6](https://github.com/postalsys/imapflow/commit/0d0e8a6ea379adf11594684d49a1ce5031339939))
|
|
81
|
+
* **parsing:** Limit the depth of nested input ([c6cd7ce](https://github.com/postalsys/imapflow/commit/c6cd7cef9f9b8a1ff137a08e8aebf2555e596a23))
|
|
82
|
+
* **password-auth:** Added option auth.loginMethod to set specific authentication method ('LOGIN', 'AUTH=PLAIN', 'AUTH=LOGIN') ([ce3c339](https://github.com/postalsys/imapflow/commit/ce3c33908f5ad445b1a2fdcf2dfcbd4859413cf7))
|
|
83
|
+
* **readme:** testing note format ([3038c4d](https://github.com/postalsys/imapflow/commit/3038c4d9740af0a5161bbc45dd13b86d4febc0ac))
|
|
84
|
+
* **release:** Added package-lock ([e35bda8](https://github.com/postalsys/imapflow/commit/e35bda8a2b14503ba30a46b555df82ab1084cf5a))
|
|
85
|
+
* **release:** updated package-lock ([b59220f](https://github.com/postalsys/imapflow/commit/b59220f54a58111e0b3259c502ff51b2a624f397))
|
|
86
|
+
* **release:** updated provenance setting ([e178629](https://github.com/postalsys/imapflow/commit/e1786296569e5a0acfb997b007091925519c7d79))
|
|
87
|
+
* **release:** updated provenance setting ([4fd5fa8](https://github.com/postalsys/imapflow/commit/4fd5fa8aa74756c1b9ff166febf294acda4792b8))
|
|
88
|
+
* Remove diacritics in ID values ([c79df56](https://github.com/postalsys/imapflow/commit/c79df5619f3cc6db36d3657a4746a112d2f33b15))
|
|
89
|
+
* remove unneeded timer ([1867606](https://github.com/postalsys/imapflow/commit/1867606aaf5ea37935c460aca1b615ab2a2b6534))
|
|
90
|
+
* **search:** add a `not` option for search options ([#281](https://github.com/postalsys/imapflow/issues/281)) ([000686b](https://github.com/postalsys/imapflow/commit/000686b2ace1ef0e21cca64d8e056d1f7f7f8914))
|
|
91
|
+
* **search:** Prefer WITHIN YOUNGER/OLDER instead of BEFORE/SINCE for searches if possible ([7492ac9](https://github.com/postalsys/imapflow/commit/7492ac9bd5598beadee7a72e3e3c63e25e9bc1f5))
|
|
92
|
+
* **search:** Use the next day when searching BEFORE/SENTBEFORE to include current day in the range as well ([9e6d749](https://github.com/postalsys/imapflow/commit/9e6d749ac781c6240b3113f2ec8d329ad831d740))
|
|
93
|
+
* **socket:** Throw an error if trying to write to a closed socket ([1d8e941](https://github.com/postalsys/imapflow/commit/1d8e941485223c76c4f22080e985587349c0e458))
|
|
94
|
+
* **socket:** Use destroy() instead of destroySoon() ([830c2d1](https://github.com/postalsys/imapflow/commit/830c2d18f3d27eb12dc6babe4edd37fed5f65490))
|
|
95
|
+
* **special-use:** support custom special use flags for the Archive folder ([17aa6a8](https://github.com/postalsys/imapflow/commit/17aa6a8baf180a7349fe30f897184eb8e359a498))
|
|
96
|
+
* **throttling:** automatically retry throttled FETCH commands a few times ([07a9aea](https://github.com/postalsys/imapflow/commit/07a9aea37ae55ed885ccc4c0e3732b367ad82cd3))
|
|
97
|
+
* **tls:** If socket fails then clear upgrade timeout as well ([12c60d2](https://github.com/postalsys/imapflow/commit/12c60d23d46d3bb315ecb184fbd1eea709f93269))
|
|
98
|
+
* Trying to re-publish as previous release attempt failed, no actual changes ([d882816](https://github.com/postalsys/imapflow/commit/d8828163e87067182c6011abda109a17baabac35))
|
|
99
|
+
* **uidvalidity:** Do not expect UIDVALIDITY to always exist ([7761653](https://github.com/postalsys/imapflow/commit/7761653e92965a09be8a872813363eb81f7f3d9a))
|
|
100
|
+
|
|
3
101
|
## [1.0.200](https://github.com/postalsys/imapflow/compare/v1.0.199...v1.0.200) (2025-10-17)
|
|
4
102
|
|
|
5
103
|
|
package/Gruntfile.js
CHANGED
package/eslint.config.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { FlatCompat } = require('@eslint/eslintrc');
|
|
4
|
+
const js = require('@eslint/js');
|
|
5
|
+
|
|
6
|
+
const compat = new FlatCompat({
|
|
7
|
+
baseDirectory: __dirname,
|
|
8
|
+
recommendedConfig: js.configs.recommended
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
module.exports = [
|
|
12
|
+
{
|
|
13
|
+
ignores: ['node_modules/**', 'examples/**', 'docs/**']
|
|
14
|
+
},
|
|
15
|
+
...compat.extends('nodemailer', 'prettier'),
|
|
16
|
+
{
|
|
17
|
+
languageOptions: {
|
|
18
|
+
ecmaVersion: 2020,
|
|
19
|
+
sourceType: 'script',
|
|
20
|
+
globals: {
|
|
21
|
+
BigInt: 'readonly'
|
|
22
|
+
},
|
|
23
|
+
parser: require('@babel/eslint-parser'),
|
|
24
|
+
parserOptions: {
|
|
25
|
+
requireConfigFile: false
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
plugins: {
|
|
29
|
+
'@babel': require('@babel/eslint-plugin')
|
|
30
|
+
},
|
|
31
|
+
rules: {
|
|
32
|
+
'no-await-in-loop': 0,
|
|
33
|
+
'require-atomic-updates': 0
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
files: ['eslint.config.js', '.prettierrc.js', '.ncurc.js'],
|
|
38
|
+
rules: {
|
|
39
|
+
'global-require': 0,
|
|
40
|
+
strict: 0
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
];
|
package/lib/imap-flow.js
CHANGED
|
@@ -688,7 +688,7 @@ class ImapFlow extends EventEmitter {
|
|
|
688
688
|
isLogging: true
|
|
689
689
|
})
|
|
690
690
|
).toString();
|
|
691
|
-
} catch
|
|
691
|
+
} catch {
|
|
692
692
|
// ignore
|
|
693
693
|
}
|
|
694
694
|
|
|
@@ -1598,6 +1598,7 @@ class ImapFlow extends EventEmitter {
|
|
|
1598
1598
|
this.log.info(logInfo);
|
|
1599
1599
|
|
|
1600
1600
|
this.setSocketHandlers();
|
|
1601
|
+
this.setEventHandlers();
|
|
1601
1602
|
this.socket.pipe(this.streamer);
|
|
1602
1603
|
|
|
1603
1604
|
// executed by initial "* OK"
|
|
@@ -1633,8 +1634,6 @@ class ImapFlow extends EventEmitter {
|
|
|
1633
1634
|
this.log.error({ err, cid: this.id });
|
|
1634
1635
|
reject(err);
|
|
1635
1636
|
});
|
|
1636
|
-
|
|
1637
|
-
this.setEventHandlers();
|
|
1638
1637
|
});
|
|
1639
1638
|
}
|
|
1640
1639
|
|
|
@@ -2894,7 +2893,7 @@ class ImapFlow extends EventEmitter {
|
|
|
2894
2893
|
meta.disposition = disposition.value.toLowerCase().trim() || false;
|
|
2895
2894
|
try {
|
|
2896
2895
|
meta.disposition = libmime.decodeWords(meta.disposition);
|
|
2897
|
-
} catch
|
|
2896
|
+
} catch {
|
|
2898
2897
|
// failed to parse disposition, keep as is (most probably an unknown charset is used)
|
|
2899
2898
|
}
|
|
2900
2899
|
}
|
|
@@ -2910,7 +2909,7 @@ class ImapFlow extends EventEmitter {
|
|
|
2910
2909
|
if (filename) {
|
|
2911
2910
|
try {
|
|
2912
2911
|
filename = libmime.decodeWords(filename);
|
|
2913
|
-
} catch
|
|
2912
|
+
} catch {
|
|
2914
2913
|
// failed to parse filename, keep as is (most probably an unknown charset is used)
|
|
2915
2914
|
}
|
|
2916
2915
|
meta.filename = filename;
|
|
@@ -2955,7 +2954,7 @@ class ImapFlow extends EventEmitter {
|
|
|
2955
2954
|
output = output.pipe(decoder);
|
|
2956
2955
|
// force to utf-8 for output
|
|
2957
2956
|
meta.charset = 'utf-8';
|
|
2958
|
-
} catch
|
|
2957
|
+
} catch {
|
|
2959
2958
|
// do not decode charset
|
|
2960
2959
|
}
|
|
2961
2960
|
}
|
|
@@ -3174,7 +3173,7 @@ class ImapFlow extends EventEmitter {
|
|
|
3174
3173
|
data[key].meta.disposition = disposition.value.toLowerCase().trim() || false;
|
|
3175
3174
|
try {
|
|
3176
3175
|
data[key].meta.disposition = libmime.decodeWords(data[key].meta.disposition);
|
|
3177
|
-
} catch
|
|
3176
|
+
} catch {
|
|
3178
3177
|
// failed to parse disposition, keep as is (most probably an unknown charset is used)
|
|
3179
3178
|
}
|
|
3180
3179
|
}
|
|
@@ -3190,7 +3189,7 @@ class ImapFlow extends EventEmitter {
|
|
|
3190
3189
|
if (filename) {
|
|
3191
3190
|
try {
|
|
3192
3191
|
filename = libmime.decodeWords(filename);
|
|
3193
|
-
} catch
|
|
3192
|
+
} catch {
|
|
3194
3193
|
// failed to parse filename, keep as is (most probably an unknown charset is used)
|
|
3195
3194
|
}
|
|
3196
3195
|
data[key].meta.filename = filename;
|
package/lib/jp-decoder.js
CHANGED
package/lib/tools.js
CHANGED
|
@@ -21,7 +21,7 @@ const tools = {
|
|
|
21
21
|
if (!connection.enabled.has('UTF8=ACCEPT') && /[&\x00-\x08\x0b-\x0c\x0e-\x1f\u0080-\uffff]/.test(path)) {
|
|
22
22
|
try {
|
|
23
23
|
path = iconv.encode(path, 'utf-7-imap').toString();
|
|
24
|
-
} catch
|
|
24
|
+
} catch {
|
|
25
25
|
// ignore, keep name as is
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -33,7 +33,7 @@ const tools = {
|
|
|
33
33
|
if (!connection.enabled.has('UTF8=ACCEPT') && /[&]/.test(path)) {
|
|
34
34
|
try {
|
|
35
35
|
path = iconv.decode(Buffer.from(path), 'utf-7-imap').toString();
|
|
36
|
-
} catch
|
|
36
|
+
} catch {
|
|
37
37
|
// ignore, keep name as is
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -392,7 +392,7 @@ const tools = {
|
|
|
392
392
|
if (/[0x80-0xff]/.test(path)) {
|
|
393
393
|
try {
|
|
394
394
|
path = iconv.encode(path, 'utf-7-imap').toString();
|
|
395
|
-
} catch
|
|
395
|
+
} catch {
|
|
396
396
|
// ignore
|
|
397
397
|
}
|
|
398
398
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "imapflow",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "IMAP Client for Node",
|
|
5
5
|
"main": "lib/imap-flow.js",
|
|
6
6
|
"types": "lib/imap-flow.d.ts",
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
"docs": "rm -rf docs && mkdir -p docs && jsdoc lib/imap-flow.js -c jsdoc.json -R README.md --destination docs/ && cp assets/favicon.ico docs",
|
|
11
11
|
"build": "npm run docs",
|
|
12
12
|
"st": "npm run docs && st -d docs -i index.html",
|
|
13
|
-
"update": "rm -rf node_modules package-lock.json && ncu -u && npm install"
|
|
13
|
+
"update": "rm -rf node_modules package-lock.json && ncu -u && npm install",
|
|
14
|
+
"format": "prettier --write \"**/*.{js,json,md,yml,yaml}\" --ignore-path .prettierignore",
|
|
15
|
+
"lint": "eslint ."
|
|
14
16
|
},
|
|
15
17
|
"repository": {
|
|
16
18
|
"type": "git",
|
|
@@ -32,16 +34,19 @@
|
|
|
32
34
|
"@babel/eslint-plugin": "7.27.1",
|
|
33
35
|
"@babel/plugin-syntax-class-properties": "7.12.13",
|
|
34
36
|
"@babel/preset-env": "7.28.3",
|
|
35
|
-
"@
|
|
36
|
-
"eslint": "
|
|
37
|
+
"@eslint/eslintrc": "3.3.1",
|
|
38
|
+
"@eslint/js": "9.19.0",
|
|
39
|
+
"@types/node": "24.9.1",
|
|
40
|
+
"eslint": "9.19.0",
|
|
37
41
|
"eslint-config-nodemailer": "1.2.0",
|
|
38
|
-
"eslint-config-prettier": "
|
|
42
|
+
"eslint-config-prettier": "10.1.8",
|
|
39
43
|
"grunt": "1.6.1",
|
|
40
44
|
"grunt-cli": "1.5.0",
|
|
41
45
|
"grunt-contrib-nodeunit": "5.0.0",
|
|
42
46
|
"grunt-eslint": "24.3.0",
|
|
43
47
|
"imapflow-jsdoc-template": "3.4.0-imapflow.3",
|
|
44
48
|
"jsdoc": "4.0.4",
|
|
49
|
+
"prettier": "3.6.2",
|
|
45
50
|
"st": "3.0.3",
|
|
46
51
|
"typescript": "5.9.3"
|
|
47
52
|
},
|
|
@@ -52,8 +57,8 @@
|
|
|
52
57
|
"libmime": "5.3.7",
|
|
53
58
|
"libqp": "2.1.1",
|
|
54
59
|
"@zone-eu/mailsplit": "5.4.7",
|
|
55
|
-
"nodemailer": "7.0.
|
|
56
|
-
"pino": "10.
|
|
60
|
+
"nodemailer": "7.0.10",
|
|
61
|
+
"pino": "10.1.0",
|
|
57
62
|
"socks": "2.8.7"
|
|
58
63
|
}
|
|
59
64
|
}
|
package/test/commands-test.js
CHANGED
|
@@ -7,7 +7,7 @@ module.exports['Commands: Client instantiation'] = test => {
|
|
|
7
7
|
host: 'imap.example.com',
|
|
8
8
|
auth: { user: 'test', pass: 'test' }
|
|
9
9
|
});
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
test.ok(client);
|
|
12
12
|
test.equal(typeof client.exec, 'function');
|
|
13
13
|
test.done();
|
|
@@ -18,7 +18,7 @@ module.exports['Commands: Method availability'] = test => {
|
|
|
18
18
|
host: 'imap.example.com',
|
|
19
19
|
auth: { user: 'test', pass: 'test' }
|
|
20
20
|
});
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
// Check that key IMAP methods exist
|
|
23
23
|
test.equal(typeof client.connect, 'function');
|
|
24
24
|
test.equal(typeof client.logout, 'function');
|
|
@@ -35,7 +35,7 @@ module.exports['Commands: State management methods'] = test => {
|
|
|
35
35
|
host: 'imap.example.com',
|
|
36
36
|
auth: { user: 'test', pass: 'test' }
|
|
37
37
|
});
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
test.equal(typeof client.mailboxCreate, 'function');
|
|
40
40
|
test.equal(typeof client.mailboxDelete, 'function');
|
|
41
41
|
test.equal(typeof client.mailboxRename, 'function');
|
|
@@ -49,7 +49,7 @@ module.exports['Commands: Message operation methods'] = test => {
|
|
|
49
49
|
host: 'imap.example.com',
|
|
50
50
|
auth: { user: 'test', pass: 'test' }
|
|
51
51
|
});
|
|
52
|
-
|
|
52
|
+
|
|
53
53
|
test.equal(typeof client.messageFlagsSet, 'function');
|
|
54
54
|
test.equal(typeof client.messageFlagsAdd, 'function');
|
|
55
55
|
test.equal(typeof client.messageFlagsRemove, 'function');
|
|
@@ -64,10 +64,10 @@ module.exports['Commands: Utility methods'] = test => {
|
|
|
64
64
|
host: 'imap.example.com',
|
|
65
65
|
auth: { user: 'test', pass: 'test' }
|
|
66
66
|
});
|
|
67
|
-
|
|
67
|
+
|
|
68
68
|
test.equal(typeof client.noop, 'function');
|
|
69
69
|
test.equal(typeof client.getQuota, 'function');
|
|
70
70
|
test.equal(typeof client.stats, 'function');
|
|
71
71
|
test.equal(typeof client.getRandomId, 'function');
|
|
72
72
|
test.done();
|
|
73
|
-
};
|
|
73
|
+
};
|