feathers-mailer
Advanced tools
Comparing version 3.1.0 to 4.0.0
@@ -1,4 +0,25 @@ | ||
# Change Log | ||
# Changelog | ||
## [Unreleased](https://github.com/feathersjs-ecosystem/feathers-mailer/tree/HEAD) | ||
[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-mailer/compare/v3.1.0...HEAD) | ||
**Merged pull requests:** | ||
- npm update, Move to Github CI, Move to mocha@8 & Move to nyc [\#27](https://github.com/feathersjs-ecosystem/feathers-mailer/pull/27) ([fratzinger](https://github.com/fratzinger)) | ||
- fix typing error [\#24](https://github.com/feathersjs-ecosystem/feathers-mailer/pull/24) ([shakir-abdo](https://github.com/shakir-abdo)) | ||
- Update nodemailer to the latest version 🚀 [\#23](https://github.com/feathersjs-ecosystem/feathers-mailer/pull/23) ([greenkeeper[bot]](https://github.com/apps/greenkeeper)) | ||
- Update mocha to the latest version 🚀 [\#22](https://github.com/feathersjs-ecosystem/feathers-mailer/pull/22) ([greenkeeper[bot]](https://github.com/apps/greenkeeper)) | ||
- Update nodemailer to the latest version 🚀 [\#21](https://github.com/feathersjs-ecosystem/feathers-mailer/pull/21) ([greenkeeper[bot]](https://github.com/apps/greenkeeper)) | ||
- Update semistandard to the latest version 🚀 [\#20](https://github.com/feathersjs-ecosystem/feathers-mailer/pull/20) ([greenkeeper[bot]](https://github.com/apps/greenkeeper)) | ||
- Update debug to the latest version 🚀 [\#19](https://github.com/feathersjs-ecosystem/feathers-mailer/pull/19) ([greenkeeper[bot]](https://github.com/apps/greenkeeper)) | ||
- Clarify what you want for SMTP transporters... [\#18](https://github.com/feathersjs-ecosystem/feathers-mailer/pull/18) ([rayfoss](https://github.com/rayfoss)) | ||
- remove a historical callback [\#15](https://github.com/feathersjs-ecosystem/feathers-mailer/pull/15) ([bertho-zero](https://github.com/bertho-zero)) | ||
## [v3.1.0](https://github.com/feathersjs-ecosystem/feathers-mailer/tree/v3.1.0) (2021-08-03) | ||
[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-mailer/compare/v3.0.1...v3.1.0) | ||
## [v3.0.1](https://github.com/feathersjs-ecosystem/feathers-mailer/tree/v3.0.1) (2018-06-03) | ||
[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-mailer/compare/v3.0.0...v3.0.1) | ||
@@ -12,2 +33,3 @@ | ||
## [v3.0.0](https://github.com/feathersjs-ecosystem/feathers-mailer/tree/v3.0.0) (2018-02-14) | ||
[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-mailer/compare/v2.0.0...v3.0.0) | ||
@@ -24,2 +46,3 @@ | ||
## [v2.0.0](https://github.com/feathersjs-ecosystem/feathers-mailer/tree/v2.0.0) (2017-07-04) | ||
[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-mailer/compare/v1.0.6...v2.0.0) | ||
@@ -34,2 +57,3 @@ | ||
## [v1.0.6](https://github.com/feathersjs-ecosystem/feathers-mailer/tree/v1.0.6) (2017-02-07) | ||
[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-mailer/compare/v1.0.5...v1.0.6) | ||
@@ -43,2 +67,3 @@ | ||
## [v1.0.5](https://github.com/feathersjs-ecosystem/feathers-mailer/tree/v1.0.5) (2016-09-30) | ||
[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-mailer/compare/v1.0.4...v1.0.5) | ||
@@ -51,2 +76,3 @@ | ||
## [v1.0.4](https://github.com/feathersjs-ecosystem/feathers-mailer/tree/v1.0.4) (2016-03-05) | ||
[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-mailer/compare/v1.0.3...v1.0.4) | ||
@@ -59,5 +85,7 @@ | ||
## [v1.0.3](https://github.com/feathersjs-ecosystem/feathers-mailer/tree/v1.0.3) (2016-03-01) | ||
[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-mailer/compare/v1.0.2...v1.0.3) | ||
## [v1.0.2](https://github.com/feathersjs-ecosystem/feathers-mailer/tree/v1.0.2) (2016-02-29) | ||
[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-mailer/compare/1.0.0...v1.0.2) | ||
@@ -67,3 +95,6 @@ | ||
[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-mailer/compare/ea67e3769ae41258194552d27607311e5a45e81d...1.0.0) | ||
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* | ||
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* |
@@ -1,36 +0,38 @@ | ||
const Proto = require('uberproto'); | ||
const Mailer = require('nodemailer'); | ||
const debug = require('debug')('feathers-mailer'); | ||
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Service = void 0; | ||
const nodemailer_1 = require("nodemailer"); | ||
const debug_1 = __importDefault(require("debug")); | ||
const debug = (0, debug_1.default)('feathers-mailer'); | ||
class Service { | ||
constructor (transport, defaults) { | ||
debug('constructor', transport); | ||
if (!transport) { | ||
throw new Error('feathers-mailer: constructor `transport` must be provided'); | ||
constructor(transport, defaults) { | ||
debug('constructor', transport); | ||
if (!transport) { | ||
throw new Error('feathers-mailer: constructor `transport` must be provided'); | ||
} | ||
this.transporter = (0, nodemailer_1.createTransport)(transport, defaults); | ||
} | ||
this.transporter = Mailer.createTransport(transport, defaults); | ||
} | ||
extend (obj) { | ||
return Proto.extend(obj, this); | ||
} | ||
create (body, params) { | ||
debug('create', body, params); | ||
// TODO maybe body should be text/html field | ||
// and params is rest of options | ||
// https://github.com/nodemailer/nodemailer#set-up-smtp says: | ||
// If callback argument is not set then the method returns a Promise object. | ||
return this.transporter.sendMail(body); | ||
} | ||
async _create(body, params) { | ||
debug('create', body, params); | ||
// TODO maybe body should be text/html field | ||
// and params is rest of options | ||
// https://github.com/nodemailer/nodemailer#set-up-smtp says: | ||
// If callback argument is not set then the method returns a Promise object. | ||
return await this.transporter.sendMail(body); | ||
} | ||
create(body, params) { | ||
return this._create(body, params); | ||
} | ||
} | ||
module.exports = function init (transport, defaults) { | ||
return new Service(transport, defaults); | ||
}; | ||
module.exports.Service = Service; | ||
exports.Service = Service; | ||
function init(transport, defaults) { | ||
return new Service(transport, defaults); | ||
} | ||
exports.default = init; | ||
if (typeof module !== 'undefined') { | ||
module.exports = Object.assign(init, module.exports); | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "feathers-mailer", | ||
"description": "Feathers mailer service", | ||
"version": "3.1.0", | ||
"version": "4.0.0", | ||
"homepage": "https://github.com/feathersjs-ecosystem/feathers-mailer", | ||
"main": "lib/", | ||
"types": "lib/", | ||
"keywords": [ | ||
@@ -30,5 +31,7 @@ "feathers", | ||
"engines": { | ||
"node": ">= 6" | ||
"node": ">= 12" | ||
}, | ||
"scripts": { | ||
"prepublish": "npm run compile", | ||
"compile": "shx rm -rf lib/ && tsc", | ||
"publish": "git push origin --tags && npm run changelog && git push origin", | ||
@@ -40,30 +43,33 @@ "release:patch": "npm version patch && npm publish", | ||
"update-dependencies": "ncu -u", | ||
"lint": "semistandard --fix", | ||
"mocha": "mocha", | ||
"lint": "eslint src/**/*.ts test/**/*.ts --fix", | ||
"mocha": "cross-env NODE_ENV=test TS_NODE_PROJECT='tsconfig.test.json' mocha --timeout 10000", | ||
"test": "npm run lint && npm run coverage", | ||
"example": "babel-node examples/app", | ||
"coverage": "nyc npm run mocha" | ||
}, | ||
"semistandard": { | ||
"env": [ | ||
"mocha" | ||
] | ||
}, | ||
"directories": { | ||
"lib": "lib" | ||
"src": "src" | ||
}, | ||
"dependencies": { | ||
"debug": "^4.3.2", | ||
"nodemailer": "^6.6.3", | ||
"uberproto": "^2.0.6" | ||
"debug": "^4.3.4", | ||
"nodemailer": "^6.9.1" | ||
}, | ||
"devDependencies": { | ||
"@types/debug": "^4.1.7", | ||
"@types/mocha": "^10.0.1", | ||
"@types/node": "^18.14.1", | ||
"@types/nodemailer": "^6.4.7", | ||
"@types/nodemailer-stub-transport": "^1.1.5", | ||
"@typescript-eslint/eslint-plugin": "^5.53.0", | ||
"@typescript-eslint/parser": "^5.53.0", | ||
"address-rfc2822": "^2.1.0", | ||
"mocha": "^9.0.3", | ||
"nodemailer-mandrill-transport": "^1.2.0", | ||
"cross-env": "^7.0.3", | ||
"eslint": "^8.34.0", | ||
"mocha": "^10.2.0", | ||
"nodemailer-stub-transport": "^1.1.0", | ||
"npm-check-updates": "^11.8.3", | ||
"npm-check-updates": "^16.7.9", | ||
"nyc": "^15.1.0", | ||
"semistandard": "^16.0.1" | ||
"shx": "^0.3.4", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.9.5" | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
26667
2
14
294
17
2
- Removeduberproto@^2.0.6
- Removeduberproto@2.0.6(transitive)
Updateddebug@^4.3.4
Updatednodemailer@^6.9.1