Skip to content

Commit

Permalink
Release v1.0.5 (#25)
Browse files Browse the repository at this point in the history
- ci: replace appveyor & travis with GitHub actions
- ci: add GHA shared workflows
- lint: prefer-template
- test: replace nodeunit with mocha
  • Loading branch information
msimerson committed Jun 6, 2022
1 parent 92c0cb4 commit 9631a43
Show file tree
Hide file tree
Showing 16 changed files with 223 additions and 214 deletions.
5 changes: 3 additions & 2 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ engines:
- javascript
eslint:
enabled: true
channel: "eslint-3"
channel: "eslint-8"
config:
config: ".eslintrc.json"
config: ".eslintrc.yaml"
fixme:
enabled: true
checks:
XXX:
enabled: false
TODO:
enabled: false

ratings:
paths:
- "**.js"
Expand Down
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 ]
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 @@ -35,3 +35,6 @@ jspm_packages

# Optional REPL history
.node_repl_history

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
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

28 changes: 23 additions & 5 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,41 @@
### Unreleased

## 1.0.4 - 2017-__-__

### [1.0.5] - 2022-06-05

- ci: replace appveyor & travis with GitHub actions
- ci: add GHA shared workflows
- lint: prefer-template
- test: replace nodeunit with mocha


### [1.0.4] - 2017-09-05

- drop node 4.x testing.

## 1.0.3 - 2017-08-06

### 1.0.3 - 2017-08-06

- corrected config path to always_ok setting

## 1.0.2 - 2017-07-30

### 1.0.2 - 2017-07-30

- declare booleans in config.get
- simplify a bunch of the follow-on code
- refactor away 5x redundancy
- remove Mooney-isms from nodeunit and use npm version

## 1.0.1 - 2017-06-13

### 1.0.1 - 2017-06-13

- Require higher haraka-constants so constants.OK is set properly

## 1.0.0 - 2016-11-09

### 1.0.0 - 2016-11-09

- import from haraka/Haraka


[1.0.4]: https://github.com/haraka/haraka-plugin-syslog/releases/tag/1.0.4
[1.0.5]: https://github.com/haraka/haraka-plugin-syslog/releases/tag/1.0.5
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
[![Code Climate][clim-img]][clim-url]

[![NPM][npm-img]][npm-url]
<!--[![Code Coverage][cov-img]][cov-url]-->

# haraka-plugin-syslog

Expand Down Expand Up @@ -85,12 +84,9 @@ Sane defaults are chosen for you.
This will case the plugin to always call next(OK).


[ci-img]: https://travis-ci.org/haraka/haraka-plugin-syslog.svg
[ci-url]: https://travis-ci.org/haraka/haraka-plugin-syslog
[cov-img]: https://codecov.io/github/haraka/haraka-plugin-syslog/coverage.svg
[cov-url]: https://codecov.io/github/haraka/haraka-plugin-syslog
[ci-img]: https://github.com/haraka/haraka-plugin-syslog/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/haraka/haraka-plugin-syslog/actions/workflows/ci.yml
[clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-syslog/badges/gpa.svg
[clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-syslog
[npm-img]: https://nodei.co/npm/haraka-plugin-syslog.png
[npm-url]: https://www.npmjs.com/package/haraka-plugin-syslog
[gk-img]: https://badges.greenkeeper.io/haraka/haraka-plugin-syslog.svg
20 changes: 0 additions & 20 deletions appveyor.yml

This file was deleted.

6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ exports.register = function () {

plugin.load_syslog_ini();

const name = plugin.cfg.general.name || 'haraka';
const name = plugin.cfg.general.name || 'haraka';
let facility = plugin.cfg.general.facility || 'MAIL';

['pid','odelay','cons','ndelay','nowait'].forEach(opt => {
if (!plugin.cfg.general[opt]) return;
options |= syslog['LOG_' + opt.toUpperCase() ];
options |= syslog[`LOG_${ opt.toUpperCase()}` ];
})

if (facility !== facility.toUpperCase()) facility = facility.toUpperCase();
Expand All @@ -38,7 +38,7 @@ exports.register = function () {
case 'LOCAL5':
case 'LOCAL6':
case 'LOCAL7':
syslog.init(name, options, syslog[ 'LOG_' + facility ]);
syslog.init(name, options, syslog[ `LOG_${ facility}` ]);
break;
default:
syslog.init(name, options, syslog.LOG_MAIL);
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-syslog",
"version": "1.0.4",
"version": "1.0.5",
"description": "Haraka plugin that logs to syslog",
"main": "index.js",
"scripts": {
"test": "node run_tests",
"lint": "node node_modules/.bin/eslint *.js test/*.js",
"lintfix": "node node_modules/.bin/eslint --fix *.js test/*.js",
"cover": "node node_modules/.bin/istanbul cover ./run_tests"
"test": "npx mocha",
"lint": "npx eslint *.js test",
"lintfix": "npx eslint --fix *.js test"
},
"repository": {
"type": "git",
Expand All @@ -19,7 +18,7 @@
"syslog",
"log"
],
"author": "Haraka Team <harakamail@gmail.com>",
"author": "Haraka Team <haraka.mail@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/haraka/haraka-plugin-syslog/issues"
Expand All @@ -30,9 +29,9 @@
"modern-syslog": "^1.1.4"
},
"devDependencies": {
"eslint": "*",
"eslint": ">=8",
"eslint-plugin-haraka": "*",
"haraka-test-fixtures": "*",
"nodeunit": "*"
"mocha": ">=9"
}
}
}
33 changes: 0 additions & 33 deletions run_tests

This file was deleted.

Loading

0 comments on commit 9631a43

Please sign in to comment.