Skip to content
Permalink
Branch: master
Commits on Mar 31, 2020
  1. Be more specific on the type of html (#43234)

    leafac committed Mar 31, 2020
  2. @types/smtp-server Make optional the callback to close() (#43268)

    leafac committed Mar 31, 2020
  3. @types/mailparser Fix nullability of ParsedEmail fields (#43323)

    leafac committed Mar 31, 2020
    | [Documentation](https://nodemailer.com/extras/mailparser/#mail-object) | Nullable for real | Current Types                          | Right? |
    | ---------------------------------------------------------------------- | ----------------- | -------------------------------------- | ------ |
    | `headers`                                                              | NO                | `headers: Headers`                     | YES    |
    | `subject`                                                              | YES               | `subject: string`                      | NO     |
    | `from`                                                                 | YES               | `from: AddressObject`                  | NO     |
    | `to`                                                                   | YES               | `to: AddressObject`                    | NO     |
    | `cc`                                                                   | YES               | `cc?: AddressObject`                   | YES    |
    | `bcc`                                                                  | YES               | `bcc?: AddressObject`                  | YES    |
    | `date`                                                                 | YES               | `date?: Date`                          | YES    |
    | `messageId`                                                            | YES               | `messageId?: string`                   | YES    |
    | `inReplyTo`                                                            | YES               | `inReplyTo?: string`                   | YES    |
    | `reply-to`                                                             | YES               | `replyTo?: AddressObject`              | YES    |
    | `references`                                                           | YES               | `references?: string[]`                | YES    |
    | `html`                                                                 | NO                | `html: string | boolean`               | YES    |
    | `text`                                                                 | YES               | `text: string`                         | NO     |
    | `textAsHtml`                                                           | YES               | `textAsHtml: string`                   | NO     |
    | `attachments`                                                          | NO                | `attachments?: Attachment[]`           | NO     |
    |                                                                        | NO                | `headerLines: HeaderLines`             | YES    |
    |                                                                        | YES               | `priority?: 'normal' | 'low' | 'high'` | YES    |
    
    I used the following program to determine the nullability of fields:
    
    ```ts
    import mailparser from "mailparser";
    
    (async () => {
      const email = await mailparser.simpleParser("");
      console.log(JSON.stringify(email, null, 2));
      console.log("headers: ", JSON.stringify(email.headers, null, 2));
      console.log("subject: ", JSON.stringify(email.subject, null, 2));
      console.log("from: ", JSON.stringify(email.from, null, 2));
      console.log("to: ", JSON.stringify(email.to, null, 2));
      console.log("cc: ", JSON.stringify(email.cc, null, 2));
      console.log("bcc: ", JSON.stringify(email.bcc, null, 2));
      console.log("date: ", JSON.stringify(email.date, null, 2));
      console.log("messageId: ", JSON.stringify(email.messageId, null, 2));
      console.log("inReplyTo: ", JSON.stringify(email.inReplyTo, null, 2));
      console.log("reply-to: ", JSON.stringify(email.replyTo, null, 2));
      console.log("references: ", JSON.stringify(email.references, null, 2));
      console.log("html: ", JSON.stringify(email.html, null, 2));
      console.log("text: ", JSON.stringify(email.text, null, 2));
      console.log("textAsHtml: ", JSON.stringify(email.textAsHtml, null, 2));
      console.log("attachments: ", JSON.stringify(email.attachments, null, 2));
    
      console.log("headerLines: ", JSON.stringify(email.headerLines, null, 2));
      console.log("priority: ", JSON.stringify(email.priority, null, 2));
    })();
    ```
Commits on Mar 22, 2020
  1. @types/shelljs Fix documentation (#43245)

    3 people committed Mar 22, 2020
    * @types/shelljs Fix documentation
    
    https://github.com/shelljs/shelljs/blob/a8452b89f2b9dd372da81e973a16074a5628b0b6/src/common.js#L26
    
    * Update types/shelljs/index.d.ts
    
    Co-Authored-By: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>
    
    Co-authored-by: Orta <orta.therox+github@gmail.com>
    Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com>
You can’t perform that action at this time.