github mailgun/mailgun.js v12.0.0

15 hours ago

What's Changed

BREAKING:

  • Exports of TypeScript types, interfaces, and enums have been moved to the mailgun.js/definitions submodule.
    In case you need them, starting from version 12, please use

    import { MailgunClientOptions, MessagesSendResult } from 'mailgun.js/definitions';

    instead of

    import { MailgunClientOptions, MessagesSendResult } from 'mailgun.js';
  • AMD import no longer requires using the .default property.
    So now this is

    <script>
    require('./dist/AMD/mailgun.amd.js', function(Mailgun) {
     const mailgun = new Mailgun(FormData); // default property is not needed anymore
    }
    </script>

    Instead of

    <script>
    require('./dist/AMD/mailgun.amd.js', function(Mailgun) {
     const mailgun = new Mailgun.default(FormData);  // default property was required previously
    });
    </script>

Features:

  • Added ESM bundles for browser and Node.js environments

Other:

  • Webpack has been replaced by Rollup
  • Mocha has been replaced by Jest to use one test runner for all tests
  • Added new tests that check ESM bundles exports
  • Updated TS documentation

Full Changelog: v11.1.0...v12.0.0

Don't miss a new mailgun.js release

NewReleases is sending notifications on new releases.