diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 04f79c0..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,70 +0,0 @@ -'use strict'; - -module.exports = { - rules: { - indent: [2, 4, { - SwitchCase: 1 - }], - quotes: [2, 'single'], - 'linebreak-style': [2, 'unix'], - semi: [2, 'always'], - strict: [2, 'global'], - eqeqeq: 2, - 'dot-notation': 2, - curly: 2, - 'no-fallthrough': 2, - 'quote-props': [2, 'as-needed'], - 'no-unused-expressions': [2, { - allowShortCircuit: true - }], - 'no-unused-vars': 2, - 'no-undefined': 2, - 'handle-callback-err': 2, - 'no-new': 2, - 'new-cap': 2, - 'no-eval': 2, - 'no-invalid-this': 2, - radix: [2, 'always'], - 'no-use-before-define': [2, 'nofunc'], - 'callback-return': [2, ['callback', 'cb', 'done']], - 'comma-dangle': [2, 'never'], - 'comma-style': [2, 'last'], - 'no-regex-spaces': 2, - 'no-empty': 2, - 'no-duplicate-case': 2, - 'no-empty-character-class': 2, - 'no-redeclare': [2, { - builtinGlobals: true - }], - 'block-scoped-var': 2, - 'no-sequences': 2, - 'no-throw-literal': 2, - 'no-useless-call': 2, - 'no-useless-concat': 2, - 'no-void': 2, - yoda: 2, - 'no-undef': 2, - 'global-require': 2, - 'no-var': 2, - 'no-bitwise': 2, - 'no-lonely-if': 2, - 'no-mixed-spaces-and-tabs': 2, - 'arrow-body-style': [2, 'as-needed'], - 'arrow-parens': [2, 'as-needed'], - 'prefer-arrow-callback': 2, - 'object-shorthand': 2, - 'prefer-spread': 2 - }, - env: { - es6: true, - node: true - }, - extends: 'eslint:recommended', - globals: { - it: true, - describe: true, - beforeEach: true, - afterEach: true - }, - fix: true -}; diff --git a/.gitignore b/.gitignore index 0895281..f469b06 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ -node_modules +/coverage/ +/node_modules/ + +/.nyc_output/ + .DS_Store -examples diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 8a9ec42..0000000 --- a/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -.travis.yml -test -examples diff --git a/.travis.yml b/.travis.yml index ca80cd0..b2b8adc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,15 @@ -language: node_js sudo: false -node_js: - - 6 -notifications: - email: - - andris@kreata.ee - webhooks: - urls: - - https://webhooks.gitter.im/e/0ed18fd9b3e529b3c2cc - on_success: change # options: [always|never|change] default: always - on_failure: always # options: [always|never|change] default: always - on_start: false # default: false +language: node_js +matrix: + include: + - node_js: "7" + env: NPM_RUN_SCRIPT=test-coverage + - node_js: "6" +install: + - npm install + - if [ -n "$NPM_INSTALL_PACKAGES" ]; then npm install $NPM_INSTALL_PACKAGES; fi +script: + - npm run ${NPM_RUN_SCRIPT:-test} +after_script: + - npm install coveralls + - "test -f ./coverage/lcov.info && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c08316..32f6f2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## v3.2.1 2017-03-22 + + * Do not use grunt. + * Requires smtp-server-mit. + ## v3.1.0 2016-12-21 * use setKeepAlive(true) on newly created sockets diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 77e262b..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; - -module.exports = function (grunt) { - - // Project configuration. - grunt.initConfig({ - eslint: { - all: ['lib/*.js', 'test/*.js', 'Gruntfile.js'] - }, - - mochaTest: { - all: { - options: { - reporter: 'spec' - }, - src: ['test/*-test.js'] - } - } - }); - - // Load the plugin(s) - grunt.loadNpmTasks('grunt-eslint'); - grunt.loadNpmTasks('grunt-mocha-test'); - - // Tasks - grunt.registerTask('default', ['eslint', 'mochaTest']); -}; diff --git a/README.md b/README.md index bf3e4b9..039b222 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ -# smtp-connection +# smtp-connection-mit + +[![Build Status](https://secure.travis-ci.org/dex4er/js-smtp-connection-mit.svg)](http://travis-ci.org/dex4er/js-smtp-connection-mit) [![Coverage Status](https://coveralls.io/repos/github/dex4er/js-smtp-connection-mit/badge.svg)](https://coveralls.io/github/dex4er/js-smtp-connection-mit) [![npm](https://img.shields.io/npm/v/smtp-connection-mit.svg)](https://www.npmjs.com/package/smtp-connection-mit) + +This is a fork of [smtp-connection](https://www.npmjs.com/package/smtp-connection) module +just before it changed a license from MIT to EUPL-v1.1. SMTP client module. Connect to SMTP servers and send mail with it. @@ -17,13 +22,13 @@ This module is the successor for the client part of the (now deprecated) SMTP mo Install with npm ``` -npm install smtp-connection +npm install smtp-connection-mit ``` Require in your script ```javascript -const SMTPConnection = require('smtp-connection'); +const SMTPConnection = require('smtp-connection-mit'); ``` ### Create SMTPConnection instance diff --git a/lib/smtp-connection-mit.js b/lib/smtp-connection-mit.js new file mode 100644 index 0000000..745d025 --- /dev/null +++ b/lib/smtp-connection-mit.js @@ -0,0 +1 @@ +module.exports = require('./smtp-connection') diff --git a/package.json b/package.json index add142b..7fcee0e 100644 --- a/package.json +++ b/package.json @@ -1,45 +1,46 @@ { "name": "smtp-connection", - "version": "3.2.0", + "version": "3.2.1", "description": "Connect to SMTP servers", - "main": "lib/smtp-connection.js", + "main": "lib/smtp-connection-mit.js", "directories": { "test": "test" }, - "scripts": { - "test": "grunt mochaTest" - }, "repository": { "type": "git", - "url": "git://github.com/andris9/smtp-connection.git" + "url": "git://github.com/dex4er/js-smtp-connection-mit.git" }, "keywords": [ "SMTP" ], - "author": "Andris Reinman", + "author": "Piotr Roszatycki", "license": "MIT", "bugs": { - "url": "https://github.com/andris9/smtp-connection/issues" + "url": "https://github.com/dex4er/js-smtp-connection-mit/issues" + }, + "homepage": "http://github.com/dex4er/js-smtp-connection-mit", + "engines": { + "node": ">=6.0.0" + }, + "dependencies": { + "httpntlm": "1.7.3", + "nodemailer-shared": "2.0.0" }, - "homepage": "https://github.com/andris9/smtp-connection", "devDependencies": { "bunyan": "^1.8.5", "chai": "^3.5.0", - "grunt": "^1.0.1", - "grunt-cli": "^1.2.0", - "grunt-eslint": "^19.0.0", - "grunt-mocha-test": "^0.13.2", "mocha": "^3.2.0", + "nyc": "^10.1.2", "proxy-test-server": "^1.0.0", "sinon": "^1.17.6", - "smtp-server": "^1.17.0", + "smtp-server-mit": "^1.17.1", "xoauth2": "^1.2.0" }, - "dependencies": { - "httpntlm": "1.7.3", - "nodemailer-shared": "2.0.0" + "scripts": { + "test": "mocha", + "test-coverage": "nyc -r text -r lcov mocha" }, - "engines": { - "node": ">=6.0.0" + "nyc": { + "exclude": [] } } diff --git a/test/smtp-connection-test.js b/test/smtp-connection-test.js index 8b0d914..4909455 100644 --- a/test/smtp-connection-test.js +++ b/test/smtp-connection-test.js @@ -8,9 +8,9 @@ process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; var fs = require('fs'); var chai = require('chai'); var expect = chai.expect; -var SMTPConnection = require('../lib/smtp-connection'); +var SMTPConnection = require('../lib/smtp-connection-mit'); var packageData = require('../package.json'); -var SMTPServer = require('smtp-server').SMTPServer; +var SMTPServer = require('smtp-server-mit').SMTPServer; var HttpConnectProxy = require('proxy-test-server'); var net = require('net'); var xoauth2Server = require('./xoauth2-mock-server');