postal-mime 2.2.4 → 2.2.6
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 +14 -0
- package/README.md +2 -1
- package/package.json +3 -3
- package/postal-mime.d.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.2.6](https://github.com/postalsys/postal-mime/compare/v2.2.5...v2.2.6) (2024-07-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **types:** Updated type for attachment.content to ArrayBuffer ([191524f](https://github.com/postalsys/postal-mime/commit/191524fa32ac550934fb17c074153cf9170622a0))
|
|
9
|
+
|
|
10
|
+
## [2.2.5](https://github.com/postalsys/postal-mime/compare/v2.2.4...v2.2.5) (2024-04-11)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **types:** Fixed Address type ([57908e4](https://github.com/postalsys/postal-mime/commit/57908e428929904ee312d9e95343a9fbf52542b4))
|
|
16
|
+
|
|
3
17
|
## [2.2.4](https://github.com/postalsys/postal-mime/compare/v2.2.3...v2.2.4) (2024-04-11)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -137,12 +137,13 @@ where
|
|
|
137
137
|
|
|
138
138
|
- **addressStr** is the header value for an address header
|
|
139
139
|
- **opts** is an optional options object
|
|
140
|
-
- **
|
|
140
|
+
- **flatten** is a boolean value. If set to `true`, then ignores address groups and returns a flat array of addresses. By default (`flatten` is `false`) the result might include nested groups
|
|
141
141
|
|
|
142
142
|
The result is an array of objects
|
|
143
143
|
|
|
144
144
|
- **name** is the name string. An empty string is used if name value was not set.
|
|
145
145
|
- **address** is the email address value
|
|
146
|
+
- **group** is an array of nested address objects. This is used when `flatten` is `false` (the default) and the address string contains address group syntax
|
|
146
147
|
|
|
147
148
|
```js
|
|
148
149
|
import { addressParser } from 'postal-mime';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postal-mime",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.6",
|
|
4
4
|
"description": "Email parser for browser environments",
|
|
5
5
|
"main": "./src/postal-mime.js",
|
|
6
6
|
"exports": {
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"author": "Andris Reinman",
|
|
28
28
|
"license": "MIT-0",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@types/node": "20.
|
|
30
|
+
"@types/node": "20.14.10",
|
|
31
31
|
"cross-blob": "3.0.2",
|
|
32
32
|
"cross-env": "7.0.3",
|
|
33
33
|
"eslint": "8.57.0",
|
|
34
34
|
"eslint-cli": "1.1.1",
|
|
35
|
-
"iframe-resizer": "4.
|
|
35
|
+
"iframe-resizer": "4.4.4"
|
|
36
36
|
}
|
|
37
37
|
}
|
package/postal-mime.d.ts
CHANGED
|
@@ -3,8 +3,9 @@ export type RawEmail = string | ArrayBuffer | Uint8Array | Blob | Buffer | Reada
|
|
|
3
3
|
export type Header = Record<string, string>;
|
|
4
4
|
|
|
5
5
|
export type Address = {
|
|
6
|
-
address: string;
|
|
7
6
|
name: string;
|
|
7
|
+
address?: string;
|
|
8
|
+
group?: Address[]
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
export type Attachment = {
|
|
@@ -15,7 +16,7 @@ export type Attachment = {
|
|
|
15
16
|
description?: string;
|
|
16
17
|
contentId?: string;
|
|
17
18
|
method?: string;
|
|
18
|
-
content:
|
|
19
|
+
content: ArrayBuffer;
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
export type Email = {
|