Skip to content

Commit

Permalink
Release v1.0.3 (#18)
Browse files Browse the repository at this point in the history
- dep(async): bump version 3.0.1 -> 3.2.3
- ci: replace appveyor & travis with GitHub Actions
- ci: add GHA shared workflows
- lint: object-shorthand, prefer-template
  • Loading branch information
msimerson authored Jun 6, 2022
1 parent 8af154e commit 04fee5c
Show file tree
Hide file tree
Showing 17 changed files with 122 additions and 92 deletions.
6 changes: 3 additions & 3 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
engines:
engines:
eslint:
enabled: true
channel: "eslint-3"
channel: "eslint-8"
config:
config: ".eslintrc.json"
config: ".eslintrc.yaml"

ratings:
paths:
Expand Down
1 change: 1 addition & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ env:
node: true
es6: true
mocha: true
es2020: true

plugins:
- haraka
Expand Down
2 changes: 0 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ Checklist:
- [ ] docs updated
- [ ] tests updated
- [ ] Changes.md updated
- [ ] package.json.version bumped
- [ ] published to NPM (will be done by @core)
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
allow:
- dependency-type: production
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on: [ push ]

env:
CI: true

jobs:

lint:
uses: haraka/.github/.github/workflows/lint.yml@master

# coverage:
# uses: haraka/.github/.github/workflows/coverage.yml@master
# secrets: inherit

test:
needs: [ lint, get-lts ]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
node-version: ${{ fromJson(needs.get-lts.outputs.active) }}
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test

get-lts:
runs-on: ubuntu-latest
steps:
- id: get
uses: msimerson/node-lts-versions@v1
outputs:
active: ${{ steps.get.outputs.active }}
lts: ${{ steps.get.outputs.lts }}
13 changes: 13 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '18 7 * * 4'

jobs:
codeql:
uses: haraka/.github/.github/workflows/codeql.yml@master
14 changes: 14 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: publish

on:
push:
branches:
- master

env:
CI: true

jobs:
publish:
uses: haraka/.github/.github/workflows/publish.yml@master
secrets: inherit
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@ typings/

# dotenv environment variables file
.env

haraka-update.sh
package-lock.json
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule ".release"]
path = .release
url = git@github.com:msimerson/.release.git
1 change: 1 addition & 0 deletions .release
Submodule .release added at 9be2b2
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

22 changes: 19 additions & 3 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
# 1.0.2 - 2018-09-18

### Unreleased

### [1.0.3] - 2022-06-06

- dep(async): bump version 3.0.1 -> 3.2.3
- ci: replace appveyor & travis with GitHub Actions
- ci: add GHA shared workflows
- lint: object-shorthand, prefer-template


### 1.0.2 - 2018-09-18

- New: add PLAIN authentication

# 1.0.1 - 2018-03-24

### 1.0.1 - 2018-03-24

- Fix: properly load auth_ldap.ini

# 1.0.0 - 201_-__-__

### 1.0.0 - 2017-09-30

- initial release


[1.0.3]: https://github.com/haraka/haraka-plugin-auth-ldap/releases/tag/1.0.3
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[![Build Status][ci-img]][ci-url]
[![Windows Build Status][ci-win-img]][ci-win-url]
[![Code Climate][clim-img]][clim-url]
[![Greenkeeper badge][gk-img]][gk-url]
[![NPM][npm-img]][npm-url]

# haraka-plugin-auth-ldap
Expand Down Expand Up @@ -44,15 +42,11 @@ Example:


<!-- leave these buried at the bottom of the document -->
[ci-img]: https://travis-ci.org/haraka/haraka-plugin-auth-ldap.svg
[ci-url]: https://travis-ci.org/haraka/haraka-plugin-auth-ldap
[ci-win-img]: https://ci.appveyor.com/api/projects/status/6m1g2de9s9s3bnij?svg=true
[ci-win-url]: https://ci.appveyor.com/project/msimerson/haraka-plugin-auth-ldap
[ci-img]: https://github.com/haraka/haraka-plugin-auth-ldap/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/haraka/haraka-plugin-auth-ldap/actions/workflows/ci.yml
[cov-img]: https://codecov.io/github/haraka/haraka-plugin-auth-ldap/coverage.svg
[cov-url]: https://codecov.io/github/haraka/haraka-plugin-auth-ldap
[clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-auth-ldap/badges/gpa.svg
[clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-auth-ldap
[gk-img]: https://badges.greenkeeper.io/haraka/haraka-plugin-auth-ldap.svg
[gk-url]: https://greenkeeper.io/
[npm-img]: https://nodei.co/npm/haraka-plugin-auth-ldap.png
[npm-url]: https://www.npmjs.com/package/haraka-plugin-auth-ldap
20 changes: 0 additions & 20 deletions appveyor.yml

This file was deleted.

8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports.hook_capabilities = function (next, connection) {
// Don't offer AUTH capabilities by default unless session is encrypted
if (connection.tls.enabled) {
const methods = [ 'PLAIN', 'LOGIN' ];
connection.capabilities.push('AUTH ' + methods.join(' '));
connection.capabilities.push(`AUTH ${ methods.join(' ')}`);
connection.notes.allowed_auth_methods = methods;
}
next();
Expand Down Expand Up @@ -45,12 +45,12 @@ exports.check_plain_passwd = function (connection, user, passwd, cb) {
url: ldap_url,
timeout: (config.core.timeout != undefined) ? config.core.timeout : 5000,
tlsOptions: {
rejectUnauthorized: rejectUnauthorized
rejectUnauthorized
}
});

client.on('error', function (err) {
connection.loginfo('auth_ldap: client error ' + err.message);
connection.loginfo(`auth_ldap: client error ${ err.message}`);
cb(false);
});

Expand All @@ -62,7 +62,7 @@ exports.check_plain_passwd = function (connection, user, passwd, cb) {
dn = dn.replace(/%u/g, user);
client.bind(dn, passwd, function (err) {
if (err) {
connection.loginfo("auth_ldap: (" + dn + ") " + err.message);
connection.loginfo(`auth_ldap: (${ dn }) ${ err.message}`);
return callback(false);
}
else {
Expand Down
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"name": "haraka-plugin-auth-ldap",
"version": "1.0.2",
"version": "1.0.3",
"description": "Haraka plugin that uses an LDAP bind to authenticate users",
"main": "index.js",
"scripts": {
"lint": "./node_modules/.bin/eslint *.js test/**/*.js",
"lintfix": "./node_modules/.bin/eslint --fix *.js test/**/*.js",
"cover": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha",
"test": "./node_modules/.bin/_mocha"
"lint": "npx eslint *.js test",
"lintfix": "npx eslint --fix *.js test",
"test": "npx _mocha"
},
"repository": {
"type": "git",
Expand All @@ -25,13 +24,13 @@
},
"homepage": "https://github.com/haraka/haraka-plugin-auth-ldap#readme",
"devDependencies": {
"eslint": ">=3",
"eslint": ">=8",
"eslint-plugin-haraka": "*",
"haraka-test-fixtures": "*",
"mocha": "*"
"mocha": ">=9"
},
"dependencies": {
"async": "^3.0.1",
"ldapjs": "^1.0.1"
"async": "^3.2.3",
"ldapjs": "^1.0.2"
}
}
15 changes: 0 additions & 15 deletions test/.eslintrc.json

This file was deleted.

0 comments on commit 04fee5c

Please sign in to comment.