Skip to content

Commit

Permalink
Merge pull request #39 from haraka/release-1.0.6
Browse files Browse the repository at this point in the history
- feat: update redis commands to be v4 compatible
- feat: only load redis when needed, fixes #23
- style: replaced callbacks with async/await in:
    get_host_key, get_mail_key, and rate_limit
- dep(eslint): v6 -> v8
- dep(redis): 3 -> 4
- ci: add codeql & publish
  • Loading branch information
msimerson authored May 26, 2022
2 parents 70b7900 + a06027b commit 8541cc3
Show file tree
Hide file tree
Showing 18 changed files with 409 additions and 484 deletions.
11 changes: 10 additions & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
engines:
eslint:
enabled: true
channel: "eslint-6"
channel: "eslint-8"
config:
config: ".eslintrc.yaml"

checks:
return-statements:
enabled: false
similar-code:
enabled: false
method-complexity:
config:
threshold: 10

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

plugins: [ haraka ]

Expand Down
35 changes: 18 additions & 17 deletions .github/workflows/ci-test.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
name: Tests
name: CI

on: [ push ]
on:
- push

env:
CI: true

jobs:

ci-test:
lint:
uses: haraka/.github/.github/workflows/lint.yml@master

test:
needs: lint
runs-on: ${{ matrix.os }}

services:
redis:
image: redis
ports:
- 6379:6379
strategy:
matrix:
os:
- ubuntu-latest
# - windows-latest (no redis yet)
node-version:
- 12
- 14
- 16
node-version: [ 14, 16, 18 ]
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
with:
node-version: ${{ matrix.node-version }}

- name: Start Redis
uses: supercharge/redis-github-action@1.2.0
with:
redis-version: ${{ matrix.redis-version }}

- run: npm install
- run: npm test
env:
CI: true
14 changes: 14 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: CodeQL

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '18 7 * * 4'

jobs:
codeql:
uses: haraka/.github/.github/workflows/codeql.yml@master
32 changes: 0 additions & 32 deletions .github/workflows/coveralls.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/lint.yml

This file was deleted.

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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ jspm_packages

# Optional REPL history
.node_repl_history

package-lock.json
26 changes: 20 additions & 6 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,38 @@
## 1.0.5 - 2022-03-08

### 1.0.6 - 2022-05-25

- feat: update redis commands to be v4 compatible
- feat: only load redis when needed, fixes #23
- style: replaced callbacks with async/await in:
get_host_key, get_mail_key, and rate_limit
- dep(eslint): v6 -> v8
- dep(redis): 3 -> 4
- ci: add codeql & publish


### 1.0.5 - 2022-03-08

- fix invalid main field in package.json

## 1.0.4 - 2017-03-23

### 1.0.4 - 2017-03-23

- for outbound, find domain at hmail.todo.domain then hmail.domain.
- noop: use es6 arrow functions

## 1.0.3 - 2017-03-09

### 1.0.3 - 2017-03-09

- add `enabled=false` flag for each limit type, defaults to off, matching the docs.


## 1.0.2 - 2017-02-06
### 1.0.2 - 2017-02-06

- when redis handle goes away, skip processing
- add a 5 minute expiration on outbound rate limit entries

## 1.0.1 - 2017-01-28

### 1.0.1 - 2017-01-28

- increment rate_conn on connect_init
- increment rate_rcpt_host on rcpt/rcpt_ok

6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,8 @@ Applying strict connection and rate limits is an effective way to reduce spam de
- enforce rate limits with your firewall instead


[ci-img]: https://github.com/haraka/haraka-plugin-limit/actions/workflows/ci-test.yml/badge.svg
[ci-url]: https://github.com/haraka/haraka-plugin-limit/actions/workflows/ci-test.yml
[ci-lint-img]: https://github.com/haraka/haraka-plugin-limit/actions/workflows/lint.yml/badge.svg
[ci-lint-url]: https://github.com/haraka/haraka-plugin-limit/actions/workflows/lint.yml
[ci-img]: https://github.com/haraka/haraka-plugin-limit/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/haraka/haraka-plugin-limit/actions/workflows/ci.yml
[clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-limit/badges/gpa.svg
[clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-limit
[npm-img]: https://img.shields.io/npm/dm/haraka-plugin-limit
Expand Down
Loading

0 comments on commit 8541cc3

Please sign in to comment.