Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Apr 14, 2024
1 parent 241776b commit 69831c0
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 30 deletions.
13 changes: 2 additions & 11 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@ env:
node: true
es6: true
mocha: true
es2022: true

plugins:
- haraka

extends: [ "eslint:recommended", "plugin:haraka/recommended" ]

root: true

rules:
indent: [2, 4, {"SwitchCase": 1}]
no-console: 0
no-unused-vars: 1
extends: ['@haraka']
4 changes: 2 additions & 2 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

### Unreleased

### 1.2.0 - 202Y-MM-DD
### 1.2.0 - 2024-04-14

-
- deps: version bumps


### 1.1.0 - 2022-05-27

- chore(ci): depend on shared GHA workflows
Expand Down
4 changes: 2 additions & 2 deletions configfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class cfreader {
}

on_watch_event (name, type, options, cb) {
return (fse, filename) => {
return (fse) => {
if (this._sedation_timers[name]) {
clearTimeout(this._sedation_timers[name]);
}
Expand Down Expand Up @@ -221,7 +221,7 @@ class cfreader {
const type = opts.type || 'binary';

isDirectory(name)
.then((result) => {
.then(() => {
return fsReadDir(name);
})
.then((fileList) => {
Expand Down
19 changes: 11 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
"url": "[email protected]:haraka/haraka-config.git"
},
"main": "config.js",
"files": ["readers","configfile.js","CHANGELOG.md"],
"engines": {
"node": ">=12"
"node": ">=16"
},
"dependencies": {
"js-yaml": "^4.1.0"
Expand All @@ -20,18 +21,20 @@
"hjson": "^3.2.2"
},
"devDependencies": {
"eslint": "^8.56.0",
"eslint-plugin-haraka": "^1.0.15",
"mocha": "^10.3.0"
"@haraka/eslint-config": "^1.1.1"
},
"bugs": {
"mail": "[email protected]",
"url": "https://github.com/haraka/haraka-config/issues"
},
"scripts": {
"test": "npx mocha test test/readers",
"lint": "npx eslint *.js readers test test/*/*.js",
"lintfix": "npx eslint --fix *.js readers test test/*/*.js",
"versions": "npx dependency-version-checker check"
"format": "npm run prettier:fix && npm run lint:fix",
"lint": "npx eslint@^8 *.js readers test test/*/*.js",
"lint:fix": "npx eslint@^8 *.js readers test test/*/*.js --fix",
"prettier": "npx prettier . --check",
"prettier:fix": "npx prettier . --write --log-level=warn",
"test": "npx mocha@10 test test/readers",
"versions": "npx dependency-version-checker check",
"versions:fix": "npx dependency-version-checker update && npm run prettier:fix"
}
}
3 changes: 1 addition & 2 deletions readers/ini.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ exports.init_booleans = (options, result) => {
return result;
}

exports.logger = (msg, level) => {
// if (!level) level = 'logwarn';
exports.logger = (msg) => {
console.log(msg);
}
2 changes: 2 additions & 0 deletions test/.eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rules:
no-unused-vars: 1
7 changes: 2 additions & 5 deletions test/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,6 @@ describe('getDir', function () {
it('loads all files in dir', function (done) {
this.config.getDir('dir', { type: 'binary' }, (err, files) => {
assert.ifError(err);
// console.log(files);
assert.equal(err, null);
assert.equal(files.length, 3);
assert.equal(files[0].data, `contents1${os.EOL}`);
Expand All @@ -476,8 +475,7 @@ describe('getDir', function () {
})

it('errs on invalid dir', function (done) {
this.config.getDir('dirInvalid', { type: 'binary' }, (err, files) => {
// console.log(arguments);
this.config.getDir('dirInvalid', { type: 'binary' }, (err) => {
assert.equal(err.code, 'ENOENT');
done();
})
Expand Down Expand Up @@ -505,10 +503,9 @@ describe('getDir', function () {
assert.equal(files.length, 3);
assert.equal(files[0].data, `contents1${os.EOL}`);
assert.equal(files[2].data, `contents3${os.EOL}`);
fs.writeFile(tmpFile, 'contents4\n', (err2, res) => {
fs.writeFile(tmpFile, 'contents4\n', (err2) => {
assert.equal(err2, null);
// console.log('file touched, waiting for callback');
// console.log(res);
});
}
if (callCount === 2) {
Expand Down

0 comments on commit 69831c0

Please sign in to comment.