Skip to content

Commit bb86316

Browse files
authored
Release v1.5.0 (#84)
- dep: replaced js-yaml with yaml - yaml supports v1.2 - js-yaml is barely maintained, replacing it removes most vuln warnings - test: replaced mocha with `node --test` - test: added watch tests - ci: updated publish & release workflows
1 parent 5ecbe5b commit bb86316

File tree

25 files changed

+421
-293
lines changed

25 files changed

+421
-293
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: CI
22

33
on:
4-
push:
54
pull_request:
5+
types: [opened, synchronize, reopened]
66

77
env:
88
CI: true
@@ -11,6 +11,11 @@ jobs:
1111
lint:
1212
uses: haraka/.github/.github/workflows/lint.yml@master
1313

14+
prettier:
15+
uses: haraka/.github/.github/workflows/prettier.yml@master
16+
with:
17+
branch: ${{ github.head_ref }}
18+
1419
coverage:
1520
uses: haraka/.github/.github/workflows/coverage.yml@master
1621
secrets: inherit

.github/workflows/codeql.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ on:
66
pull_request:
77
# The branches below must be a subset of the branches above
88
branches: [master]
9-
schedule:
10-
- cron: '18 7 * * 4'
119

1210
jobs:
1311
codeql:

.github/workflows/publish.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
name: publish
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
paths:
8-
- package.json
4+
release:
5+
types: [published]
96

107
env:
118
CI: true

.github/workflows/release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
paths:
9+
- package.json
10+
11+
env:
12+
CI: true
13+
14+
jobs:
15+
release:
16+
uses: haraka/.github/.github/workflows/release.yml@master
17+
secrets: inherit

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
44

55
### Unreleased
66

7+
### [1.5.0] - 2026-03-04
8+
9+
- dep: replaced js-yaml with yaml
10+
- yaml supports v1.2
11+
- js-yaml is barely maintained, replacing it removes most vuln warnings
12+
- test: replaced mocha with node --test
13+
- test: added test/watch
14+
- ci: updated ci, publish & release workflows
15+
716
### [1.4.2] - 2025-01-08
817

918
- dep(eslint): upgrade 8 -> 9
@@ -156,3 +165,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
156165
[1.4.0]: https://github.com/haraka/haraka-config/releases/tag/v1.4.0
157166
[1.4.1]: https://github.com/haraka/haraka-config/releases/tag/v1.4.1
158167
[1.4.2]: https://github.com/haraka/haraka-config/releases/tag/v1.4.2
168+
[1.5.0]: https://github.com/haraka/haraka-config/releases/tag/v1.5.0

CONTRIBUTORS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Contributors
22

3-
This handcrafted artisinal software is brought to you by:
3+
This handcrafted artisanal software is brought to you by:
44

5-
| <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-config/commits?author=msimerson">60</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/42121756?v=4"><br><a href="https://github.com/PSSGCSim">PSSGCSim</a> (<a href="https://github.com/haraka/haraka-config/commits?author=PSSGCSim">7</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/1346804?v=4"><br><a href="https://github.com/louis-lau">louis-lau</a> (<a href="https://github.com/haraka/haraka-config/commits?author=louis-lau">2</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/662371?v=4"><br><a href="https://github.com/baudehlo">baudehlo</a> (<a href="https://github.com/haraka/haraka-config/commits?author=baudehlo">1</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/651048?v=4"><br><a href="https://github.com/Wesitos">Wesitos</a> (<a href="https://github.com/haraka/haraka-config/commits?author=Wesitos">1</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/2270015?v=4"><br><a href="https://github.com/oreoluwa">oreoluwa</a> (<a href="https://github.com/haraka/haraka-config/commits?author=oreoluwa">1</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/83369329?v=4"><br><a href="https://github.com/polarismail">polarismail</a> (<a href="https://github.com/haraka/haraka-config/commits?author=polarismail">1</a>) |
5+
| <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-config/commits?author=msimerson">61</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/42121756?v=4"><br><a href="https://github.com/PSSGCSim">PSSGCSim</a> (<a href="https://github.com/haraka/haraka-config/commits?author=PSSGCSim">7</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/1346804?v=4"><br><a href="https://github.com/louis-lau">louis-lau</a> (<a href="https://github.com/haraka/haraka-config/commits?author=louis-lau">2</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/662371?v=4"><br><a href="https://github.com/baudehlo">baudehlo</a> (<a href="https://github.com/haraka/haraka-config/commits?author=baudehlo">1</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/651048?v=4"><br><a href="https://github.com/Wesitos">Wesitos</a> (<a href="https://github.com/haraka/haraka-config/commits?author=Wesitos">1</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/2270015?v=4"><br><a href="https://github.com/oreoluwa">oreoluwa</a> (<a href="https://github.com/haraka/haraka-config/commits?author=oreoluwa">1</a>) | <img height="80" src="https://avatars.githubusercontent.com/u/83369329?v=4"><br><a href="https://github.com/polarismail">polarismail</a> (<a href="https://github.com/haraka/haraka-config/commits?author=polarismail">1</a>) |
66
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
77

88
<sub>this file is generated by [.release](https://github.com/msimerson/.release).

config.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ class Config {
2323
let [name, type, cb, options] = this.arrange_args(args)
2424
if (!type) type = 'value'
2525

26-
const full_path = path.isAbsolute(name)
27-
? name
28-
: path.resolve(this.root_path, name)
26+
const full_path = path.isAbsolute(name) ? name : path.resolve(this.root_path, name)
2927

3028
let results = reader.read_config(full_path, type, cb, options)
3129

@@ -129,11 +127,7 @@ function merge_config(defaults, overrides, type) {
129127
return merge_struct(JSON.parse(JSON.stringify(defaults)), overrides)
130128
}
131129

132-
if (
133-
Array.isArray(overrides) &&
134-
Array.isArray(defaults) &&
135-
overrides.length > 0
136-
) {
130+
if (Array.isArray(overrides) && Array.isArray(defaults) && overrides.length > 0) {
137131
return overrides
138132
}
139133

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default [
2222
},
2323
},
2424
rules: {
25-
'no-unused-vars': ['warn', { 'caughtErrorsIgnorePattern': '^ignore' }],
25+
'no-unused-vars': ['warn', { caughtErrorsIgnorePattern: '^ignore' }],
2626
},
2727
},
2828
]

lib/reader.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ class Reader {
3535
}
3636

3737
// when loaded with require('haraka-config')
38-
if (
39-
__dirname.split(path.sep).slice(-3).toString() ===
40-
'node_modules,haraka-config,lib'
41-
) {
38+
if (__dirname.split(path.sep).slice(-3).toString() === 'node_modules,haraka-config,lib') {
4239
config_dir_candidates = [
4340
path.join(__dirname, '..', '..', '..', 'config'), // haraka/Haraka/*
4441
path.join(__dirname, '..', '..', '..'), // npm packaged modules
@@ -233,8 +230,7 @@ class Reader {
233230

234231
if (this._config_cache[cache_key]) {
235232
for (const ck in this._config_cache[cache_key]) {
236-
if (ck.substr(0, 1) === '!')
237-
delete this._config_cache[path.join(cp, ck.substr(1))]
233+
if (ck.substr(0, 1) === '!') delete this._config_cache[path.join(cp, ck.substr(1))]
238234
}
239235
}
240236

0 commit comments

Comments
 (0)