Skip to content

Commit

Permalink
Release v1.0.2 (#4)
Browse files Browse the repository at this point in the history
- replace a .replace(//g) with a replaceAll
- prettier: move config into package.json
- dep(eslint): upgrade to v9
- dep(all): bump versions
- doc(CONTRIBUTORS): added
  • Loading branch information
msimerson authored Jan 31, 2025
1 parent 8841fe1 commit b7ae73d
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 31 deletions.
4 changes: 2 additions & 2 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
engines:
eslint:
enabled: true
channel: 'eslint-8'
channel: 'eslint-9'
config:
config: '.eslintrc.yaml'
config: 'eslint.config.mjs'

ratings:
paths:
Expand Down
10 changes: 0 additions & 10 deletions .eslintrc.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions .prettierrc

This file was deleted.

2 changes: 1 addition & 1 deletion .release
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).

### Unreleased

### [1.0.2] - 2025-01-30

- replace .replace(//g) with a replaceAll
- prettier: move config into package.json
- dep(eslint): upgrade to v9
- dep(all): bump versions
- doc(CONTRIBUTORS): added

### [1.0.1] - 2024-11-04

- Merge pull request #2 from lnedry/master

- fix: removed redundant timer.
- chore: remove unused set of conn.notes.prev_helo

### [1.0.0] - 2024-05-08

- initial release

[1.0.0]: https://github.com/haraka/haraka-plugin-template/releases/tag/v1.0.0
[1.0.0]: https://github.com/haraka/haraka-plugin-helo.checks/releases/tag/v1.0.0
[1.0.1]: https://github.com/haraka/haraka-plugin-helo.checks/releases/tag/v1.0.1
[1.0.2]: https://github.com/haraka/haraka-plugin-helo.checks/releases/tag/v1.0.2
9 changes: 9 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Contributors

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-helo.checks/commits?author=msimerson">7</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/203240?v=4"><br><a href="https://github.com/lnedry">lnedry</a> (<a href="https://github.com/haraka/haraka-plugin-helo.checks/commits?author=lnedry">2</a>) |
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |

<sub>this file is generated by [.release](https://github.com/msimerson/.release).
Contribute to this project to get your GitHub profile included here.</sub>
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
[![CI Test Status][ci-img]][ci-url]
[![Code Climate][clim-img]][clim-url]

[![NPM][npm-img]][npm-url]

# haraka-plugin-helo.checks

This plugin performs a number of checks on the HELO string.
Expand Down Expand Up @@ -151,5 +149,3 @@ gmail.com=google.com
[ci-url]: https://github.com/haraka/haraka-plugin-helo.checks/actions/workflows/ci.yml
[clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-helo.checks/badges/gpa.svg
[clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-helo.checks
[npm-img]: https://nodei.co/npm/haraka-plugin-helo.checks.png
[npm-url]: https://www.npmjs.com/package/haraka-plugin-helo.checks
29 changes: 29 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import globals from 'globals'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})

export default [
...compat.extends('@haraka'),
{
languageOptions: {
globals: {
...globals.node,
...globals.mocha,
},
},

rules: {
'no-unused-vars': 1,
},
},
]
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ exports.big_company = function (next, connection, helo) {

const allowed_rdns = this.cfg.bigco[helo].split(/,/)
for (const allow of allowed_rdns) {
const re = new RegExp(`${allow.replace(/\./g, '\\.')}$`)
const re = new RegExp(`${allow.replaceAll('.', '\\.')}$`)
if (re.test(rdns)) {
connection.results.add(this, { pass: 'big_co' })
return next()
Expand Down
18 changes: 11 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "haraka-plugin-helo.checks",
"version": "1.0.1",
"version": "1.0.2",
"description": "Haraka plugin checks the HELO string.",
"main": "index.js",
"files": [
Expand All @@ -9,8 +9,8 @@
],
"scripts": {
"format": "npm run prettier:fix && npm run lint:fix",
"lint": "npx eslint@^8 *.js test",
"lint:fix": "npx eslint@^8 *.js test --fix",
"lint": "npx eslint@^9 *.js test",
"lint:fix": "npx eslint@^9 *.js test --fix",
"prettier": "npx prettier . --check",
"prettier:fix": "npx prettier . --write --log-level=warn",
"test": "node --test",
Expand All @@ -32,12 +32,16 @@
},
"homepage": "https://github.com/haraka/haraka-plugin-helo.checks#readme",
"devDependencies": {
"@haraka/eslint-config": "1.1.5",
"@haraka/eslint-config": "^2.0.2",
"haraka-test-fixtures": "1.3.8"
},
"dependencies": {
"haraka-net-utils": "^1.7.0",
"haraka-tld": "^1.2.2",
"haraka-net-utils": "^1.7.1",
"haraka-tld": "^1.2.3",
"haraka-utils": "^1.1.3"
},
"prettier": {
"singleQuote": true,
"semi": false
}
}
}
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ describe('helo.checks', () => {
beforeEach(_set_up)

it('pass, reject=false', (t, done) => {
const test_helo = 'yahoo.com'
this.connection.remote.host = 'yahoo.com'
const test_helo = 'yahoo.co.jp'
this.connection.remote.host = 'yahoo.co.jp'
this.plugin.cfg.check.big_company = true
this.plugin.cfg.reject.big_company = true
this.plugin.big_company(
Expand Down

0 comments on commit b7ae73d

Please sign in to comment.