postal-mime 2.7.2 → 2.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.7.3](https://github.com/postalsys/postal-mime/compare/v2.7.2...v2.7.3) (2026-01-09)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * correct TypeScript type definitions to match implementation ([b225d7c](https://github.com/postalsys/postal-mime/commit/b225d7cca422cb9bc3ab5301e94c4c0bef9a69e2))
9
+
3
10
  ## [2.7.2](https://github.com/postalsys/postal-mime/compare/v2.7.1...v2.7.2) (2026-01-08)
4
11
 
5
12
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # postal-mime
2
2
 
3
- **postal-mime** is an email parsing library that runs in browser environments (including Web Workers) and serverless functions (like Cloudflare Email Workers). It takes in a raw email message (RFC822 format) and outputs a structured object containing headers, recipients, attachments, and more.
3
+ **postal-mime** is an email parsing library for Node.js, browsers (including Web Workers), and serverless environments (like Cloudflare Email Workers). It takes in a raw email message (RFC822 format) and outputs a structured object containing headers, recipients, attachments, and more.
4
4
 
5
5
  > [!TIP]
6
6
  > PostalMime is developed by the makers of [EmailEngine](https://emailengine.app/?utm_source=github&utm_campaign=imapflow&utm_medium=readme-link)—a self-hosted email gateway that provides a REST API for IMAP and SMTP servers and sends webhooks whenever something changes in registered accounts.
@@ -243,7 +243,7 @@ if (email.from && isMailbox(email.from)) {
243
243
  PostalMime.parse(email, options) -> Promise<Email>
244
244
  ```
245
245
 
246
- - **email**: An RFC822 formatted email. This can be a `string`, `ArrayBuffer/Uint8Array`, `Blob` (browser only), `Buffer` (Node.js), or a [ReadableStream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream).
246
+ - **email**: An RFC822 formatted email. This can be a `string`, `ArrayBuffer/Uint8Array`, `Blob`, `Buffer` (Node.js), or a [ReadableStream](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream).
247
247
  - **options**: Optional configuration object:
248
248
  - **rfc822Attachments** (boolean, default: `false`): Treat `message/rfc822` attachments without a Content-Disposition as attachments.
249
249
  - **forceRfc822Attachments** (boolean, default: `false`): Treat _all_ `message/rfc822` parts as attachments.
@@ -419,6 +419,6 @@ console.log(decoded); // Hello, エポスカード
419
419
 
420
420
  ## License
421
421
 
422
- &copy; 2021–2025 Andris Reinman
422
+ &copy; 2021–2026 Andris Reinman
423
423
 
424
424
  `postal-mime` is licensed under the **MIT No Attribution license**.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "postal-mime",
3
- "version": "2.7.2",
4
- "description": "Email parser for browser environments",
3
+ "version": "2.7.3",
4
+ "description": "Email parser for Node.js and browser environments",
5
5
  "main": "./dist/postal-mime.cjs",
6
6
  "module": "./src/postal-mime.js",
7
7
  "exports": {
package/postal-mime.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  export type RawEmail = string | ArrayBuffer | Uint8Array | Blob | Buffer | ReadableStream;
2
2
 
3
3
  export type Header = {
4
+ /** Lowercase header name */
4
5
  key: string;
5
- originalKey: string;
6
+ /** Header value */
6
7
  value: string;
7
8
  };
8
9
 
@@ -35,7 +36,7 @@ export type Attachment = {
35
36
  description?: string;
36
37
  contentId?: string;
37
38
  method?: string;
38
- content: ArrayBuffer | Uint8Array | string;
39
+ content: ArrayBuffer | string;
39
40
  encoding?: "base64" | "utf8";
40
41
  };
41
42