diff --git a/.versions b/.versions index 417512c..5c236bd 100644 --- a/.versions +++ b/.versions @@ -27,9 +27,9 @@ html-tools@1.0.10 htmljs@1.0.10 id-map@1.0.8 jquery@1.11.9 -local-test:lookback:emails@0.7.6 +local-test:lookback:emails@0.7.7 logging@1.0.13_1 -lookback:emails@0.7.6 +lookback:emails@0.7.7 meteor@1.6.0 meteorhacks:picker@1.0.3 meteorhacks:ssr@2.2.0 diff --git a/README.md b/README.md index f94ca0d..a8bb6c9 100644 --- a/README.md +++ b/README.md @@ -507,6 +507,9 @@ Why not try [`meteor-logger`](https://github.com/lookback/meteor-logger)? :) ## Version history + +- `0.7.7` + - Fix [#80](https://github.com/lookback/meteor-emails/issues/80) by adding underscore to NPM dependancies (fixed in [#78](https://github.com/lookback/meteor-emails/pull/78), thanks @grabcode !). - `0.7.6` - Fix [#76](https://github.com/lookback/meteor-emails/issues/76) by finding the correct paths to email templates in unit and app test mode (fixed in [#78](https://github.com/lookback/meteor-emails/pull/78), thanks @thebarty !). - Update example app to Meteor 1.4.2. diff --git a/example/.meteor/versions b/example/.meteor/versions index 1a4dbb4..7bf3907 100644 --- a/example/.meteor/versions +++ b/example/.meteor/versions @@ -70,7 +70,6 @@ templating-runtime@1.2.15 templating-tools@1.0.5 tracker@1.1.1 ui@1.0.12 -underscore@1.0.10 url@1.0.11 webapp@1.2.11 webapp-hashing@1.0.9 diff --git a/lib/mailer.js b/lib/mailer.js index 5e4853a..a69a491 100644 --- a/lib/mailer.js +++ b/lib/mailer.js @@ -8,6 +8,7 @@ import RoutingMiddleware from './routing'; import TemplateHelpers from './template-helpers'; import Utils from './utils'; +import _ from 'underscore'; const TAG = 'mailer'; diff --git a/lib/routing.js b/lib/routing.js index 3897678..3f9fd40 100644 --- a/lib/routing.js +++ b/lib/routing.js @@ -8,6 +8,7 @@ // provided `route` prop from the template. import Utils from './utils'; +import _ from 'underscore'; const CONTENT_TYPES = { html: 'text/html', @@ -34,7 +35,7 @@ export default function Routing(template, settings, render, compile) { const previewAction = (type) => { check(type, Match.OneOf('html', 'text')); - return (req, res, params, _) => { + return (req, res, params) => { let data = null; try { @@ -83,7 +84,7 @@ export default function Routing(template, settings, render, compile) { }; }; - const sendAction = (req, res, params, _) => { + const sendAction = (req, res, params) => { const {to = settings.testEmail, cc, bcc} = params.query; Utils.Logger.info(`Sending ${template.name}…`); diff --git a/lib/utils.js b/lib/utils.js index e2a878a..249ad8e 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -3,6 +3,7 @@ const fs = Npm.require('fs'); const Path = Npm.require('path'); const htmlToText = Npm.require('html-to-text'); +const _ = Npm.require('underscore'); const isDevEnv = process.env.NODE_ENV === 'development'; const minorVersion = parseInt(Meteor.release.split('.')[1], 10); diff --git a/package.js b/package.js index 69b17f9..11e48b7 100644 --- a/package.js +++ b/package.js @@ -4,12 +4,13 @@ var where = 'server'; Package.describe({ name: 'lookback:emails', summary: 'Send HTML emails with server side Blaze templates. Preview and debug in the browser.', - version: '0.7.6', + version: '0.7.7', git: 'https://github.com/lookback/meteor-emails.git' }); Npm.depends({ - 'html-to-text': '2.1.3' + 'html-to-text': '2.1.3', + 'underscore': '1.8.3' }); Package.onUse(function(api) { @@ -25,7 +26,6 @@ Package.onUse(function(api) { api.use([ 'ecmascript@0.5.9', 'check', - 'underscore', 'email', 'sacha:juice@0.1.3', 'meteorhacks:ssr@2.2.0', @@ -42,7 +42,6 @@ Package.onUse(function(api) { Package.onTest(function(api) { api.use([ 'ecmascript', - 'underscore', 'dispatch:mocha', 'practicalmeteor:chai', 'lookback:emails', diff --git a/package.json b/package.json index 82c045a..36cee74 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lookback-emails", - "version": "0.7.6", + "version": "0.7.7", "description": "`lookback:emails` is a Meteor package that makes it easier to build, test and debug rich HTML emails.", "repository": { "type": "git",