Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Apr 22, 2024
1 parent 3b731cc commit 5f2c421
Show file tree
Hide file tree
Showing 12 changed files with 359 additions and 351 deletions.
8 changes: 4 additions & 4 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
engines:
eslint:
enabled: true
channel: "eslint-8"
channel: 'eslint-8'
config:
config: ".eslintrc.yaml"
config: '.eslintrc.yaml'

checks:
method-complexity:
config:
threshold: 10

ratings:
paths:
- "**.js"
paths:
- '**.js'
6 changes: 4 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Fixes #

Changes proposed in this pull request:
-
-

-
-

Checklist:

- [ ] docs updated
- [ ] tests updated
- [ ] Changes.md updated
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

on: [ push, pull_request ]
on: [push, pull_request]

env:
CI: true
Expand All @@ -17,6 +17,6 @@ jobs:
needs: [lint]
uses: haraka/.github/.github/workflows/ubuntu.yml@master

windows:
needs: [lint]
uses: haraka/.github/.github/workflows/windows.yml@master
# windows:
# needs: [lint]
# uses: haraka/.github/.github/workflows/windows.yml@master
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: CodeQL

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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ env:
jobs:
publish:
uses: haraka/.github/.github/workflows/publish.yml@master
secrets: inherit
secrets: inherit
2 changes: 2 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
singleQuote: true
semi: false
4 changes: 2 additions & 2 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This handcrafted artisinal software is brought to you by:

| <img height="80" src="https://avatars.githubusercontent.com/u/261635?v=4"><br><a href="https://github.com/msimerson">msimerson</a> (<a href="https://github.com/haraka/haraka-plugin-redis/commits?author=msimerson">57</a>)| <img height="80" src="https://avatars.githubusercontent.com/u/7803873?v=4"><br><a href="https://github.com/zazapeta">zazapeta</a> (<a href="https://github.com/haraka/haraka-plugin-redis/commits?author=zazapeta">1</a>)|
| :---: | :---: |
| <img height="80" src="https://avatars.githubusercontent.com/u/261635?v=4"><br><a href="https://github.com/msimerson">msimerson</a> (<a href="https://github.com/haraka/haraka-plugin-redis/commits?author=msimerson">57</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/7803873?v=4"><br><a href="https://github.com/zazapeta">zazapeta</a> (<a href="https://github.com/haraka/haraka-plugin-redis/commits?author=zazapeta">1</a>) |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |

<sub>this file is maintained by [.release](https://github.com/msimerson/.release)</sub>
21 changes: 2 additions & 19 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,101 +2,84 @@

The format is based on [Keep a Changelog](https://keepachangelog.com/).


### Unreleased


### [2.0.7] - 2024-04-21


- populate [files] in package.json. Delete .npmignore.


### [2.0.6] - 2023-12-12

- doc(README): '[socket]' is now '[server]' (#39)
- chore(ci): add .release, updated dot files


### 2.0.5 - 2022-05-26

- fix: backwards compatibility with legacy plugin config files
- fix: rename p\* methods -> * (required in redis v4)
- fix: rename p\* methods -> \* (required in redis v4)
- fix: add `await client.connect()` as is now required, fixes #32
- fix: make redis_ping async
- dep(redis): bump 4.0 -> 4.1
- chore(ci): updated syntax
- chore(ci): added codeql config
- test: added tests for init_redis_plugin


### 2.0.0 - 2022-03-29

- dep(redis): bump major version 3 -> 4
- breaking API change: replaced callbacks with promises
- config.ini
- opts.db -> opts.database (to match upstream)

- opts.db -> opts.database (to match upstream)

### 1.0.13 - 2021-10-14

- chore(ci): switch CI from Travis to GitHub Actions
- doc(README): update formatting with GFM


### 1.0.12 - 2020-03-16

- chore(ci): replace nodeunit with mocha
- dep(redis): update lib to v3
- appveyor: test on node 10


### 1.0.11 - 2019-04-11

- create custom connection only after: all 3 conditions match


### 1.0.10 - 2019-04-09

- merge ALL of [opts] into [server] config (fixes #18)
- merge all of [opts] into [pubsub] config
- include an empty config/redis.ini
- add defaultOpts once, vs defaults in two places


### 1.0.9 - 2019-02-19

- bump redis version to 2.8.0
- emit error message if redis connection fails
- add 3s timeout for subscribe connects: minimize connections stalls
- add es6 template literals


### 1.0.8 - 2018-01-03

- upon punsubscribe, `quit()` (disconnect) redis client


### 1.0.7 - 2017-07-31

- apply config [opts] to pubsub settings #7


### 1.0.6 - 2017-06-16

- eslint 4 compat


### 1.0.5 - 2017-06-09

- disconnect per-connection redis client upon punsubscribe


### 1.0.4 - 2017-02-06

- remove retry_strategy, redis client now does The Right Thing w/o it


### 1.0.3 - 2017-02-06

- don't break when no [redis] config exists
Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,32 +72,31 @@ optionally with a redis db ID. All redis config options must be listed in your p

```js
exports.register = function () {
this.inherits('redis');
this.inherits('redis')

this.cfg = this.config.get('my-plugin.ini');
this.cfg = this.config.get('my-plugin.ini')

// populate plugin.cfg.redis with defaults from redis.ini
this.merge_redis_ini();
// populate plugin.cfg.redis with defaults from redis.ini
this.merge_redis_ini()

// cluster aware redis connection(s)
this.register_hook('init_master', 'init_redis_plugin');
this.register_hook('init_child', 'init_redis_plugin');
// cluster aware redis connection(s)
this.register_hook('init_master', 'init_redis_plugin')
this.register_hook('init_child', 'init_redis_plugin')
}
```

When a db ID is specified in the [redis] section of a redis inheriting plugin, log messages like these will be emitted when Haraka starts:

````
```
[INFO] [-] [redis] connected to redis://172.16.15.16:6379 v3.2.6
[INFO] [-] [limit] connected to redis://172.16.15.16:6379/1 v3.2.6
[INFO] [-] [karma] connected to redis://172.16.15.16:6379/2 v3.2.6
[INFO] [-] [known-senders] connected to redis://172.16.15.16:6379/3 v3.2.6
````
```

Notice the database ID numbers appended to each plugins redis connection
message.


[ci-img]: https://github.com/haraka/haraka-plugin-redis/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/haraka/haraka-plugin-redis/actions/workflows/ci.yml
[clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-redis/badges/gpa.svg
Expand Down
Loading

0 comments on commit 5f2c421

Please sign in to comment.